8 years ago
Animated Trees
I have some questions about the trees and how to keep the animations after editing the uv map or making a new tree. I recently found the wisteria tree in debug and made it bigger. The problem is o...
"SimGuruModSquad;c-15944902" wrote:
Hey there @zap608,
Swaying tree animation actually uses the model's vertex color data to do leaf rustle. It does not use skinning in the sense of setting up bones and weights the way typical objects do.
So the short answer is that when cloning a tree, you cannot lose the any of the vert color data. I suspect whatever tool(s) you are using to do the cloning is losing this data, since this setup is somewhat unique to trees.
Technical details:
The vertex color layout for trees is as follows. Green and Blue are ignored for channels 1..4:
Color 0 RGB Surface color tint
Color 1 R Rustle direction X
Color 2 R Rustle direction Y
Color 3 R Rustle direction Z
Color 4 R Rustle phase (game generates two wind scales that change over time, this term interpolates between the two)
The pipeline keeps the rustle information in a vertex color format for what the game engine will load, which means it’s in the range 0 and 1. The shader remaps this into a 0.5 to -0.5 range before scaling it and applying the offset to the leaves. Note that these directions are clamped but not normalized (they’re allowed to be different lengths). The WindMagnitude material parameter acts as a scaling factor.
Hope that helps,
SGMS
Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.
4,835 PostsLatest Activity: 2 days ago