Double sided dts polygons rendering error
by James · in Torque Game Engine Advanced · 05/08/2009 (10:42 am) · 3 replies
Or as I like to call it - "Double Trouble"
I've a mask for my player head and to avoid doubling up a the polycount by creating the interior of the mask, I've tried simply checking on "2-side" in the materials.
Here is the result:

The image on the right is a normal export with 1 sided polygons and the image on the left is with 2 sided turned on. Notice the shading error.
If anyone else has experienced this, found a fix or can provide any suggestions as to how best to correct this, I'd would greatly appreciated it.
This is in TGEA 1.8.1 and I'm exporting from 3DS Max 2009.
I've a mask for my player head and to avoid doubling up a the polycount by creating the interior of the mask, I've tried simply checking on "2-side" in the materials.
Here is the result:

The image on the right is a normal export with 1 sided polygons and the image on the left is with 2 sided turned on. Notice the shading error.
If anyone else has experienced this, found a fix or can provide any suggestions as to how best to correct this, I'd would greatly appreciated it.
This is in TGEA 1.8.1 and I'm exporting from 3DS Max 2009.
#2
As Tom points out you'll get the same shading on both sides, but you *should* get the correct shading on the front side at least. There are some things you can do with shaders to invert your normals on backfacing tris, but you'd need to dig into the procedural material stuff to get that going for the built-in materials.
Honestly though, if poly count is your concern, I wouldn't worry about it. Unless you're pushing some major triangles you're not going to gain anything by cutting those tris in half. On most modern video cards you're going to be pixel-limited, and backfacing triangles produce no pixels.
I'm not familiar enough with how the Max exporter handles materials to know what the 2-sided flag does there, but using doubleSided in the material definition has always worked as expected for me when I needed it.
05/08/2009 (5:11 pm)
Instead of clicking on 2-sided in the material, you might want to try creating a material.cs file with a material definition for your mask and set doubleSided = true therein.As Tom points out you'll get the same shading on both sides, but you *should* get the correct shading on the front side at least. There are some things you can do with shaders to invert your normals on backfacing tris, but you'd need to dig into the procedural material stuff to get that going for the built-in materials.
Honestly though, if poly count is your concern, I wouldn't worry about it. Unless you're pushing some major triangles you're not going to gain anything by cutting those tris in half. On most modern video cards you're going to be pixel-limited, and backfacing triangles produce no pixels.
I'm not familiar enough with how the Max exporter handles materials to know what the 2-sided flag does there, but using doubleSided in the material definition has always worked as expected for me when I needed it.
#3
Gerald, I pretty much decided to build the inner face for the mask anyway. In thinking it over, the "paper thin" look was not very appealing and your comment on backfacing tris is bang on. I hadn't thought of that.
I will however start looking more into the shaders. A must for normal mapping and other effects.
Thanks again :)
05/08/2009 (6:40 pm)
Thanks Tom and Gerald.Gerald, I pretty much decided to build the inner face for the mask anyway. In thinking it over, the "paper thin" look was not very appealing and your comment on backfacing tris is bang on. I hadn't thought of that.
I will however start looking more into the shaders. A must for normal mapping and other effects.
Thanks again :)
Associate Tom Spilman
Sickhead Games