Jump to content

Dexsoft trees leaf issue


Rick
 Share

Recommended Posts

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"

Link to comment
Share on other sites

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.

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

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)

Link to comment
Share on other sites

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?

Core i5-750 - GTX 460 1GB - 12GB DDR3 - Win 7 x64

Link to comment
Share on other sites

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"

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...