Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 684 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TGA Alpha Channel with model #134523
06/07/07 16:05
06/07/07 16:05
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline 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 Offline
Expert
xXxGuitar511  Offline
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 Offline OP
Member
quasarchangel  Offline 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
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

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;


Sphere Engine--the premier A6 graphics plugin.
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 Offline
Expert
xXxGuitar511  Offline
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
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

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..


Sphere Engine--the premier A6 graphics plugin.
Re: TGA Alpha Channel with model [Re: Matt_Aufderheide] #134529
06/08/07 20:23
06/08/07 20:23
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Quote:

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..




No doubt you're right about the LOD which is a logical explanation but I think you can't compare the FPS with games on an 'average' pc to a game such as Oblivion on the PS3 by many reasons. If you're refering to Oblivion on PS2, then I agrea with your statement. Just a remark

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1