Steve_Yorkshire Posted March 11, 2019 Share Posted March 11, 2019 So I've been playing around with the ForestEditor, trees/foliage and the WindEmitter. This is when I noticed that editing normals on your foliage/leaves affects how the model responds to wind.First up, editing normals. Why you might want normals editing:You might want to edit normals on things like grass, or other objects that point upwards so that the shadows/shading looks more uniform.Here's a recap of that. Edited normals on the left, standard normals on the right with the nasty shadowing.How to do it (in Blender):In properties, select the "Data" button, which brings up vertex groups and data about the mesh. Under "Normals" enable auto-smoothing and find the big button lower down called "Add Custom Split Normals Data" and press that so it says "Clear Custom Split Normals Data". Next go to properties buttons and select "Modifiers" button. Choose "Add Modifier->Normal Edit". To get the effect in the image above where the shadows are uniform and the mesh does not have light and dark streaks you want to position another object above the mesh, while setting the Modifier to "Directional", the target to the object above, and enabling "Parallel Normals" so they all point directly upwards.Whilst that is great for grass, I discovered that testing this method with trees had unexpected consequences to how the mesh was affected by the WindEmitter. The main effect is on the "leaf flutter", which I shall from now on describe as "waggle".Gif1: No edited normals. This is a standard export, note the slight breaks in the centre of the leaves (most visible bottom and bottom right).Gif2: Edited normals are set to RADIAL with no target. Notice the broken verts are fixed and the lighting is more soft/uniform over the top of the mesh - but the waggle of the leaf edges is very much reduced.Gif3: Edited normals are set to RADIAL with a target BELOW the mesh (at origin where the tree trunk start). Notice the lighting is more soft/uniform - and the waggle at the leaf edges is back.Gif4: Edited normals set to DIRECTIONAL with a target high ABOVE the mesh. Notice the lighting is very uniform over the whole mesh - but that the leaf edge waggle is even more reduced than with Gif2.Gif5: Edited normals set to DIRECTIONAL with a target high ABOVE the mesh and PARALLEL NORMALS activated, same as I did for the grass in the first image (left side). Notice the lighting is very uniform over the whole mesh like in Gif4 - but that the leaf edge waggle has almost completely stopped and the only movement is from the branches rising and falling in the wind.So, there you go. If you mesh faces are pointing vertically it's not so bad, but if the edge is pointing upwards (like in grass) you will get the bad shadowing. As a trade off between wind waggle for leaf edges and uniform shadowing of the mesh --- however if you use Gif 4 which has the nicest shading, you can get your waggle back by increasing the Mesh's data's in the ForestEditor by setting "detailAmp" (default ~0.1) to much a higher value like 0.6, 1.0 or even higher.This has been a public service announcement on behalf of indiedev. :lol: Quote Link to comment Share on other sites More sharing options...
suncaller Posted March 11, 2019 Share Posted March 11, 2019 Very useful, thanks for sharing. Quote Link to comment Share on other sites More sharing options...
Duion Posted March 12, 2019 Share Posted March 12, 2019 I always add the leaves to a vertex group, then add a "normal edit" modifier apply it to the vertex group previously assigned, so you get the leaves only and then apply a radial modifier and select an object at the bottom of the tree as point to use, I use the node "base01" as I place all the nodes at coordinates 0 0 0. You can also tweak the direction by moving the node up or down. Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted March 13, 2019 Author Share Posted March 13, 2019 Found something interesting;The colour of your alpha affects how the leaves look - probably due to the edges getting rendered, however it also effects the overall colour/look when alphaRef is very high.1: Black background for the alpha gives the most definition to individual elements and thus slightly darker all round colour.2: A darkened coloured alpha representative of a dark part of the leaves gives a softer look to the overall tree.3: A mid coloured alpha based on the darker part of the leaves gives a brighter colour and an overall softer look to the tree. Quote Link to comment Share on other sites More sharing options...
Duion Posted March 13, 2019 Share Posted March 13, 2019 Found something interesting;The colour of your alpha affects how the leaves look - probably due to the edges getting rendered, however it also effects the overall colour/look when alphaRef is very high.That is one of the basics in foliage modeling, you need to fill the alpha with similar colors before cutting it out and making it transparent. The effect is called a halo and I found a tool that automatically fixes your textures: https://www.reinerstilesets.de/en/programme/halo-remover/It also describes why it is necessary and what is happening in the rendering. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.