seeing lighted objects underneath water..can it be done?
Moderator: Moderators
seeing lighted objects underneath water..can it be done?
Hi all,
Is there a way to get lights to show underneath the misc_objects/riversf
texture? For instance, put pieces of rock underneath the water surface,
then place lights (targeted to particular rocks).
I tried about every combo I can think of with setting the light parameters
(entities only, no entities, target an object, set various radius, light intensity, blah....blah....blah) and no matter what I try, I cannot get any
lighting to show underneath or on the surface of the water.
Yes I tried (using the Surface Inspector Tool) to set various surface flags for the misc_objects/riversf texture, such as nolightmap (OFF), alphachannel, no shadow combos...............etc..
Nothing I tried will show any type light underneath the water surface, nor any illumination emitting off the underwater rocks that have targeted lights assigned to them.
Any suggestions?
PS I have examined the dm stock map that comes with MOHAA that has the nice river with the river sounds. Nothing special done with that map to show me what I may not be doing.
thanks in advance
Is there a way to get lights to show underneath the misc_objects/riversf
texture? For instance, put pieces of rock underneath the water surface,
then place lights (targeted to particular rocks).
I tried about every combo I can think of with setting the light parameters
(entities only, no entities, target an object, set various radius, light intensity, blah....blah....blah) and no matter what I try, I cannot get any
lighting to show underneath or on the surface of the water.
Yes I tried (using the Surface Inspector Tool) to set various surface flags for the misc_objects/riversf texture, such as nolightmap (OFF), alphachannel, no shadow combos...............etc..
Nothing I tried will show any type light underneath the water surface, nor any illumination emitting off the underwater rocks that have targeted lights assigned to them.
Any suggestions?
PS I have examined the dm stock map that comes with MOHAA that has the nice river with the river sounds. Nothing special done with that map to show me what I may not be doing.
thanks in advance
grb
assuming your lights work right, maybe you can try these things.
when you changed the surface flags, did you hit apply? you cant just hit ok, you have to select the surface, go to the flags, check a flag, and hit apply.
if the water is not already an entity, make it a script_object and give it a targetname. in the script add the line
$water rendereffects "-shadow"
i dont know if it will work because the compiler probably didnt calculate how it would look if the water didnt cast a shadow.
pantera once showed an example of how to make a new shader file that doesnt cast a shadow. start a search with keyword "shader" and by author "PanTera" (i think thats his name and i dont know if its case sensitive).
this may sound a bit extreme, but if all others fail, this should work...
1. assuming the water is in position, give it an origin brush, and make the origin brush and the water the same entity.
2. place a script_origin right where the origin brush is. (make sure you give a targetname)
3. now grab hold of the water and the origin brush, and move it somewhere hidden on your map "or somewhere later on the map where nobody will see it"
4. now in your script add this...
basically, what that does is let the compiler do lighting calculations in the absence of water, then you move the water to where you want it to be, and the light should show up through it.
those are just some ideas i thought up. good luck.
when you changed the surface flags, did you hit apply? you cant just hit ok, you have to select the surface, go to the flags, check a flag, and hit apply.
if the water is not already an entity, make it a script_object and give it a targetname. in the script add the line
$water rendereffects "-shadow"
i dont know if it will work because the compiler probably didnt calculate how it would look if the water didnt cast a shadow.
pantera once showed an example of how to make a new shader file that doesnt cast a shadow. start a search with keyword "shader" and by author "PanTera" (i think thats his name and i dont know if its case sensitive).
this may sound a bit extreme, but if all others fail, this should work...
1. assuming the water is in position, give it an origin brush, and make the origin brush and the water the same entity.
2. place a script_origin right where the origin brush is. (make sure you give a targetname)
3. now grab hold of the water and the origin brush, and move it somewhere hidden on your map "or somewhere later on the map where nobody will see it"
4. now in your script add this...
Code: Select all
$water rendereffects "-shadow"
waitframe
$water.origin = $scriptorigin.originthose are just some ideas i thought up. good luck.
thanks alcoholic.....
I will download this thread and try out what you suggest.
Not sure if I had used the apply button or not, come to think of it.
If you do not hear from me on the results it is because I have to do
some major terrain facelifting. I had guage out stream areas in a rather
large map. Most of the river bed making worked but then some stuff got screwed up. Funny I carefully select only certain LOD vertices then carefully lower them in steps of lets say 16 or 32 units at a time so that I
can check after each move how the stream bed is lining up vertically under bridges, and already made stream bed areas. BUT damn it, somehow the whole terrain (all the LOD sections get raised up a few units!
So then I have to go back and raise road beds, sidewalks etc.! A real
pain in the ass to say the least! So until I get this stuff fixed and finalize the stream bed elevations I probably will not do to much further on adding lighting to water etc.. But I will get back to you once I am in the position to try out your suggestions. You just may have a simple solution here.
Thanks for the help.
Not sure if I had used the apply button or not, come to think of it.
If you do not hear from me on the results it is because I have to do
some major terrain facelifting. I had guage out stream areas in a rather
large map. Most of the river bed making worked but then some stuff got screwed up. Funny I carefully select only certain LOD vertices then carefully lower them in steps of lets say 16 or 32 units at a time so that I
can check after each move how the stream bed is lining up vertically under bridges, and already made stream bed areas. BUT damn it, somehow the whole terrain (all the LOD sections get raised up a few units!
So then I have to go back and raise road beds, sidewalks etc.! A real
pain in the ass to say the least! So until I get this stuff fixed and finalize the stream bed elevations I probably will not do to much further on adding lighting to water etc.. But I will get back to you once I am in the position to try out your suggestions. You just may have a simple solution here.
Thanks for the help.
grb
water
Use "pond" and you will have light at the bottom of the river. If it does not flow (tcmod_scroll) in the right direction, you'll have to make a new river shader, which is a pain in the butt!
tltrude...
thanks for input. I have not tried Alcoholic's suggestions as of yet. I have been trying to clean up a rather large map that has gotten a lot
of terrain elevations out of wack. As you indicated, the pond texture
probably does not have "flow" to it.
I didn't really indicate why I wanted lights under water.
My plan is to attempt to build up areas of a river that appear to have
rapids then slow poles, and fast side currents etc.. I thought that adding
some lighting to shoals areas etc., might make the river appear more realistic. And for all the work it may involve, perhaps it will not be worth the effort.
Again I will get back to you folks once I have tried the various suggestions in this thread.
Thanks for the help.
of terrain elevations out of wack. As you indicated, the pond texture
probably does not have "flow" to it.
I didn't really indicate why I wanted lights under water.
My plan is to attempt to build up areas of a river that appear to have
rapids then slow poles, and fast side currents etc.. I thought that adding
some lighting to shoals areas etc., might make the river appear more realistic. And for all the work it may involve, perhaps it will not be worth the effort.
Again I will get back to you folks once I have tried the various suggestions in this thread.
Thanks for the help.
grb
Light
I don't think you can use a light entity inside a water brush, although using a dynamic light (script_model) might work. You can make one of the water textures emit light by adding "surfacelight 1000" to a new water shader. But, large light emitting brushes take a long time to compile.
tltrude and alcoholic...
Thanks again guys for your suggestions. I think at this point I am going to
forget the idea. As indicated, I had hoped to be able to hightlight many
rocks within a body of water to give the image of a set of rapids.....
Based on what you guys have mentioned, assuming that it could be done,
the fps would probably drop quite a bit. It isn't worth the trouble.
However. I can see an application as you all can for this type thing where
one may want to have a light attached to a sub or something showing through the water. Perhaps in the future one of us will come up with some underwater lighting solutions for a simple single light radiator for
underwater use.
Thanks again for the help thought. I guess we can close this thread unless anyone would want to add any further comments.....
take care,
forget the idea. As indicated, I had hoped to be able to hightlight many
rocks within a body of water to give the image of a set of rapids.....
Based on what you guys have mentioned, assuming that it could be done,
the fps would probably drop quite a bit. It isn't worth the trouble.
However. I can see an application as you all can for this type thing where
one may want to have a light attached to a sub or something showing through the water. Perhaps in the future one of us will come up with some underwater lighting solutions for a simple single light radiator for
underwater use.
Thanks again for the help thought. I guess we can close this thread unless anyone would want to add any further comments.....
take care,
grb
Bubbles and drips
I made a tutorial map for underwater bubbles and drips from the ceiling. But I never could get the drips to splash on the surface of the water. The bubbles do make being underwater seem more real.
http://pages.sbcglobal.net/tltrude/Temp/bubble_drip.zip

http://pages.sbcglobal.net/tltrude/Temp/bubble_drip.zip

bubbles and drips
Sure, you can use them. Please send any improvement you make for them. Or, put them on your site.
Re: bubbles and drips
errm, I don't use them.tltrude wrote:Sure, you can use them. Please send any improvement you make for them. Or, put them on your site.
tested the bubbles in a massive brush cylinder of canal sludge + behind glass wall, and that's probably too much for the engine: they can't be seen from outside, even with that onlywater switched off in the tik.
If u think I did something wrong, you're welcome to get the files...
Nevertheless I can/will put them in the recyclin bin, thnx m8
send
Yes, send the files, or give me a link. I got them to work inside a patch mesh glass tube. Maybe a see-through "glanz" texture for the tube would work.
