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

5 posts Page 1 of 1
Steve_Yorkshire
Posts: 324
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Mon Mar 11, 2019 10:32 pm
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.
Image

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

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

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

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

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

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:
suncaller
Posts: 21
Joined: Mon Apr 09, 2018 1:03 am
by suncaller » Mon Mar 11, 2019 11:19 pm
Very useful, thanks for sharing.
Duion
Posts: 1362
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Mar 12, 2019 12:15 pm
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.
Steve_Yorkshire
Posts: 324
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Wed Mar 13, 2019 6:44 pm
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.

Image
Duion
Posts: 1362
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Mar 13, 2019 9:28 pm
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/progr ... o-remover/
It also describes why it is necessary and what is happening in the rendering.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests