Jump to content

Recommended Posts

Posted

Has anyone purchased Michael Betke's pine tree and got it working in Leadwerks 3? When I apply the trunk mat to the base of the tree a bunch of the branches also get the mat applied to it. Not sure what's going on.

  • 2 months later...
Posted

I hadn't actually imported tose trees into Leadwerks 3.0, so I couldn't say how well it worked there, but just gave it a shot in Leadwerks 3.1. I first removed the two additional LOD levels since LE currently can't handle them (a feature sorely missing, if I may say so) and then resize them. I was able to assign the three materials by dragging them to their respective parts of the tree in the preview, though this was a bit fiddly for the trunk since you can't zoom in and it's quite thin.

 

However, I still couldn't get a tree properly working in Leadwerks 3.1. I'm unable to get the leaf transparency working correctly, and the tree shadow isn't correct as well. In Leadwerks 3.0, shadmar supplied a leaf shader which discarded fragement below the cutoff which fixed that, but I couldn't get this working in Leadwerks 3.1. Now, I am actually not familiar with the intricacies of a deferred shader, so I might be doing something wrong.

 

Also, the FPS is troubling me: If I put that tree on a 256x256 terrain, with a directional light and the skybox, I'm at about 70 fps (with medium lighting, 2x AA) on a GTS450.

Posted

For leaves to be clipped on alpha you can do this :

 

In diffuse.shader, (or what ever shader is used): after :

outcolor *= texture(texture0,ex_texcoords0);

add:

 if (outcolor.a < 0.5) discard;

  • Upvote 1

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

shadmar the shader God +++++1

Programmer , Intel Quad core, NVIDIA GeForce GT 220, Windows 7 Pro, Galaxy Tab 2 ( 7" and 10"), LE2,LE3,3DWS

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.

×
×
  • Create New...