Jump to content
Sign in to follow this  
Stephen1918

Alpha problems with terrain objects

Recommended Posts

Does anyone know what causes this?

 

I'm playing with Wrench's Palestine terrain. I don't have the desert.cat file and I'm using FE Gold, so I've been piecing it together from from the wwiVerdun.cat and various downloads from SF. I just noticed that often, far objects show right through the trees. I cannot figure out how to fix it. It doesn't happen in any of my other First Eagles installs. Has anyone come across this problem before?

 

post-67404-0-91272400-1386270694.jpg

post-67404-0-47496500-1386270706.jpg

post-67404-0-10945400-1386270718.jpg

Share this post


Link to post
Share on other sites

Stephen, check your terrain's _data.ini and look for these lines:

 

[solidObjectTextureMaterial]
EffectShaderName=terSolidObject.fx
DepthBufferCheck=TRUE
DepthBufferWrite=TRUE
RenderedInOrder=FALSE
AlphaTestEnabled=FALSE
CullMode=CLOCKWISE

LightEnabled=TRUE
SpecularEnabled=FALSE
EmissiveEnabled=FALSE
FogEnabled=TRUE
AmbientColor=1.000000,1.000000,1.000000,1.000000
DiffuseColor=1.000000,1.000000,1.000000,1.000000
ZBufferOffset=0.000000
BlendOp=ONE
NumTextureStages=1
TextureStage[01].TextureName=
TextureStage[01].MipMap=TRUE
TextureStage[01].FilterEnabled=TRUE
TextureStage[01].StageColorOp=TEXTURE_MODULATE_DIFFUSE
TextureStage[01].StageAlphaOp=NO_OP

[AlphaObjectTextureMaterial]
EffectShaderName=terAlphaObject.fx
DepthBufferCheck=TRUE
DepthBufferWrite=FALSE
RenderedInOrder=TRUE
AlphaTestEnabled=TRUE
CullMode=NO_CULL

LightEnabled=TRUE
SpecularEnabled=FALSE
EmissiveEnabled=FALSE
FogEnabled=TRUE
AmbientColor=1.000000,1.000000,1.000000,1.000000
DiffuseColor=1.000000,1.000000,1.000000,1.000000
ZBufferOffset=2.0
BlendOp=BLEND_SRC_ALPHA
NumTextureStages=1
TextureStage[01].TextureName=
TextureStage[01].MipMap=TRUE
TextureStage[01].FilterEnabled=TRUE
TextureStage[01].StageColorOp=TEXTURE_MODULATE_DIFFUSE
TextureStage[01].StageAlphaOp=TEXTURE_BLEND_TEXTURE_ALPHA
 

marked in red are my settings that work ok in various SF2 titles

 

be warned that still alot of alpha-type objects (usually -trees) will render in wrong order but that's the engine's fault and we have to deal with it

Share this post


Link to post
Share on other sites

Stephan, if you have SF1 (1stGEn), you can use it's desert cat, placed in the main core installs /Terrains folder.  To bring it up to FE2/SF2 standards is fairly simple. You'll need to extract the data ini and make the changes for the DX10 shader statements. And of course, have a /Desert sub-folder for the edited inis in you FE/FE2 install

Share this post


Link to post
Share on other sites

Stary - Thanks, that helped. I also discovered that the threshold numbers at the top of the data file affect the overlapping too. You have more problems if the numbers are too high, these are working for me now. Ground object that use a TGA skin are still causing problems, but all the terrain objects are behaving correctly. 

 

[TerrainMesh]
TextureThreshold=0.80
LowDetailMeshThreshold=0.50
MedDetailMeshThreshold=0.30
TileToHeightGridRatio=4
RenderMeshVertexCount=4096
RenderMeshIndexCount=6144
SolidObjectVertexCount=4096
SolidObjectIndexCount=6144
AlphaObjectVertexCount=2048
AlphaObjectIndexCount=3072

 

Wrench - Thanks. Unfortunately, I don't have SF at all, which is why I'm doing it this way. Beside problems with the rendering, my biggest problem is that I don't have any of the stock terrain objects or TODs, but I've been able to find downloads for almost everything so far. 

Share this post


Link to post
Share on other sites

do you have of the original cats? (VietnamSEA, GermeanyCE??) It works the same with them, too. Maybe even IsraelME -- all the terrain object buildings and such are resident in ALL the Original 4 Terrains ™

Edited by Wrench

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..