Jump to content

ForestEditor Wind And Editing Normals Info [WARNING 12mb of gifs]


Steve_Yorkshire

Recommended Posts

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.

editedNormals.jpg


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).

windNoCustomNormals.gif


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.

windRadialNoTarget.gif


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.

windRadialTargetBelow.gif


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.

windDirectionalTargetAbove.gif


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.

windDirectionalTargetAboveParallel.gif


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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.


lIlSKtA.jpg

Link to comment
Share on other sites

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.

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.

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...