Monday, December 14, 2020

Realistic Foliage Pack 2 "Trees" for Unreal Engine

 

Realistic Foliage Pack2 “Trees” 

Available as of Christmas Day on the UE4 Marketplace. Below find some detailed support about the foliage pack. Watch the demo video here:


Also make sure and check out the  "Bushes" Foliage Pack!:

About:

This UE4 Asset Pack contains 20 individual meshes representing 5 common species of trees and 5 unique indoor plant pots. Each tree species includes 3 procedural variations allowing you to create forests or large groupings without obvious repetition.

These trees are meant to fill the gap between high poly “Cinematic” models and lower poly gaming/VR assets. All “Hero” LOD’s are less than 20K polys with most below 15K and several below 10K. These models are ideal for architectural visualization but also most game environments.

There are Demo levels for each tree and a “Library” Level containing just the core content. Note that the staging environments for the Demo Levels are for demonstration purposes only and contain a few additional assets from the UE4 Starter Content and Content Examples. Each Demo Level also contains the UE4 Mannequin for scale reference.


*A Note About Foliage Instancing with Ray Tracing: 

If you plan on using the foliage assets with a Ray Tracing version of the Unreal Engine, at this time I recommend disabling "Cast Ray Traced Shadows" on your light source if you are planning to use the trees with Foliage Instancing. This will result in the use of Cascading Shadow Maps. There have been numerous posts since the start of RTX regarding issues with Foliage Instances and it seems yet to be fully resolved.

For an in-depth explanation of the problems and solutions regarding Ray Tracing and Foliage Instanced Static Meshes, please refer to my more recent post here. It's a bit long-winded but I think it will make many things clear if you have questions.

 Be aware that the renderings below are all from ver. 4.18 (no ray tracing) in an attempt to show the "worst case scenario".
Also note that you can choose whether to set the skylight to 'Stationary" or "Moveable" and this has a dramatic effect on the appearance of the foliage. I prefer the look with the skylight set to Moveable/Dynamic but other factors may determine this for you. In many of my scenes the skylight is set to Stationary but I find this leads to shadows/shading that are too dark. You will no doubt be importing the foliage into your own scene and will set the lighting as needed there rather than inheriting the lighting scheme from any of my demo scenes.


Here are a few shots from the asset pack:

(Note: All pictures and videos in this blog can be clicked on for larger versions)









Meshes:



1.       Coconut Palm



2.       Aspen



3.       Honey Locust



4.       Schefflera (Indoor)



5.       Spruce (Including winter snow version via separate material)




6.       Pots: 5 individual models, can be used with or without a tree.



For the Spruce tree there is a separate winter Snow Material, and though the mesh is the same as the summer version this can be considered a separate tree.

LODs:

Each set of trees contains seamless LOD’s that reduce to 3D cross-hatched planes (Front, Side and Up facing) plus an ultra low poly trunk. The exception is the indoor Schefflera tree that does not reduce all the way down to the cross-hatched planes since it is not meant for foresting. All models contain 4 LOD’s except for the Spruce trees which have 5. The final LOD for the trees is typically close to 25 polys (except the Schefflera as noted).

Here is a sample video showing the typical LOD's for one of the Aspen trees in the collection:


Here is another sample video showing the LOD's on one of the pots in the collection:



 All mesh models have custom UVW channel 2 layouts for baked shadows. Here is a sample of the LOD0 layout for one of the Honey Locust trees:



Materials:

There are a total of 3 Master Materials and 26 Material Instances for the core content of the asset pack.

1 Master Material for all the trees, 1 Master Material for the final Cross-Hatched planar LOD’s and 1 generic Master Material for the plant pots.

Several other materials, notably Landscape materials, are used for each staging environment. The staging also includes slightly modified versions of materials from the Starter Content and Content Examples where needed. You are welcome to use these if you so desire but they are not integral to the trees and pots themselves.

The FoliageMaster2 Material is the master material for all the trees which then use their own Instance based on this. Except for the final, planar LOD, this is an Atlas Material. There are 2 materials for the final, planar LOD version each tree. The original Atlas Instance from the full 3D mesh version as it is used on the trunk and an Instance of a Cross-Hatch Master Material. Each Instance of the “X-Hatch” Material is unique to each mesh model to match the shape and appearance of that particular tree variation.

 

Special Material Parameters, "Sub-Color":

The FoliageMaster2 Material includes a set of sub-routines called “Sub Color”. This enables additional features for some of the trees which can benefit from some localized, per-Instance Color variations. For example, the Aspen tree colors can by randomized for Fall colors trending toward yellow and red hues. With the Palm and Spruce trees, “Sub-Color” can be set to a brown hue resulting in the appearance of dead or dying areas on some of the fronds. The areas of “Sub-Color” variation are declared using either the Mask included with the Roughness, Alpha and Mask texture (the Mask declares just the “Leaf” portions of every tree) or through the Blue Vertex Color channel which has been set in the mesh for localized regions on some of the fronds. The Sub-Color routines can also be used for controlled, per-Instance variations on any tree if desired. Though there is already a Material Function included in the MasterFoliage2 material for this, the specific color of the variation cannot be controlled by the user with that function.

When using Sub-Color on any of the trees, be aware that the final Cross-Hatch LOD does NOT have any Blue painted vertices and so localized sub-colors declared using the Blue Vertex Channel checkbox will not translate over. When use of the Blue Vertex Channel is disabled, the effect uses the Mask texture to apply the effect to all the “leaf” portions of the trees in both the full 3D LOD’s and the Cross-hatched LOD. Just make sure and set the sub-color parameters identical across both Materials.

Below are a few examples of the kind of variation that can be achieved using the "Sub-Color" property:

A sample palm frond with no "Sub-Color" material property variation

The same frond with "Sub-Color" variation configured using the blue vertex channel in the mesh

The Spruce trees with no Sub-Color variation applied

The same spruce trees with Sub-Color variation applied using the blue vertex channel

The same trees again with Sub-Color applied via the default Mask texture (blue vertex unchecked)

The Spruce trees with modified Sub-Color making Blue Spruces



A normal summertime Aspen forest scene

The same Aspen forest using Sub-Colors to mimic a fall season scene



Here is an external link to a detailed video explanation (with audio descriptions) of the Material "Sub-Color" parameters and how they work:

Video: RealisticTrees_SubColor Parameters Explained


Wind:

Wind is supported in the FoliageMaster2 Material on all the trees through the Red Vertex Color Channel with parameters for Size, Speed and Strength.

Here is a demo video on the Wind Parameters as used in the collection:



Collision:

Collision is supported using the Simple primitives method provided for in UE4. All the trees have Capsule collision around the trunk allowing you to move through the leaves.

Inside the red outline you can see the green Capsule collision primitive shaped to encompass just the trunk on this Spruce tree

Another Simple Collision using 2 capsules to best match the trunk of one of the Palm trees



Material Parameters Exposed:

Diffuse – Texture, Tint, Output, Color Variation per Instance

Emissive – Amount

Normals – Texture, Intensity, Flip Green

Roughness – Texture, Invert, Intensity

Specular – Amount

Sub-Surface – Intensity

Wind – Size, Speed, Strength

“Sub-Color” – (See above) localized random variation per instance

 

Textures:

All Atlas textures are at 4K resolution. Cross-hatched 3D planar version textures are 1K except for 2 of the layouts which happen to fit nicely into a 1024 x 512 texture size.

The “RAM” texture contains separate channels for “Roughness” – Red, “Alpha” –Green, and a “Mask” (used by the color variation Material Functions) – Blue. This setup allows a single master material to be used for all the trees regardless of their unique requirements.

Here are some examples of the "RAM" texture used on the Aspen trees in the Atlas material:


Red Channel mask used for Roughness

Green Channel mask used for Alpha cutout

Blue Channel mask used to control color variation on only the leaves


A similar mask texture is used on the final, LOD3 Cross-hatched Material but Roughness has been replaced by an additional mask used to make adjustments to the Up-facing plane on the cross-hatched planes that make up the canopy of the tree on this ultra-low poly LOD version of the mesh.




Honey Locust Tree. The Final LOD Cross-Hatched Texture Mask ("MAM") 



A breakdown of the Mask channels for the Honey Locust Tree Cross-Hatched Final LOD texture seen above:

Cross-Hatched Final LOD Texture mask: Red Channel = Up-facing Polygon Mask

Cross-Hatched Final LOD Texture mask: Green Channel = Alpha Mask

Cross-Hatched Final LOD Texture mask: Blue Channel = Leaves Only Mask


Providing a separate Up Facing mask allows you to control this polygon independently of the rest. Facing upwards, it often receives a bit more light intensity the the rest. With a separate mask you can adjust this polygon to match the rest of the tree in any given lighting scenario. The separate Blue Channel is used by the Sub-Color routines where needed so that only the "Leaf" portions of the tree are affected by custom color adjustments, not the trunks and branches.

I'll also note here that the Normal texture map for these final, cross-hatched LOD's has been rendered from the "Render to Texture_LevelBP" setup in the Engine Content folder. This produces a World Space Normal texture map that needs to be converted (in the Master X-Hatch Material) to Local coordinates. Hence the Normal texture maps for the planar tree versions look different than you might expect.

There are a total of 99 textures. 82 are unique to the core foliage asset pack content and 17 are from the UE4 Starter or Example Content and are merely for the staging environments and are not integral to the core foliage.

 

No comments:

Post a Comment