Thanks for the timely response, as usual.
![Smiley](http://mythruna.com/forum/Smileys/default/smiley.gif)
Time for today's update and ?'s post. I've created material for every part of the editor at this point
Now for questions.
Branches/roots
So, first off, I want to ask: Is it a safe bet to just merge the branches and roots sections? The tabs seem identical, aside from the presets.
I guess the settings are similar but one goes down and the other up. Often times you want different root settings than branch settings which is why they are separate.
Next is another suffix question. I saw the parameters "Segment Variation (*)" and "Taper (*)". I see that suffix around in a lot of places. What does it represent?
I don't remember exactly. More examples of where I used it might help but I suspect it's a "non-unit" or maybe indicating a multiplier.
I'm assuming "Twist (rads)" means in radians, but confirmation never hurts.
Yes, radians. So 3.14159... is 180 degrees.
"Tip joint" is something I want to clarify on as well. This parameter converts a side joint from each node into a tip joint to serve as a continuation of the main branch, correct?
In a regular L-system, you have great flexibility over how you replicate and morph things at each level. I limited this greatly to produce a simpler interface. But just branching, branching, branching makes it hard to do things like pine trees and such that essentially replicate the whole tree at each level. The tip joint is sort of a compromise. So rather than _just_ branching out when you reach the tip, the root trunk will get an additional tip joint that replicates the tree but shrunk down and with some additional tweaks (like tip rotation). It's kind of like planting a smaller version of the tree at the top of the tree... and doing that again a few times. I think I limit it or maybe I let the user limit it? I don't have the tool up so I can't say for sure.
But it lets you have tall trees. Adding a little rotation gives you some variation.
"Tip rotation (rads)" is a function that exclusively rotates joints branching from a tip joint, is that accurate?
Yeah, it rotates each new tip by that amount.
You can almost replicate something similar to what Mythruna's 'scrub' trees (the really tall but sparse ones) by having a branch factor of 2 or 3 and turning on the tip joint with very little scaling but about 90 degrees tip rotation.
LOD
LOD is something I'm gonna need lots of help with. It seems very... finicky and generally hard to understand sometimes. I messed with some of those settings and I think an unexperienced user that isn't paying attention would wreck their tree editing experience here. The abbreviation stands for Limit Of Detection, though, correct? Does this affect the tree mesh like the other settings or no? I ask because it doesn't seem to affect the triangle count
The Distance parameter seems to create a ring around the tree where it will be displayed in full detail, where getting to close to the tree will cause it to enter low poly mode if you set it high enough. That is, at least, how it behaves in the "highest" subtab. What do each of the subtabs apply to?
I understand what the mesh type parameters do to some extent, but I'm not sure how to describe the features of normal and flat poly meshes. Do normal meshes simply use triangles, while flat poly meshes always pair their triangles into quadrilaterals?
LOD stands for "level of detail". It's away of simplifying rendering if you are farther away. Each level has a distance range within which it is in effect.
At each range you can adjust settings that help control how many triangles are rendered. I don't remember what all of the settings are but for the regular hi-poly mesh then there should be a way to control the depth of branching and maybe something else to control the quality of the mesh like number of radials or something. I don't remember.
There is also the flat polygon version which renders a _greatly_ simplified version of the tree using a shader trick. Basically, instead of rendering a round branch section (lots of triangles) it just renders a quad that always orients to the camera. From far away it still looks 3D because of the lighting. You can best see this as lower quality if you set it up as the first LOD and fly up to the tree. You can see that the branches are all quads that rotate around some imaginary axes where the centers of the branches are.
The lowest level renders the whole tree as a quad that orients to the camera. It has a texture altas of the tree from four different directions and it switches to them based on the view angle. For hundreds and hundreds of trees, really far away, this looks pretty good.
Generally, I tend to have four levels of detail and I adjust the distances based on a compromise of quality and how many trees I would expect to have.
1) the highest level of detail is the full tree as I've defined it... all branches all the way down, etc.. I often set this to cut off pretty close to the tree. Conservatively, about the point where when walking you'd be able to see enough under the canopy to see the missing branches in level 2.
2) still a full mesh, but limit the branch level to 1 or 2 (where the leaves will hide the branches) and the root level to 1 or so. I may reduce the mesh quality (radials, etc.) as allowed by the cut off distance of (1). The idea is the transition should look pretty smooth at whatever change distance was picked.
3) the 'flat poly' version where all branches are just quads. This should reduce most trees down to 20 quads or so I guess... factoring in the depth limit in (2). If you can get away with it, this distance cut off should be to the point where it's hard to see the 3D-ness of the leaf ball.
4) the imposter "sprites" as described above and this is the final level and goes out all the way until you want the trees to disappear.
I spend a lot of time playing with those parameters with a 10x10 forest with maximum position variation and a little rotation, leaning, and scaling variation.
In Dragonfly Odyssey I guess I was rendering thousands of trees this way... most of them flat imposters at any given time because of the distances.