Game Development Community

Problem with DRL2.0, CG Water, and Celestials

by Cameron Jensen · in Torque Game Engine · 09/26/2006 (4:29 pm) · 2 replies

I finally got TLK 1.4/DRL2.0/CGWater/MMOKit merged, but I have a few questions on what might be possible and if i could get help on it.

First, the celestials object that is controlling the day/night cycle currently is obviously not reflecting the real sky itself nor is it changing color/brightness etc
So obviously my water looks pretty funky when i have sky_day01 envmapped to the water and then nighttime rolls around and its still bright as can be!

Is there a way I can get a direct reflection of the sky? And second, since I am using TLK is there not a way to have the sun affect the brightness of my water too?

Then my last question is about DRL. how can i get the bloom effect ingame, and how do i adjust the intensity of bloom?

#1
09/26/2006 (8:15 pm)
To get a good real reflection in the water, you need to render the scene offscreen, from the point of view of a reflected camera under water, and then use that as your water texture. This would require some hacking in the actual rendering set-up (and isn't made easier by the fact that all the objects bang the OpenGL state directly). This might be easier in the TSE, but I wouldn't know for sure, because they don't release the documentation.

To get a real bloom effect, you must render to a high dynamic range surface, do tone mapping to only get the overbright areas, and then filter the result using something like a separable Gaussian blur. Then add this back to your scene before presentation. This takes some more set-up in the Torque renderer. This might also be easier in the TSE, although I don't know for sure, because they don't release the documentation.

To get a fake bloom effect, you can add a post-process right before SwapBuffers, that skims off the top 5% of brightness into a separate texture, blurs it, and then adds back to the screen. This works pretty well (but is admittedly cheesy). That wouldn't be that hard to add to the current Torque, because it's self-contained.
#2
09/26/2006 (8:31 pm)
@J "hplus" W: Cameron was asking specifically about the DRL resource which adds bloom to Torque.

@Cameron: Details on how to control the bloom are in the DRL documentation. I suggest reading the DRL2.0 manual, and searching it for setBloomSamples and setBloomColorOffset.

I would ask the TLK question in the TLK forums. John is generally very good at getting you answers quickly.