|
3 registered members (TipmyPip, clint000, Grant),
6,810
guests, and 4
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Depth Sort Correction
[Re: A.Russell]
#84322
08/03/06 08:09
08/03/06 08:09
|
Joined: Sep 2003
Posts: 4,959 US
Grimber
Expert
|
Expert
Joined: Sep 2003
Posts: 4,959
US
|
It's all in how you skin and UV map your model. Ole Tobiesen Ford pickup model off Acknex Site with a few modifications. Originaly the windshield and rest of the truck were seperate meshs, I merged them and reskinned the windshield. Now it's one mesh, with alpha channel skin ( 32 bit tga ) no sort issue, no flags or scripts set on the model either. This can be done time and again with models now ( with the changes done to MED) and not have a sorting issue. You should also beable to do so with other modelers that support multiple textures and they import/export properly to MDL7 ( i know it works fine with Milkshape) The key is to Skin/UV map your model to differnt skins based on transparency need. Not mixing Semi-transparent and full Opacity in the same skin. So you have in the truck above TWO(2) skins. the full opaque skin for the main truck body, and a completly semi transparent skin for the windshield. then the truck polys are UV mapped to the coorisponding skins Modified Ford truck model
|
|
|
Re: Depth Sort Correction
[Re: Grimber]
#84323
08/03/06 11:03
08/03/06 11:03
|
Joined: Mar 2003
Posts: 4,427 Japan
A.Russell
OP
Expert
|
OP
Expert
Joined: Mar 2003
Posts: 4,427
Japan
|
I took a look at the model, but I am not sure how that would work for the model in question. Here it is: Currently it is all one mesh mapped onto a singe texture with alpha transparency. Would it work if the centre stalk was mapped to an opaque texture, and the leaves all to the same texture with transparency, or what do you suggest? With your truck the glass can have a uniform transparency, but with the leaves, the alpha is meant to mask the edges of the texture.
Last edited by A.Russell; 08/03/06 11:08.
|
|
|
Re: Depth Sort Correction
[Re: mk_1]
#84328
08/04/06 04:33
08/04/06 04:33
|
Joined: Mar 2003
Posts: 4,427 Japan
A.Russell
OP
Expert
|
OP
Expert
Joined: Mar 2003
Posts: 4,427
Japan
|
Thanks MK_1, this shader from the wiki works: Code:
material right_alpha_mat { effect = " technique right_alpha1 { pass p0 {zWriteEnable=true; alphaTestEnable=true;} } "; }
action right_alpha_acc { my.material = right_alpha_mat; my.dynamic = off; }
The edges are a bit rough, but the sorting problems are gone without needing to redo the UVs and textures.
|
|
|
|