Game Development Community

beta 4 bug: foilage replicators rendering when player is underwater

by deepscratch · in Torque 3D Professional · 07/27/2009 (4:08 am) · 5 replies

this has been present from the begining,
and I believe is related to the replicators rendering bright at night.
any word on a fix?

from above water
img141.imageshack.us/img141/6940/foilagerep1.jpg


from under water
img521.imageshack.us/img521/2505/foilagerep2.jpg

#1
07/27/2009 (9:44 am)
This is tricky... Foliage renders after Water so that is why it appears to be "on top" of the water and does not receive the underwater fogging.

The problem is we can't just switch the order or you would have the opposite problem when looking a foliage that is underwater from above water.

The only solution that comes to mind is to have three bins... AboveWaterFoliage, Water, UnderWaterFoliage, and to render them in a different order depending on if the camera is under or above water.

But I don't know if this solution is very extendable because we have the same problem with particles and any object with transparency.
#2
07/27/2009 (4:20 pm)
Yea... this has come up a ton of times. Having multiple bins seems like the only good solution to it... you just have to decide at prepRenderImage time if the viewpoint is above or below water so you can stick stuff into the right bins.

Any other ideas?
#3
07/28/2009 (10:25 pm)
Could this be boolean ? As property of the replicator ?

I am playing with some effects where replicator "crosses" the boundary of under/above water . It provides a very natural effect with one replicator.

It would seem the bin options would preclude this effect .. or am i misunderstanding what you are proposing?
#4
07/29/2009 (1:07 pm)
@Andrew
I don't follow you, what change did you make to replicator?
#5
07/29/2009 (1:18 pm)
Instead of having multiple bins for every kind of translucent object, why not have only two bins for the water, WaterFromAboveBin and WaterFromUnderBin, therefore treating the water when viewed from above as something different than the water viewed from underwater. The former would render before translucent objects, and the latter would render after translucent objects.

But then we have the problem of translucent objects which are actually placed underwater... hmmm.

Maybe we really need two sets of bins for translucent objects: one for underwater objects and other for above water objects, the water itself rendering after the underwater objects were rendered. If the camera goes underwater, the bins are flipped: above water objects go into the underwater bin and the other way around.