using SORT on a tree
by Greg Findlay · in Artist Corner · 09/30/2002 (9:56 pm) · 6 replies
I've read through the section of the exporter doc on SORT and tried using SORT::MAX_DEPTH=0 as the doc suggests but no matter the variable value the trunk of the tree always gets sorted to the front. Any ideas on how to solve this?
Also, what do all of the variables for sorting actually do. Here's a list:
SORT::MAX_DEPTH
SORT::NUM_BIG_FACES
SORT::WRITE_Z
SORT::Z_LAYER_UP
SORT::Z_LAYER_DOWN
Any help is appreciated.
Alc
Also, what do all of the variables for sorting actually do. Here's a list:
SORT::MAX_DEPTH
SORT::NUM_BIG_FACES
SORT::WRITE_Z
SORT::Z_LAYER_UP
SORT::Z_LAYER_DOWN
Any help is appreciated.
Alc
About the author
#3
01/21/2003 (6:30 pm)
I have the same problem.. help help!!
#4
01/21/2003 (7:10 pm)
From your description (trunk sorts in front of the branches) I'm guessing that the foilage and trunk are all one object. Separate the foilage from the trunk and make sure the trunk is treated as non-translucent. What was happening, I believe, is that the sort algorithm wasn't able to find a way to sort all those polys -- intersecting at various angles and whatnot -- so it gave up and left 'em sorted in a bad order.
#5
Also you can use a multi-subobject material and have 2 seperate textures for your tree. They will also be marked with the opicity setting like above. I usually make the solid material first in the list.
Also make sure your model is seperated into sections keeping translusent areas unattached for solid areas.
You really don't need the sort settings to make it work. I never use them for trees anyway.
Matt
01/21/2003 (7:18 pm)
Clark is of course correct. One good thing to practice when building things like trees is to use is another seperate material for the foliage. The trunk will be marked without the opicity setting and the foliage material will be marked with it.Also you can use a multi-subobject material and have 2 seperate textures for your tree. They will also be marked with the opicity setting like above. I usually make the solid material first in the list.
Also make sure your model is seperated into sections keeping translusent areas unattached for solid areas.
You really don't need the sort settings to make it work. I never use them for trees anyway.
Matt
#6
The above replies are all correct, and that should solve most of your problems. I also found out that if your translucent polygons intersect each other, it will also cause the sorting not to work. Make sure each translucent polygon is attatched (by verticies) to another if adjacent, and that none are intersecting. That worked for me.
01/21/2003 (7:47 pm)
I also asked about this a short while ago and got no answers on the definitions of the sort properties, I guess no one really knows.The above replies are all correct, and that should solve most of your problems. I also found out that if your translucent polygons intersect each other, it will also cause the sorting not to work. Make sure each translucent polygon is attatched (by verticies) to another if adjacent, and that none are intersecting. That worked for me.
Torque Owner Greg Findlay
Alc