Jump to content

Blending


Alienhead
 Share

Recommended Posts

Greets! back for my nightly question lol..  After a day of coding and art working I always have something to ask.   This time its regarding alpha blending. I'll post the pic to better explain -

 

blend.png

You may notice the brick of hay,  the ends are jaggey due to the Alpha Masking shader..  Normally, as I'm sure you know , most would prefer to alpha blend this instead of masking.  I guess this is a long shot but I'll ask anyways, are there alpha blending capabilities in LE ?  Going by the demos and the trees that come with the engine they all seem to be masked, so im guessing no?  

Oh to save posting another thread - i setup my vegi trees identitcal to the pine tree default in the engine, and still no shader sway movement on the limbs/tree leaves.  Do i need a special uv map layer or something to get it working ?

Oh, one last thing - today I created a plane in max, Im using it for distant particle effects so my routine is loading / copying new instances of the plane and script through run time. I noticved today that each of these are sharing the same variables and what not.  Even though I have them loaded up in entirely different scenes. Im wondering if that is nature behavior or have I overlooked something. 

Link to comment
Share on other sites

Leadwerks can do that. You want to make sure your hay texture is a png rather than a jpg because apparently jpgs don't carry alpha information. The "discard" technique in the diffuse + alpha shader is what creates that hard alpha falloff. I think I understand what you're saying and if so then you might also try opening the hay material and setting the blend mode to alpha and checking the Z-sort box (then save). My usual move is to do this then replace the "discard" line with a mix and a mask. But you can see a smooth alpha blend in the picture below (though actually I did use a mask on that one). That may work for what I think you're trying to do (but you'll notice it eliminates the shadowing, which can then be replaced with a Blinn-Phong. I can help you out with it if you want).

438394202_alphablend.thumb.jpg.1b06adf49d917da2741bbabbb7a601d3.jpg

 

Also (shameless self-promotion) I put up a bunch of shaders on my blog. There's some swaying trees and masks and blending etc. Maybe you'll find some principles there for some of these kind of shader problems.
 

 

 

  • Like 1
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...