seeing lighted objects underneath water..can it be done?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

seeing lighted objects underneath water..can it be done?

Post by grb »

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
grb
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

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...

Code: Select all

$water rendereffects "-shadow"
waitframe
$water.origin = $scriptorigin.origin
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.
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

thanks alcoholic.....

Post by grb »

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.
grb
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

water

Post by tltrude »

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!
Tom Trude,

Image
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

tltrude...

Post by grb »

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.
grb
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Light

Post by tltrude »

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.
Tom Trude,

Image
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

tltrude and alcoholic...

Post by grb »

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,
grb
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Bubbles and drips

Post by tltrude »

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

Image
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

i'll probably will use them, if I may 8-)
If u changed in tom_bubble.tik all dummy2 to dummy3, they would be visible in 3D, btw.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

bubbles and drips

Post by tltrude »

Sure, you can use them. Please send any improvement you make for them. Or, put them on your site.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Re: bubbles and drips

Post by wacko »

tltrude wrote:Sure, you can use them. Please send any improvement you make for them. Or, put them on your site.
errm, I don't use them. :roll:
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 :)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

send

Post by tltrude »

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.
Tom Trude,

Image
Post Reply