Rick Posted March 28, 2010 Share Posted March 28, 2010 The leafs from some of the Dexsoft trees seem to have a black background instead of transparent. Is there something I need to do in the shader to make the background transparent for the leaf part of the texture? I notice the trunk and leaf are part of 1 texture file that the model uses, and the dds file is transparent. This is what my mat file looks like, maybe I'm doing something wrong here: texture0="abstract::oak1_c.dds" texture1="abstract::oak1_n.dds" shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular.frag" Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted March 28, 2010 Share Posted March 28, 2010 I suspect you probably want to use the following Rick: texture0="abstract::oak1_c.dds" texture1="abstract::oak1_n.dds" shader="abstract::mesh_diffuse_bumpmap.vert","mesh_diffuse_bumpmap_specular_alphatest.frag" I'm assuming you have the specular map embedded in the alpha channel of the normal map. If not then you need to do so or if not using specular then use the appropriate version of the frag file. It's the alphatest your missing which acts on the diffuse texture giving you the transparency. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted March 28, 2010 Author Share Posted March 28, 2010 hmm, if I do that the model viewer crashes. log says Error: Shader file "mesh_diffuse_bumpmap_specular_alphatest.frag" not found. Wouldn't that be part of the shaders with the engine? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted March 28, 2010 Share Posted March 28, 2010 Yes, it's a standard frag file supplied in shaders.pak Have you got a path problem ? Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted March 28, 2010 Author Share Posted March 28, 2010 Ahh, no abstract:: in from of the frag! That worked. Thanks Pixel! Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted March 28, 2010 Share Posted March 28, 2010 Opps ... my bad! Missed that when I pasted it in to your mat file contents. Anyway, glad its working. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Gandi Posted March 30, 2010 Share Posted March 30, 2010 The leafs from some of the Dexsoft trees seem to have a black background instead of transparent. Is there something I need to do in the shader to make the background transparent for the leaf part of the texture? I notice the trunk and leaf are part of 1 texture file that the model uses, and the dds file is transparent. This is what my mat file looks like, maybe I'm doing something wrong here: texture0="abstract::oak1_c.dds" texture1="abstract::oak1_n.dds" blend=alpha shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular.frag" that should also do it if you got the alpha channel used in the leaf texture.. alphatest sometimes got rough edges as it just skips the pixel with an alpha lower a specific value (dont know how much this was atm) Quote Link to comment Share on other sites More sharing options...
Kazar Posted March 30, 2010 Share Posted March 30, 2010 that should also do it if you got the alpha channel used in the leaf texture.. alphatest sometimes got rough edges as it just skips the pixel with an alpha lower a specific value (dont know how much this was atm) Opacity mapping without skipping half of the alpha-channel values works without _alphablend shaders? Quote Core i5-750 - GTX 460 1GB - 12GB DDR3 - Win 7 x64 Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 31, 2010 Share Posted March 31, 2010 This is part of one of the .mat files I use with thier palm trees pack. specular=0.25 cullface=0 shader="abstract::mesh_diffuse_bumpmap_sway.vert", "abstract::mesh_diffuse_bumpmap_specular_alphatest.frag" shadowshader="abstract::mesh_shadow_sway.vert","abstract::mesh_shadow.frag" Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.