Jump to content

Silhouette Shadowing


Alienhead
 Share

Recommended Posts

Havenphillip and myself have been trying some new techniques to render full time shadowing of alphamasked materials, the ole LE veg system is fine for a few trees here and there, but when you get some 10k trees with tons of alpha planes on it and you want distant viewing without billboard clipping - the veg system slows to a crawl. Enter a new technique silhouette shadowing.  It's not full proof yet, but so far I have the process working with LUA . It needs cleaning and some optimizing but this scene was rendering at 12fps with the veg system, now it looks 100% better and rendering in the 100's.

More later!

silhouette.thumb.png.aa98aa4f689d84bccd0e3012b095dee1.png

  • Like 5
Link to comment
Share on other sites

It's quite simple actually.. You render out your tree in max or blender or whatever you use.  Front side.  You then create a 'T' plane stand, 4 polys.  Map the render to it, size it to match the tree.  Now there's several ways to control he plane, I happened to made a Tree manager that handles it for me,  I rotate the t plane to look at the main directional light, then reset it's x.z to 0.

Setting the material to alpha then using Paint.net ( which i use ) or whatever image editor,  lower the alpha layer to something around 2.4, just enough where the shader still picks it up for shadowing, but not quite enough to be visible on the map, again unless your really just looking for it.

For more complex trees you will want to add 4 more ploys to the top of the t plane with a straight down rendering mapped to it.  But for most trees you can skip this step.

Now instead of rendering 1000's and 1000's of individual alpha masked planes per tree, you are only calculating 2 to 3 plans per tree.   After replacing the LE veg layers with this method, my fps rose by 100. And if your not really looking for it, you can't even tell there fake.

This tree is over 12k polys, most of them being alpha planes.  Leadwerks really excels at high poly count, as long as you keep your surfaces down.

rend.png  ss7.thumb.png.fce5d1636a04f114f62ada87eecbf3ae.pngthick.thumb.png.9cb1423df4377f1124fc4837749299bd.png

It's not a perfect method, but it's really allowed me to build some SUPER THICK forests with full shadow.

 

  • Like 2
  • Upvote 3
Link to comment
Share on other sites

Time to share again, this week havenphillip and myself worked on ssao and a new grass veg system, complete with path carving and regrowth, I implemented a node tree type system, to handle only small areas of grass per render, in the end I was filling the 4k terrain map up with millions of grass blades with no real hit to speed, although I wasn't rendering millions at a time. :) 

 S102.png ss101.thumb.png.33e75794e08184b24ca1088b729886ee.png ss103.thumb.png.beb611f808d108c4a52a28bfdb750af6.png ss100.thumb.png.eb46203251b3a2c62e2a569fb12a7220.png

That's it for this week, next week Muddy roads and forest dirt paths.

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