Faces Seen through Transparent Model
by Dave Calabrese · in Artist Corner · 09/11/2005 (2:53 pm) · 19 replies
So I have a model, and it has a transparency flag, and it all works just fine. HOWEVER... there are some faces inside of the model that I can see through the OUTSIDE walls of the model! Since I'm under NDA I cannot show the model or give a lot of details, but I can say that it is in the shape of a cannon. You can see the inside walls of the cannon through the outside of the cannon. The transparency flag HAS to be set to on, as we are fading it in, and the fading does not work without transparency.
So, without making this more complex, just imagine looking at a solid cannon, and while looking at it, you can see the inside faces that are facing you like they are outside of the tube.
I understand there are some sort of ordering flags that can be set, but I've never had any luck with those, so I wouldn't be surprised if this is a similar issue, however I believe that those flags were only for seeing one object through a seperate object - not portions of an object through itself.
So, given I didn't make that WAY too confusing.... any ideas?
-Dave C.
So, without making this more complex, just imagine looking at a solid cannon, and while looking at it, you can see the inside faces that are facing you like they are outside of the tube.
I understand there are some sort of ordering flags that can be set, but I've never had any luck with those, so I wouldn't be surprised if this is a similar issue, however I believe that those flags were only for seeing one object through a seperate object - not portions of an object through itself.
So, given I didn't make that WAY too confusing.... any ideas?
-Dave C.
About the author
Recent Threads
#2
Off the top of my head, heres something you could try that may get the shape sorting properly. Seperate the interior and the exterior of the cannon into seperate meshes. Then, place them both in a heirarchical chain, with the inside mesh as the parent. I've used this set up to force correct sorting on foliage and things of that nature, so it could also work for you.
Again, that's off the top of my head. I've never had to work around that specific problem, so there may be a more elegant solution that I'm not aware of.
09/11/2005 (4:49 pm)
SORT should only be used on VERY simple meshes. Using it with anything else will lead to mind numbingly high polycounts.Off the top of my head, heres something you could try that may get the shape sorting properly. Seperate the interior and the exterior of the cannon into seperate meshes. Then, place them both in a heirarchical chain, with the inside mesh as the parent. I've used this set up to force correct sorting on foliage and things of that nature, so it could also work for you.
Again, that's off the top of my head. I've never had to work around that specific problem, so there may be a more elegant solution that I'm not aware of.
#3
09/15/2005 (9:34 am)
Sort:: only works for milkshape and 3ds, other than that... Torque has a major problem with full and partial (alpha) Transparancies.. Its the engine, not you.
#4
09/15/2005 (1:55 pm)
I'm wondering about this as well, is there any chance the SORT problem will ever get fixed for TGE? If not , has the problem been rectified for TSE? We don't have the funds to liscense 3ds max ,and Sort for milkshape doesn't seem to work . Our trees are suffering from the sort prob, namely our canopys, we have been pulling our hair out over this for months...
#5
But besides that, a few friendly words of wisdom. If you're spending a lot of time toying with transparency mis-sorts, then you are focusing on the wrong thing. Worry about getting your game done. Worry about making it fun. Fixing z sorting problems should be hanging out on the bottom of your to-do list.
09/16/2005 (1:21 am)
Z sorting issues aren't as big a deal as most people make them out to be since there are ways of fixing existing issues, as well as ways of building your models so they never happen in the first place. TDN has a rather in depth article that covers it all, which everyone will be able to see once we launch.But besides that, a few friendly words of wisdom. If you're spending a lot of time toying with transparency mis-sorts, then you are focusing on the wrong thing. Worry about getting your game done. Worry about making it fun. Fixing z sorting problems should be hanging out on the bottom of your to-do list.
#6
09/16/2005 (7:21 am)
LOL , i hear you man :) , it's not an problem right NOW , just an issue that's been on the backburner but it's always on my mind , guess i should have written in past tense... Thx :)
#7
I have been working with a glass effect for windshields.
I noticed that, when I group the two sides of the windsheild together as one unit, I can see both sides when the transparency is applied, resulting in a higher than desired opacity.
On the other hand, if I seperate them and treat them as two different groups, the problem ceases.
Seriously. (C;
09/16/2005 (8:50 am)
Well, this is what I do in TGE to avoid this problem - seperate the meshes.I have been working with a glass effect for windshields.
I noticed that, when I group the two sides of the windsheild together as one unit, I can see both sides when the transparency is applied, resulting in a higher than desired opacity.
On the other hand, if I seperate them and treat them as two different groups, the problem ceases.
Seriously. (C;
#8
This issue needs to not be ingored anymore and properly fixed.
09/16/2005 (9:52 am)
Z sorting issues are not on the bottom of artists and content creators.. And thoes are the people this Broken feature is affecting the most. I have tryed every single way that i can find and think of to avoid this issue, the only one that works is to just not use them, and thats Unacceptable. Especialy when it somes to art direction and optomising.Teri Thom is 100% correct. This issue needs to not be ingored anymore and properly fixed.
#9
If there are ways around this in that upcoming TDC article, then that is a much needed godsend for those of us who have been plagued by this issue for years. However, if they are simply minor workaround for an issue that will continue to plague the art teams working on projects, then I have to agree that a fix is greatly needed.
My 2-cents,
-Dave C.
09/16/2005 (10:28 am)
I have to disagree about this being on the bottom of our lists. For the art team, this is a very high concern. Sure, if this is holding back the entire project, then something has to be changed - most likely the offending objects would simply have to be cut from the game, because the Z-Sorting issue looks unacceptable in a game, and can become offensive to the player in the ways that it 'pulls them out of the game' - a huge no-no in game design.If there are ways around this in that upcoming TDC article, then that is a much needed godsend for those of us who have been plagued by this issue for years. However, if they are simply minor workaround for an issue that will continue to plague the art teams working on projects, then I have to agree that a fix is greatly needed.
My 2-cents,
-Dave C.
#10
Why wont objects SORT correctly
Basically you can sort just about any shape if you know the common direction it will be veiwed at. You link the thing up so the Inner most shape (or furthest from veiw direction) is on top of the tree. Torque draws through the heirachy from top to bottom (without using SORT::).
This works with almost all the exporters that support Heirachial Trees.
Also you could go into the TSSortedMesh.cc and TSSortedMesh.h and rewrite how a sorted mesh is drawn. There are very simple and fast ways of assuring that a transperant shapes gets drawn correctly. The RedBook for opengl has some examples of it.
I guess I should not have told you that though, this will spawn an argument from all the people who "Know!" what they are doing. :)
Matt
09/18/2005 (6:23 am)
I posted this thing once in the FAQ.Why wont objects SORT correctly
Basically you can sort just about any shape if you know the common direction it will be veiwed at. You link the thing up so the Inner most shape (or furthest from veiw direction) is on top of the tree. Torque draws through the heirachy from top to bottom (without using SORT::).
This works with almost all the exporters that support Heirachial Trees.
Also you could go into the TSSortedMesh.cc and TSSortedMesh.h and rewrite how a sorted mesh is drawn. There are very simple and fast ways of assuring that a transperant shapes gets drawn correctly. The RedBook for opengl has some examples of it.
I guess I should not have told you that though, this will spawn an argument from all the people who "Know!" what they are doing. :)
Matt
#11
All that said, though, there is a workaround for nearly every kind of z sorting issue you can have (as far as static shapes go... animated ones get trickier). In any creative industry -whether it be games, or graphic design, or motion graphics, or whatever- you have to be open to change and ready to adapt. With things like this, I see a lot of people getting angry that they can't model a tree the way that's most familiar to them. There is a way of doing it. I know this for a fact because I do it. Learning how to model in ways that aren't immidiately obvious or comfortable to you is exceptionally valuable.
Please don't think I'm trying to come down on anyone. I'm not. Like I said before, I know how frustrating it is to work on a model, have it look awesome in max or maya or whatever, and then export it and be smacked in the face. I'm just trying to point out that there are ways around pesky sorting so, many times, it's not the fault of the tech but the fault of the artist.
09/18/2005 (4:07 pm)
I won't say the problem isn't annoying. It is. It can be exceptionally frustrating to try and fix a model with sorting issues. Trust me, I've been there. I feel for you. :)All that said, though, there is a workaround for nearly every kind of z sorting issue you can have (as far as static shapes go... animated ones get trickier). In any creative industry -whether it be games, or graphic design, or motion graphics, or whatever- you have to be open to change and ready to adapt. With things like this, I see a lot of people getting angry that they can't model a tree the way that's most familiar to them. There is a way of doing it. I know this for a fact because I do it. Learning how to model in ways that aren't immidiately obvious or comfortable to you is exceptionally valuable.
Please don't think I'm trying to come down on anyone. I'm not. Like I said before, I know how frustrating it is to work on a model, have it look awesome in max or maya or whatever, and then export it and be smacked in the face. I'm just trying to point out that there are ways around pesky sorting so, many times, it's not the fault of the tech but the fault of the artist.
#12
PS: My english is horrible today... sooo burnt out. Looking forward to IGC so I can kick back with a few beers and just hang out with everyone and see what goodness you have all been up to!
09/18/2005 (4:23 pm)
@Adam: It is very good to know that there are ways around these issues! =) I think the main problem that a lot of people have is that these methods are not well known, and need to be better published. With the mention of TDN, I think that might be exactly what a lot of people - including myself - need to help answer a lot of these unknown questions that frusterate people, even though the answers are right there, even as hidden as they may be. =)PS: My english is horrible today... sooo burnt out. Looking forward to IGC so I can kick back with a few beers and just hang out with everyone and see what goodness you have all been up to!
#13
They are broken, it doesn't get more simple than that.
I have tried every single way to work around this issue, they do not work.
If you have a way of making transparencies work, then please, Make a tutorial and ill eat my words, or fix the engine. Stop side stepping, either give us the information to help our selves, or fix the engine.
Every post I have seen by a GG staff members has read as "We don't care, deal with it". no help has been posted...
Sorry for the harsh tone, but this is a fundamental game engine ability that is horribly broken or complicated, and is being ignored.
09/21/2005 (5:26 pm)
@Adam deGrandisThey are broken, it doesn't get more simple than that.
I have tried every single way to work around this issue, they do not work.
If you have a way of making transparencies work, then please, Make a tutorial and ill eat my words, or fix the engine. Stop side stepping, either give us the information to help our selves, or fix the engine.
Every post I have seen by a GG staff members has read as "We don't care, deal with it". no help has been posted...
Sorry for the harsh tone, but this is a fundamental game engine ability that is horribly broken or complicated, and is being ignored.
#14
There is a tutorial on TDN (soon to be up) but the solution is usually particular to the model. There is no panacea when it comes to these issues.
(edit: note that right now I only have 3dsmax on my machine)
09/21/2005 (5:31 pm)
Email the model and I will take a look to see if I can fix it easily or guide you in the right direction. I am a little busy at the moment, but I will do what I can.There is a tutorial on TDN (soon to be up) but the solution is usually particular to the model. There is no panacea when it comes to these issues.
(edit: note that right now I only have 3dsmax on my machine)
#15
The meshes may as well be a single poly, i have posted screen shots many times. Im not even trying to do anything compclated...
http://www.garagegames.com/mg/forums/result.thread.php?qt=33329
09/21/2005 (5:43 pm)
Side note, I have even broken the models down to the very basic surfaces, pulled them all into the engine...Separately, they work fine, but when placed together (by moving them in the position) IN THE ENGINE...the same issue happens.The meshes may as well be a single poly, i have posted screen shots many times. Im not even trying to do anything compclated...
http://www.garagegames.com/mg/forums/result.thread.php?qt=33329
#16
Note: the transparency issues could use some improvement in terms of ease of use. This is a known issue, but it is not high on the list of issues to be addressed, and it is not an easy thing that one can just fix with a few minutes of work. If someone in the community wants to tackle it, they are certainly welcome to do it.
For your specific problem, I suggest that saying 'it's broke.. fix it' is not going to get you much traction.
I can help you with your specific models in terms of suggesting how to build them in such a way that they will not exhibit transparency sorting issues.
09/21/2005 (8:01 pm)
I see that you are working with lightwave.. send me the DTS and I can look at it in the showtool and I can give you some pointers on how to construct it so it does not exhibit the issues you are seeing.Note: the transparency issues could use some improvement in terms of ease of use. This is a known issue, but it is not high on the list of issues to be addressed, and it is not an easy thing that one can just fix with a few minutes of work. If someone in the community wants to tackle it, they are certainly welcome to do it.
For your specific problem, I suggest that saying 'it's broke.. fix it' is not going to get you much traction.
I can help you with your specific models in terms of suggesting how to build them in such a way that they will not exhibit transparency sorting issues.
#17
I do it all the time, and the TDN tutorial Adam is writing is based on his experiences and him and I talking about the issue and how to guide artists to look at the problem and solve it for their particular model.
Add here that my particular viewpoint is that I will always 'take the hit' and alter a model if it means more performance in the engine.. adding an easier pipeline for transparency will come at the expense of performance. It may end up that we change this particular aspect of the engine, but it is not on the short list of things to address.
So, if you want to address your problem.. please try to post the DTS, post screenshots in wireframe.. tell me what your material settings are.. help me to help you by giving me the information I need to tell you what you need to do.
With translucency, it is not a matter of doing one thing to fix it. It is often a combination of tweaking materials, altering the mesh.. altering how the model is put together, and playing with all of the above to get the right settings. The solution is often particular to the model, and that is why there is not a easy 'oh, just do this' response.
some helpful hints. If you have a model where some parts are transparent and some not, make sure the parts that are not are not flagged as transparent, as it will affect how the engine renders it and make the sorting issues more prominent. If you have a model.. make sure that the transparent pieces are linked to the model and not part of one mesh.. if a model is one mesh with transparent parts.. it will exhibit problems. Look at your model.. the problem will happen if you have large polys that intersect. The rendering is per poly and not per pixel.. so if one poly intersect another, and both are translucent.. it will render one over the other.. the solution here is to make sure you don't have large planes intersecting with each other where portions of one large plane can been seen through another large plane.
It is unfortunate that you read it that way. I do care. I want you to make the game you want to make, and I want to help to the best of my ability. The second part of the quote.. the 'deal with it' part.. is part true. This is the way the TGE renders translucent objects.. and you can fix it.. or you can ask for help in such a way that I can help you to get past this particular problem. If you don't want to do the work to make the model so it sorts right.. and just throw it in my lap to fix it.. well.. I have stuff on my plate that I have to do.. and my models sort just fine.. I can help you with yours.. but when it comes down to it, making your game work and look good is your problem. I want to help you to solve your problem, but I am not going to solve it for you.
In this case.. the translucent rendering is what it is. You can deal with it and complain.. or you can put in the effort and ask good questions and learn how to get past this issue. It is really not that hard to build models that sort correctly if you know what the issues are.
09/21/2005 (8:01 pm)
In terms of the art pipeline.. when I have made shapes with transparency, I take the time to build them so they sort right. I know it sounds harsh.. but it is the truth.. if you need it to sort right, build it so it does. I do it all the time, and the TDN tutorial Adam is writing is based on his experiences and him and I talking about the issue and how to guide artists to look at the problem and solve it for their particular model.
Add here that my particular viewpoint is that I will always 'take the hit' and alter a model if it means more performance in the engine.. adding an easier pipeline for transparency will come at the expense of performance. It may end up that we change this particular aspect of the engine, but it is not on the short list of things to address.
So, if you want to address your problem.. please try to post the DTS, post screenshots in wireframe.. tell me what your material settings are.. help me to help you by giving me the information I need to tell you what you need to do.
With translucency, it is not a matter of doing one thing to fix it. It is often a combination of tweaking materials, altering the mesh.. altering how the model is put together, and playing with all of the above to get the right settings. The solution is often particular to the model, and that is why there is not a easy 'oh, just do this' response.
some helpful hints. If you have a model where some parts are transparent and some not, make sure the parts that are not are not flagged as transparent, as it will affect how the engine renders it and make the sorting issues more prominent. If you have a model.. make sure that the transparent pieces are linked to the model and not part of one mesh.. if a model is one mesh with transparent parts.. it will exhibit problems. Look at your model.. the problem will happen if you have large polys that intersect. The rendering is per poly and not per pixel.. so if one poly intersect another, and both are translucent.. it will render one over the other.. the solution here is to make sure you don't have large planes intersecting with each other where portions of one large plane can been seen through another large plane.
Quote:Every post I have seen by a GG staff members has read as "We don't care, deal with it". no help has been posted...
It is unfortunate that you read it that way. I do care. I want you to make the game you want to make, and I want to help to the best of my ability. The second part of the quote.. the 'deal with it' part.. is part true. This is the way the TGE renders translucent objects.. and you can fix it.. or you can ask for help in such a way that I can help you to get past this particular problem. If you don't want to do the work to make the model so it sorts right.. and just throw it in my lap to fix it.. well.. I have stuff on my plate that I have to do.. and my models sort just fine.. I can help you with yours.. but when it comes down to it, making your game work and look good is your problem. I want to help you to solve your problem, but I am not going to solve it for you.
In this case.. the translucent rendering is what it is. You can deal with it and complain.. or you can put in the effort and ask good questions and learn how to get past this issue. It is really not that hard to build models that sort correctly if you know what the issues are.
#18
Yes but if you have to model an object where planes touch and things can be seen through each side, A Power Tower for example, what is your path then?
Transparency wont zsort correctly on such an object and theres no way to build it so it will. Is the only choice to model the crossbars and beams as polygons instead of Textures? That seems like a poor solution when you might need dozens (or more) of an object in a scene. My particular project requires many Power Towers and several tranformer stations, along with supports for Solar Arrays and Windmills. If I have to model all those polys, My scene is going to bog down very quickly.
Any help of pointers for this particular need are greatly appreciated.
06/11/2007 (2:10 pm)
"the solution here is to make sure you don't have large planes intersecting with each other where portions of one large plane can been seen through another large plane."Yes but if you have to model an object where planes touch and things can be seen through each side, A Power Tower for example, what is your path then?
Transparency wont zsort correctly on such an object and theres no way to build it so it will. Is the only choice to model the crossbars and beams as polygons instead of Textures? That seems like a poor solution when you might need dozens (or more) of an object in a scene. My particular project requires many Power Towers and several tranformer stations, along with supports for Solar Arrays and Windmills. If I have to model all those polys, My scene is going to bog down very quickly.
Any help of pointers for this particular need are greatly appreciated.
#19
I also experience many z-sorting problems with trees. I was told that there is a TDN article but I cannot access it since I am "only" a licensee of Constructor, Showtool and a game from GG.
Can someone please give me a few hints what is written in this article? Is it helpful? How can I make a tree without z-sorting problems?
Regards,
Frank
05/18/2008 (1:50 am)
Hi, I also experience many z-sorting problems with trees. I was told that there is a TDN article but I cannot access it since I am "only" a licensee of Constructor, Showtool and a game from GG.
Can someone please give me a few hints what is written in this article? Is it helpful? How can I make a tree without z-sorting problems?
Regards,
Frank
Torque Owner Magnus Blikstad
Try adding SORT:: before the name of your object though and see if it helps.