Jump to content

procedural tree tests


Ernest Burden III
 Share

Recommended Posts

Earlier this year I started working on an idea for noise-deformed procedural trees. I got busy with work and put the project asside. I'm now able to put some time into it, and have some results. So far I'm working on trunks, the foliage will come later, and is actually much easier.

 

While I'm doing this in Cinema4D, the technique should work in just about any program with displacement, instancing and good noise functions.

 

The idea here is to have a decent 'base' model of one or two tree decidious shapes plus an evergreen. This single model has the abilty to be deformed infinitely by 3D noise in world space via displacement. The displacement feature in C4D allows for grayscale or RGB noise, so I'm using RGB. Eack color moves the X, Y or Z axis.

 

The trunk is based on a repeated 'tube' that is UV mapped along its length. I've mapped the colors onto the model, where you see gray is where I have the displacement de-activated by neutralizing the RGBs.

 

I made the base model by hand, as seen in the 'RAW' pass. One of the trees seen is the master, the rest are just instanced copies on the first. I randomized the height and rotation of the copies, so even the raw looks pretty good. The model uses about 1300 polygons, so a simpler version might come in handy, but this is a good start.

 

Next comes regular displacement, which does not add any polygons, just moves the existing points around, two setting show and you see the edit where it goes a little darker.

 

MED SPD applies a setting of 2 (from 0 - 6) at 50% strength to randomize the branches

 

MORE SPD applies a setting of 2 (from 0 - 6) at 100% strength to randomize the branches. As you can see it can get a bt wild, and the settings could be cranked up, or the mesh of the basic model could be subdivided (hyperNURBed in C4D terms). Also, the displacment movement is set to about 3 feet, it could be more.

 

I also could use a lower distance and a higher SPD setting for 'knottier' branches, but these are not meant for close-up stuff.

 

Note that just about everything controling these trees is adjustable and animatable. In fact, you can have the amount of displacement driven by a variable tied to distance from a camera, making more foreward trees more complex than faroff ones, dynamicly.

 

Rendering SPD adds a hit at rendertime to calc all the extra poys, but the advantage is that the extra complexity can be turned on or off with a single switch, so early passes use the base model only.

 

Its a work-in-progress but please let me know what you think:

http://www.architecturalvisions.com/temp/TREE-DISPtest-01.mov

Link to comment
Share on other sites

Don't everyone comment at once! I can't handle it!

 

OK, here's a test on one tree. The first half brings the random effect up from zero to 100%

 

The second half (which looks awful but makes the point) moves the tree 50 feet, showing how it moves through the distortion. It shows how every tree would be different by wher it in in 3D space.

 

http://www.architecturalvisions.com/temp/treeSPDtest-02.mov

Link to comment
Share on other sites

That's a really interesting setup. There seems to be a lot of effort behind it rather than just droping in a premade high poly tree, nice work.

 

I think you've really gained control over creating unique trees while being able to adjust complexity. The connection to the camera sounds interesting too. I too think that the high SPD looks too wild. Might work for a creepy winter/night shot though.

 

I'd really like to see them with some leaves...I'm assuming they'd be attached to the branches and follow their modifiers?

 

In the past I've considered starting to create some digital content for sale on the net. The idea seems simple, selling a product that takes time to create initially, but reproduction and distribution is very economical. I think Evermotion has some good quality models at low prices...something like a doller per model. Any plans to sell in the future?

 

Chuck

Link to comment
Share on other sites

the single tree is really memorizing. it reminds me of sitting on the front porch late nights when i was in school. we had fairly tall trees lining our street, that had substantial amounts of limbs and branches. when wind would make them sway back and forth, making it look like people with attached at the waist, holding their hands over their head, and swaying back and forth.

 

...but on to the topic. the concept is interesting. it is something i would expect the next generation of tree apps to address, some may be already, but i have never used one that does. i don't necessarily mean the method used to create the geometry, but the method used to simplify the geometry the further it was from the camera.

 

the mood created by the geometry of the trees is interesting, and how that mood changed relative to the displacement and speed settings you used. the first set of trees are stylized, but a the stylized shape was relatively familiar. the second pass made them bulge and twist a slight bit. it starts to change the sense of the scene. at least for me. with every pass it became a little more intense and eerie , but intriguingly interesting. i really wonder what kind of mood this might create if used in a rendering. it would have to be the right type of building, but if done correctly, might look quite striking.

 

although you might start to mentally question yourself on whether the trees were controlling the image by being to distinctive.

 

anyway, it feels like something you have had mulling around for awhile. something that would be thought of as you are working in your app, using the different features as you do on a daily basis, rather than something you stumbled onto by accident.

 

.....?? ......interested in seeing how you this project turns out in the end.

Link to comment
Share on other sites

I like the idea of a single object that modifies itself inspace. Instead of the old copy/modify, copy/modify. Thats smart. Not there yet but good idea. I wonder if you could create a noise map based on an area with more noise in the area you need it less noise far away. Guess the next step would be to have the displacement on the trunk and that is what creates the branches. Just thinking out loud.

Link to comment
Share on other sites

Hi Ernest.

 

interesting concept. i'm curious when they'd actually be used in anger though. and how does the full finished tree look? how long does it take to render, especially if you have an orchard close by to render?

 

sorry for the barrage of Q's.

 

if a product like this was on the market - a tree plugin that gives differently detailed trees at a click of a button, then it could be a seller.

 

i use VB tree at the mo. most similar, but not animatable (although i cant see why you'd want them to animate)

Link to comment
Share on other sites

I'd really like to see them with some leaves...I'm assuming they'd be attached to the branches and follow their modifiers?

 

 

That is one version that I will try, though it's actually hard. I also think it isn't needed, an overall 'ball' of folliage will work.

 

Remember--these aren't really meant to be seen as close as my little tests. The idea is to have medium to far tree objects or multiples of street row trees that can be used over and over again and not all look the exact same, and to have the variation be easily controlable

 

 

but i have never used one that does. i don't necessarily mean the method used to create the geometry, but the method used to simplify the geometry the further it was from the camera.

 

I have not yet added that 'feature' in my tests. It would use Cinema's 'proximal' shader to drive the amount of displacement, keyed to a camera or other object that could be animated. For the moment, it's enough that I know it can be done, I've never used that shader so I would have to learn how.

 

Does Max have something similar? And the 3D noises and instances that can be randomized for size/rotation while I'm asking?

 

 

anyway, it feels like something you have had mulling around for awhile.

 

Yes, that's how I work. I mull stuff over, ferment it in my mind and then have to wait until a time when I'm under-employed to try it out. I've been thinking about this tree idea for at least a year.

 

 

I'm curious when they'd actually be used in anger though. and how does the full finished tree look? how long does it take to render, especially if you have an orchard close by to render?

 

It could take a while to render if you used the higher SPD settings, but the base model is going to be lower-poly than most commercial trees. But the higher detail will only be used at render, and can be turned on and off at will.

 

You would use this sort of tree for street rows, woods set around and behind buildings, especially when you need to see them from above. For both branches and leaves there would be no maps, either, just noise patterns.

 

A simplified version would be good for far off, where you hardly need branches anyway.

 

 

I have pondered the idea of not even 'posing' the branches and letting the noise do it all, but it can get quite wild looking, and the non-displaced version doesn't look like a tree, just a pole.

 

 

if a product like this was on the market - a tree plugin that gives differently detailed trees at a click of a button, then it could be a seller.

 

Perhaps so. But this this so far is built upon a series of Cinema features that I would have to make a custom version for each app. I could. I'll think about it.

 

Right now I want to get the RGB noise scaled and attenuated more to my liking and see just how good I can make it.

 

If anyone can think of a test I should do but haven't, let me know.

 

Thanks!

Link to comment
Share on other sites

Ernest.

 

Interesting test but how are you going to attach the leaves to the branches.

 

Deformation is far to much at the moment looks a bit like a fire,

The thing about trees is that they tend to be very high poly count, so I can not see how doing it this way will help matters. spd is a high poly thing.

 

Lee

Link to comment
Share on other sites

Interesting test but how are you going to attach the leaves to the branches.

 

Deformation is far to much at the moment looks a bit like a fire,

 

The thing about trees is that they tend to be very high poly count, so I can not see how doing it this way will help matters. spd is a high poly thing.

Lee

 

I had designed a way to do the leaves attached to the branches...but I don't think I need to. It's overkill unless you plan to use the tree up close, in which case you might be better served with an Onyx tree, or similar.

 

In the end, an overall shape of a tree is what works well for mid-distance. I can make it look like lots of leaves without all the polys using noises in various way. I can displace a simple skin to be more complex, use noise as an alpha to make a solid surface seem like leaves.

 

Using SPD with lower settings than my test would be good (I wanted to push it to find what the boundries are) and therefore produce less polys. Also, using simple displacement distorts the trees without adding polygons, but it doesn't look as good. That's fine for background stuff.

 

The thing about using a high-poly tree model is that it is always high-poly, and all copies of it look the same. Those are the things I'm trying to address, not replace the great models we already have available.

Link to comment
Share on other sites

I'm anxious to see these rendered with leaves and some nice lighting and stuff. I agree with your assesment about the leaves not needing to be attached to the branches. For one thing, you would need an insane number of twigs to pull that off correctly, therby defeating the purpose of what you are trying to accomplish.

Link to comment
Share on other sites

No, not even close to being that complex and interactive. Programs like that are still the best for 'feature' trees and plants. I'm just trying to improve those in 'crowd shots'.

It appears that's where they're (Greenworks) trying to go with http://www.xfrogdownloads.com/greenwebNew/products/productStart.htm I'm not much of a 3D guy, but isn't it called occlusion mapping? Too bad you have to be a programmer to make use of it in Xfrog.

 

If you're going with the placard tga approach to foliage Ernest, as opposed to domes, you might trying using clusters of articulated foliage rather than single leaves as many of these renderers do. You should be able to achieve a fairly accurate rendering result with relatively few "cards" that way, at least in theory :)

Link to comment
Share on other sites

If you're going with the placard tga approach to foliage Ernest, as opposed to domes

 

I'm trying to get away from that approach. That's why I'm experimenting with this stuff.

 

And I'm not going to try placing leaves. I think that's what's wrong with most of the 3D trees--they insist on drawing every damned leaf. When you paint trees, you don't do that. A tree in art is a collective object, and that's my approach here. It may not work, but so far so good.

 

I've done trees by displacing a ground map, too. Background stuff, but a great way to put a bunch of round trees on a hill. Every tree displaces about the right height and carries the texture map with it, and casts a shadow. You place the tree in Photoshop as a blot on your site map. Its very easy and quite effective for backgrounds.

Link to comment
Share on other sites

...I'm not going to try placing leaves. I think that's what's wrong with most of the 3D trees--they insist on drawing every damned leaf. When you paint trees, you don't do that. A tree in art is a collective object, and that's my approach here. It may not work, but so far so good.

Hence my comment about using articulated clusters of foliage rather than leaves.

 

It's not that the concept is flawed, it's that the application of it is short-sighted.

 

Good luck.

Link to comment
Share on other sites

No, not even close to being that complex and interactive. Programs like that are still the best for 'feature' trees and plants. I'm just trying to improve those in 'crowd shots'.

 

Sorry Ernest took the lint to the base page on Xfrog. It is the XfrogMLOD bit that I was making reference to.

 

 

it states

"XfrogMLOD is designed for programmers who want to create scenes with trees that change in complexity in realtime. The features of XfrogTune are a simple demonstration of what XfrogMLOD is capable of. Realtime programmers can choose complexity of branches or number of leaves based on their own rules - if the camera is far away, or the tree is occluded, if viewed from above vs. side, etc. "

 

I would like to see some more of your tests though. Not so much about the animation but the look of them, I think painted or drawn trees are really nice and a thing that is quite difficult to get as 3d elements in a scene, they have a softness that a lot of 3d trees lack.

Lee

Link to comment
Share on other sites

I think painted or drawn trees are really nice and a thing that is quite difficult to get as 3d elements in a scene, they have a softness that a lot of 3d trees lack.

Lee

 

That was where I started. I have been using painted trees in the old X-plan, which looks great but doesn't work for all situations, plus they cannot catch shadows and look awful from above.

 

I set out to do a 3D tree that would have some of what's good about the painted ones and some of whats good about 3D trees. I'm still working on that, but its just a matter of the shaders I use. For these posts I'm going more for a semi-realistc look since that's what most people here are interested in. In the end, the idea is that a very small stable of base models instantly becomes a whole forest.

 

Here are some more tests with foliage. Several things to appologise for. First, the lighting isn't great, and shifts, worse is that I must have had my ground shader animated in one of its noise levels--quite annoying. Also, for the first part of these tests I forgot to check a box to match the background, causing a noticeable 'shade' where the alpha channel is on the tree balloon.

 

The tests are the same trunks with a ball of foliage. The ball is just a skin, and has a bit of shaping to begin with. It's an old model I used to use in Lightscape animations. The way that it forms leaves and open areas is entirely a product of the shader, so its adjustable and animatable.

 

The first two passes are using SPD and the settings were a bit high, it resulted in an overly-long rendertime of about 1-1/2 minutes per frame. Too long. Those settings wouldn't be needed for most background work.

 

The second two passes use a different approach. I subdivided the model some to create more and smaller polys and then used simple displacement, so no time spent calc'ing the SPD. Those frames rendered much faster, but the base model is heavier at about 5200 polys. The SPD model is about 1700, but at rendertime is turned into something much higher. Each has its use. With the simple displacement version I tried one way being more 'leafy' and one way more tree-as-object. Both work as I expected.

 

I'm still not adding any camera-distance LOD variables. For now I'm going on the knowledge that it is possible.

 

I guess next I will try using a low-poly version of leaves on branches instead of the lolipop method seen here.

 

http://www.architecturalvisions.com/temp/treeDISPtest-08.mov

 

comments?

Link to comment
Share on other sites

Ernest

 

I must say I like them.. no surprise really, but I was concerned at the render times. you only have 40 trees. I sometimes have over 1000 of the VB trees in a scene.

 

How easy is it to vary the color or sparseness of foliage?

Are these created as one object repeated?

 

I am just a little concerned at the use of spd I can see that the ability to adjust the detail setting may be an advantage.

Not sure if it is the compression on the movie but there are some smooth spots on the tree, I kind of like this.

 

My favorite at the moment is the first simple displacement.

 

Lee

Link to comment
Share on other sites

I was concerned at the render times. you only have 40 trees. I sometimes have over 1000 of the VB trees in a scene.

 

I think it would be fairly easy to produce a tree with much lower polygon count by reducing the number of 'tubes' that make up the trunks. From a distance the trunk/branches aren't very noticeable. The question becomes one of whether to use SPD on a low-poly base, or use a higher-poly base and simple displacement. For most background use I now favor simple displacement. But for mid-ground I think the SPD would do a better job, and you would not have 1000 trees at that closeness. Both can exist in the same model.

 

How easy is it to vary the color or sparseness of foliage?

Are these created as one object repeated?

 

Yes, there is only one tree in those animations. The rest are C4D Instances of the master tree.

 

To vary the foliage is a matter of mixing noise patterns in the shader. So its quite simple, and animatable. But with anything that has infinite possibilities, you can spend all day trying variations.

 

And I'm getting tired of this scene for testing. I would rather use something more like a real project, but that will mean longer rendertimes, too.

 

Not sure if it is the compression on the movie but there are some smooth spots on the tree, I kind of like this.

 

Again, its adjustable. The noise which displaces the ball of the tree is a fusion of two patterns, one for the leafy effect and one for the overall lumps and bumps. How they are mixed and how fine the mesh or SPD settings determines how flat or 'grainy' the surface becomes.

 

There is another fusion of noise that determines the holes using alpha channel.

 

I can vary the color and tone of the trees just as they are, but in a real project I would probably make a few base models with some variation and use instances of them mixed. And this is just one tree shape. There would have to be others, too.

Link to comment
Share on other sites

Here is a test of a watercolored look. It will not fool anyone that it was painted, but has some of the character of WC trees. I can make them look much more painted (still just with noise in C4D) but they begin to lose any 3D effects. They would still cast a shadow, but the look is too stylized for now. These split the difference between realistic and NPR, or so I hope. I put in some distance-based tonality, but its still not linked to the camera position. In most cases it wouldn't even have to be, I've realized.

 

http://www.architecturalvisions.com/temp/treetest09WC.mov

Link to comment
Share on other sites

I can make them look much more painted (still just with noise in C4D) but they begin to lose any 3D effects.

 

I couldn't stop myself from seeing if I could solve that problem. I realize this won't interest most of you, but I got my tree test to look quite painted, though nothing here actually is.

 

My problem was that I could get a really wonderful flat wash look, but the trees could not catch a shadow. That's the big problem with X-trees, you cannot allow them to show any shading or recieve shadows. It just makes them look like the cardboard cutouts they really are. So how to have trees (or other things for that matter) render fairly flat but still get a shadow? I solved this with a brute-force single-pass solution. It uses sub-surface scattering, which is a rendertime bomb in C4D, even without GI. I would rather not use it, but it was the only solution I could find that actually worked. Using it raised my frametime for these to about 1 minute per, the pass posted above was about 1/3 that.

 

I think I've proven the concept with this. I could spend days tweeking setting to improve this test, but it's not a good use of time. I will now work on other aspects of trees.

 

http://www.architecturalvisions.com/temp/treetest10WC.mov

Link to comment
Share on other sites

  • 2 weeks later...
I'm anxious to see these rendered with leaves and some nice lighting and stuff. I agree with your assesment about the leaves not needing to be attached to the branches. For one thing, you would need an insane number of twigs to pull that off correctly

 

You don't need twigs at all. Who can see twigs on a tree unless you are right under it?

 

I attached leaf shapes to my trees. The last post has the NPR watercolor look, this goes back to the more realistic treatment. I have the camera get too close, but again its to find where the technique breaks down, find the limits. I'm finding that with a few more polys on the base object (tollerated by current software quite well) I can get by without using SubPolyDisplacement. SPD creates a lot of polys at rendewrtime, and with these trees adds several minutes to the rendertime. Here, its about 40 seconds per frame, each tree is about 3000 polygons:

 

http://www.architecturalvisions.com/temp/treetest11B.mov

 

As usual, I can vary the leaf size and density with the noise settings that creates them, and animate it.

 

Concept proven. Usefullness?

 

I should transfer the tree to a Max file, see if its shaders can reproduce what I've done with C4D. It's all about the noise, baby!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...