Game Development Community

translucency and sorting

by Leslie Young · in Torque Game Engine · 02/13/2003 (11:08 am) · 3 replies

I followed some tutorials on creating a box with translucent areas and how to use SORT:: to get all the faces drawn at the right time, now I wanna make a fern and some other plants but the darn thing doesn't draw correctly in the game even when I use SORT:: on the object, is there any other special things I should do, or is this to be expected from an object like that -> i used about 5 planes (not intersecting) to represent the leafes using png teture of a fern leafe. (using 3DS 4)

#1
02/13/2003 (11:15 am)
Did you make the objects name "SORT::ObjectName"?
#2
02/13/2003 (11:45 am)
Yep SORT::fern2 ;

I followed the tutorials from this site about making objects in 3Dstudio and my box with translucent areas sort ok, can it be that something like this plant object Im trying could have problems as it is not a closed object and use planes facing up and with a bit of a tilt?

...mmm thinking of it, i'm gonna have a look at the tree model .max file that comes with the example and see what they did in there cause that onject looks good in the engine even with the fly cam there seems to be no sorting problems, maybe i need to add something else in the user data of the object properties.
#3
02/27/2003 (11:52 am)
Look in the appendicies of the Max2DTS tool documentation. There are a few switches for sorted objects.

As a side note, I found that if one object uses "SORT::" (because it didn't work without it) overlaps an object that DOESN'T use "SORT::" (and did work without it) you should turn on "SORT::" anyways. I know that made ZERO sense, but it came down to this:

1) Object #1 had 4 transparent faces, but looked fine without "SORT::"

2) Object #2 had 1 transparent face, and looked like hell without "SORT::"

3) Turned on "SORT::" for object #2 and it looked much better, but when object #1 was behind it, object #1 appeared to render in front of object #2.

4) Turned on "SORT::" for object #1 and all problems went away. FPS slowed down a noticable (but minute) amount when the two objects were visible.

- Brett