1 registered members (AndrewAMD),
684
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
TGA Alpha Channel with model
#134523
06/07/07 16:05
06/07/07 16:05
|
Joined: Nov 2006
Posts: 141 South Africa
quasarchangel
OP
Member
|
OP
Member
Joined: Nov 2006
Posts: 141
South Africa
|
I have a tree model with a tga file which has an alpha channel so that the leaves on the tree can be displayed properly. In my level I have a large terrain with this tree model all over it, but, it seems, that when I get close to the center of the terrain, the trees get clipped away as if the were behind the terrain and you can only see the parts of the trees that stand out above the terrain. How can this be fixed? I've tried using the d3d_entsort=2 setting, but theres no difference.
I've noticed that in Oblivion when editing the textures for the models you have to have a normal map file for each texture which helps to get the models to display correctly. Without it the same thing happens as I am experiencing above. Is it possible to do the same thing in 3dgs? If so, can someone help me get a shader or whatever is needed for it?
God DID give us a manual on how to change this world...
|
|
|
Re: TGA Alpha Channel with model
[Re: quasarchangel]
#134524
06/07/07 16:12
06/07/07 16:12
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
You don't need to normal-map your tree. Though it would be a really nice effect, it would slow down ALOT.
Look on the wiki for an improved overlay shader. You simply need a shader that enables alphaTesting
xXxGuitar511 - Programmer
|
|
|
Re: TGA Alpha Channel with model
[Re: xXxGuitar511]
#134525
06/07/07 17:12
06/07/07 17:12
|
Joined: Nov 2006
Posts: 141 South Africa
quasarchangel
OP
Member
|
OP
Member
Joined: Nov 2006
Posts: 141
South Africa
|
Thank you. I had no idea what it was called and I looked over it in the Wiki.
God DID give us a manual on how to change this world...
|
|
|
Re: TGA Alpha Channel with model
[Re: xXxGuitar511]
#134526
06/08/07 03:56
06/08/07 03:56
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
You don't need to normal-map your tree. Though it would be a really nice effect, it would slow down ALOT.
No you dont need to normal map anything. But what is your basis for saying it would slow down "ALOT"? Have you done tests? Because in my own tests such things can be done provided you are careful about LOD and such.
To answer the above question , the problem is that the engine automatically turns on transparency if there is a 32-bit tga skin. I consider this an engine flaw.
For a masking effect you can use a material that sets these render states:
zenable=true; zwriteenable=true; alphablendenable=false; alphatestenable=true; AlphaRef=<128>; AlphaFunc=Greater;
|
|
|
Re: TGA Alpha Channel with model
[Re: Matt_Aufderheide]
#134527
06/08/07 05:18
06/08/07 05:18
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Well, since he said he had an entire forest full of trees (which even with a good lod can slow down a bit). Normal mapping all those tree's would [most likely] create a big slowdown...
It of course depends on your system, but thats just a general statement...
xXxGuitar511 - Programmer
|
|
|
Re: TGA Alpha Channel with model
[Re: xXxGuitar511]
#134528
06/08/07 14:39
06/08/07 14:39
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
Normal mapping all those tree's would [most likely] create a big slowdown...
Maybe.. but do you really know? Dont make assumptions about performance unless you have done tests. Games like Farcry and Oblivion for instance use normal mapping on all the tree trunks (not the leaves)...and performance is fine.
There is a such a thing as shader LOD as well, and one can turn off the normal mapping shader at a certain range..
|
|
|
|