1. Stuck, Having problems with creating your mod? Let us help you: Mod Support

[Tutorial] Custom normals for vegetation - Blender

Discussion in 'Content Creation' started by LJFHutch, Jun 9, 2016.

  1. LJFHutch

    LJFHutch
    Expand Collapse
    Environment Artist
    Staff Member

    Joined:
    Aug 4, 2012
    Messages:
    657


    So here's a real quick tutorial on how I did the vegetation in the recent posts to the Italy WIP thread, if you haven't seen it you can view it here: http://www.beamng.com/threads/italy-progress.24505/#post-379088

    This is an enormous improvement to the vegetation. So far I've only done quick mockups but it's really impressive.

    Before I start I'll tell you how it works. Essentially we take one object (our mesh) and tell it to get new normals cast from a second object. So instead of your face pointing at 90 degrees it points away from the second object, labeled "target" in this messy pic:



    With this you can make your polygons point one way but receive light from another, this is incredibly useful because in doing so you can make "smooth" groups of polies. With vegetation we're using flat panels and trying to represent dense clusters of hundreds of thousands of complex tiny leaves and twigs, this lets us make 10 disconnected polygons pointing all over the place behave like a single cluster of complex objects.

    First up, create a vegetation clump (here I've made an ugly bunch of squares but anything will work) and set auto-smooth to enabled in the data panel:



    Second, create any object, I used an arrow (the only thing we'll be using is it's origin point). I find it works best if you position it behind the object:



    Next add a normal edit modifier:



    Now set a target for the modifier:



    So it's working, keep in mind you can also choose how powerful the effect is, I've set it to 100%.

    Now make a duplicate object in the same location and hit apply. You can now use this and make a heap of copies to build a tree:



    Depending on the shape, texture and desired result you can leave it there or duplicate your final result (so you can still make changes later) and repeat the process to smooth out the tree even more. Here I've set it to a low amount to subtly smooth it some more:



    You can go right up to just having a ball:



    Anyhow, here's what it can do, the end result is on the left and without any of this you'll get what's on the right:



    I've also attached the blend file so you can see how it works.

    I hope this helps, good luck modding :)
     

    Attached Files:

    #1 LJFHutch, Jun 9, 2016
    Last edited: Jun 9, 2016
    • Like Like x 15
  2. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,743
    Your guys generosity is simply mind blowing.
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice