carlos.lozano Posted June 2, 2014 Share Posted June 2, 2014 I've created a world with a object terrain. The problem is in the far distance, doesn't work the transparent texture. Only seen when the LOD's are loaded, in the near distance. I've tried different combinations of materials, dds and png's with transparency but with the same result. In the pictures you can see far distances in the ground does not load texture transparency. Up close, when the LOD's are loaded any problem. Thanks in advanced Link to comment
ulf.schroeter Posted June 2, 2014 Share Posted June 2, 2014 ObjectTerrain materials are not designed for supporting transparency. Link to comment
steve.learmonth Posted June 3, 2014 Share Posted June 3, 2014 Is there any technical reason for that? We had the same issue but in our case we were able to get transparent terrain working with only minor changes to a couple of the default terrain shaders. Perhaps it could officially be supported? We use transparency for areas where we have no terrain, and for areas where we want to view both the terrain surface (semi-transparent) and underground data. Link to comment
ivan.cuevas Posted June 3, 2014 Share Posted June 3, 2014 Steve, could you share those minor changes? Link to comment
steve.learmonth Posted June 3, 2014 Share Posted June 3, 2014 We're using an older SDK, but I *think* it's mainly just a case of changing instances of s_frag_color = half4(color * s_light_color.xyz,1.0f); to s_frag_color = half4(color * s_light_color.xyz, diffuse.w); i.e. use the alpha channel instead of 1.0f for the fragment color in terrain\fragment_base_*.shader (depending on which shader passes you're using - for us it was just light_world and ambient) You might also need to change your terrain material blending options to whatever is most appropriate (e.g. <blend src="src_alpha" dest="one_minus_src_alpha"/>) Not sure why it forces alpha to 1.0 by default but there is probably a reason... Unigine crew? Link to comment
ivan.cuevas Posted June 3, 2014 Share Posted June 3, 2014 Working! Many thanks Steve. Not sure why it forces alpha to 1.0 by default but there is probably a reason... Unigine crew? I want to know too :) Link to comment
Recommended Posts