View Full Version : Vegitation Modeling - the best way?
SirApple 05-31-2009, 08:53 PM Alright, hey all!
Last time I posted here I got some good help and advice, so I decided to come back with another problem I have. :)
Actually its not a problem, its just something I really want to learn.
As the title says, vegetation modeling. I'm honestly not completely sure where to begin with this. I've been modeling/texturing for a while now (mostly game art), but never have done vegetation. I assume for a next gen game (Cry Engine 2) much of the, say, tree's trunk and branches are normal mesh, and then would the leaves and such be alpha'd on a 2d plane? Or would it be a double sided plane. I think this is one of the main areas that confuses me. Partly because I also don't know how to Alpha texture (can't seem to find reliable tutorials on it either). :curious:
So yeah, I'm looking to learn this for game art sake, specifically Cry Engine 2. I know this isn't a game artist forum, but, I guess the techniques aren't to different :).
One last thing before I go,
The main software I use: 3dsmax .7 and Adobe Photoshop CS4.
I really appreciate your help and time.
Thank you,
~SA
|
|
newellteapot
06-01-2009, 05:20 PM
I had to model trees once so I sympathise :)
this is what I did:
-build the trunk and branches
-make 3-5 different sized leaves and attach them
To make the leaves, use planes with a alpha channel.
This means simply that when you make your leaf texture in photoshop you also save a black and white image which will tell the software what to hide and what to show.
In photoshop, select the area outside the perimeter of the leaf and fill it black in a new layer.
Fill the rest in white. This has to be done with care or you'll get a nasty edge.
The material has to be non specular or you'll see speculars on the transparent parts.
When you apply the material to the object you have to tell it to use the alpha.
Now you have to learn how to attach them. I recall max having an easy to use scatter compound.
sorry this is a bit short but I don't have much time today! :P
have alook at my trees in my portfolio to have an idea
PS careful with thye polycount...
SirApple
06-01-2009, 06:38 PM
Ok thanks mate :).
I'll give it a go then, and post my resaults (though I'm going to do something simple as a test).
So, trees/vegetation only get a normal and diffuse map + the alpha?
newellteapot
06-02-2009, 12:18 AM
well just apply the material you want with the alpha.
Don't worry about creating a great material for now :)
good luck and post the results
misterwolfy
06-02-2009, 02:15 AM
I came to this forum with the same question. I have been making trees by a similar method as newellteapot describes. This works very well in terms of results, but is slow, at least with the work flow that I am using. I have not found an automated way to distribute my leaves yet.
I wonder if there is a procedural way to model trees and distribute leaves. Perhaps even to animate. Has anyone written a good script? I use paint effects, which is pretty good, but limited in terms of design, I think. Is there a tool or method that takes a different, more customizable approach?
W
newellteapot
06-02-2009, 10:35 AM
that's a good point. For what I had to do the system I illustrated was fine. (see result in my portfolio, black and white image)
For what concerns easy ways to distribute the leaves, I know that for Max users the scatter compound is ok, although not the most flexible.
As I haven't ventured much in the depths of paint effects, I wouldn't know how to animate the result, but I suppose shouldn't be too much hassle.
I also heard of Tree Generator (google it up).
Highend 3D has a tree tutorial in the maya general section, maybe check that out too?
http://www.escalight.com/tutorials/3dsmax-tutorials/growing-tree.html
even though the result as shown in the tutorial isnt the greatest there is and you probably already know the tutorial you might be able to adapt a few things and change them to get what you want since its using particle flow to distribute the leavbranches and that in a somewhat nice way.
cheers
SirApple
06-02-2009, 11:18 PM
I think personally I will use teapots method. I like having complete control over my models and textures.
Also, teapot, I havn't yet gotten to try it out cause I'm rather busy (final week of school and all). But, just so I'm clear...
I would basically find a texture of brush, leaves or flowers and etc that I want, cut them out, fill the background black, and then use that for my diffuse. And then, for the alpha, convert the image to black and white? :)
I just wanted to make sure, hehe.
Oh, one last thing for now! :)
If I was (eventually) doing a thicker hedgerow (I.E France Bocage or such), would I simply add the planes where I wanted leaves/brush to be. If this is the case, I assume the more planes added means the thicker the vegetation would be?
Thank you again,
~SA
newellteapot
06-03-2009, 11:22 AM
first things first!
you are faced with 3 different problems.
1) learning what's an alpha and how to use it
2) model a nice tree and plane leaves
3) scatter the leaves on the tree
For the first problem, just us the tutorials taht ship with the software you are using
The second one is just a matter of sitting down and work to obatin a nice shape and form
For the third one, you have to rely on what teh software you are using offers to scatter elements.
Go in order, you'll have and easier task!
GrogMcGee
06-03-2009, 07:22 PM
quite honestly, the best way to learn how games do vegetation is to buy the game (assuming it has an editor) and then look at the models themselves - Crysis has one (editor and model exporter and importer).
SirApple
06-04-2009, 12:00 PM
first things first!
you are faced with 3 different problems.
1) learning what's an alpha and how to use it
2) model a nice tree and plane leaves
3) scatter the leaves on the tree
For the first problem, just us the tutorials taht ship with the software you are using
The second one is just a matter of sitting down and work to obatin a nice shape and form
For the third one, you have to rely on what teh software you are using offers to scatter elements.
Go in order, you'll have and easier task!
Alright. Well firstly I have a UV snapping problem that I need to figure out, before I can practice vegetation.
quite honestly, the best way to learn how games do vegetation is to buy the game (assuming it has an editor) and then look at the models themselves - Crysis has one (editor and model exporter and importer).
Yeah. I looked around in Crysis and it seems most of the bushes and such just use 2d planes.
GrogMcGee
06-04-2009, 02:01 PM
Yeah that's the usual method; there's also the method used in Oblivion which is neat - the leaves are one sided triangles that always face the camera - from a distance it looks incredible up close it a little weird.
It's always worth looking at different games to see how each one does it.
Fable (1 and 2)
Oblivion(/ Fallout?)
Crysis/ Farcry 2
etc... each game will have a slightly different method of doing it.
ScotchTapeWorm3D
06-06-2009, 06:39 PM
I'm no master at trees, but one month I dedicated all my time to coming up with a method that somewhat works. I wrote a tutorial. It's for Blender, but I'm sure you can transfer it.
http://scotchtapeworm.deviantart.com/art/Mid-Poly-Tree-Tutorial-103101839
SirApple
06-06-2009, 08:42 PM
Oh, that looks good to.
I'm going to try these multiple methods to see which I like best. Or maybe I can use a little of each.
Thank you :)
surreal-reality
06-09-2009, 08:01 PM
question about pfx;
I've set up some basic vine like tubes to grown along it's stroke up a tree branch.
this is all well and everything, but I'm getting a very segmented growth pattern, it doesn't actually "grow", from segment to segment, there is one segment, then the next one pops into existence. besides upping the resolution of the tubes to around a trillion to get it to look smooth, is there anything I can do to get this to look smoother ?
also the tube is as wide at the base as it the tip. vines usually taper large at base, and small at tip. is there anyway to do this with paint effects?
thanks,
Lucas
SirApple
06-13-2009, 12:38 AM
Hey ok I'm back with some questions.
Tonight I had a bit of time. So I went into Crysis, and looked at their grass vegitation. I noticed it looks like multiple planes randomized together.
So this is what I did:
http://i486.photobucket.com/albums/rr222/trgallery/example-2.jpg
I'm not sure if its correct or not, especially for next gen games sake. Its just three planes, all facing the same direction (towards camera of course :P) and one face each. I wasn't sure if I'm supposed to make them face in different directions, or not? Cause I noticed in video games the vegetation turns with your movement. Almost like an optical illusion.
So yeah, any tips or advice if I did it correctly and I'd much appreciate your help.
Thank you,
Apple
GrogMcGee
06-13-2009, 04:42 AM
Some games (haven't actually looked at crysis) use always-facing-the-camera polygons for some kinds of vegetation (Oblivion does this for bushes and tree leaves but not grass). Basically this technique creates an illusion that unless, like you were, you look really carefully people just wont notice.
My personal opinion is that billboarding (what I above called always-facing the camera polygons) quads (or triangles, what ev) look far better than planes for things like leaf-planes vs say what crysis did for leaves on trees; however, I think that grass should more like what you did but somewhat denser - more like oblivion.
As to what you did, create a simply grass texture and transparency and then apply it to your planes, see what works (and try and get the best appearance with the fewest triangles since that really the long term goal). Doing that will teach you what you want to know.
surreal-reality
06-13-2009, 05:52 AM
one thing to consider is if the planes do not billboard (which I'm personally not a huge fan of because when I play a gay I can simply not help looking at stuff like that :- /) and they are stationary, add some geometry to the plane, and make sure u bend it, and keep it from being flat, that way no matter what angle you are at you can still see some surface more or less facing you
hope it helps,
Lucas
SirApple
06-13-2009, 08:22 PM
Ok thanks guys :).
Anyway here is my first attempt. I couldn't figure out how to apply the alpha and diffuse at same time so a fellow dev did this pic for me, its a really bad image. Sorry for this :\. I'll try to export it and show you some in game screenies, possibly.
http://i486.photobucket.com/albums/rr222/trgallery/PICD5Dtmp.jpg
And here are scaled down texture sheets (original size 1024x).
http://i486.photobucket.com/albums/rr222/trgallery/diffmappic.jpg
http://i486.photobucket.com/albums/rr222/trgallery/alphapic.jpg
Basically I ended up making my own grass texture because its not worth the hassle trying to find grass images on google, when photoshop can do anything you want.
The basic steps I did to make the grass itself:
-Create grass shapes with pen tool
-Fill with a dull sublte type green
-Apply Fiber filter using two different green colors
-Copy the layer with grass, and apply a natural brown Color Overlay
-Lower the opacity of the brown overlay
-And finally I used the dodge tool to make subtle light lights down the center of the grass
I have no clue if thats a good method or not. If you know a good method to get more realistic look, please share :). I noticed in games its pretty hard to see much material definition in grass. So thats why I felt safe making my own grass texture.
And I do have a question. Do I then make normal and specular maps for this or is it just diffuse and alpha?
Thanks again,
Apple
GrogMcGee
06-13-2009, 08:37 PM
Looking good for a first attempt.
Your alpha will go into the transparency part of the shader. There should be little need for a spec or anything else and really the texture doesn't need to be that big, think about how much grass is generally on seen, you don't want 1k textures for that; the texture rule of thumb is the texture doesn't need to be larger than it will actually appear on screen: a 256x256 will likely suffice if you sharpen the image in photoshop, eg with the unsharp mask.
SirApple
06-13-2009, 11:09 PM
Thanks :).
Ok yeah good point. If 10 fields on a map are covered with grass, and each static section of grass is 1024x, that would cause some major performance issues. So for bushes maybe a bit bigger/hedges, 512x, and trees 1024x?
I'm still a bit skeptical about my texturing technique for the grass. I suppose I'll go into a few games and see their grass up close.
Thank you
~SA
GrogMcGee
06-13-2009, 11:37 PM
Your goal should be as small as possible while maintaining the detail you need. Remember it's mainly the graphics programmers and artist types that stop and really look at textures etc. During normal play most people won't take the time to look extra carefully.
The unsharp mask in photoshop is your friend.
Also remember that a face has only one side, so you'll need to double side everything (ie, duplicate and reverse the normal).
SirApple
06-14-2009, 12:37 AM
Alright :).
Also you say double side. I guess that means basically a 2d type plane with two sides? I'm not exactly sure how to this so normally I just create a box, delete the faces accept for one, then "cap" the rear. Though I imagine thats the same thing.
Or maybe I miss understand.
Thanks
~SA
illa3d
06-15-2009, 02:11 PM
Some parametric vegetation growers:
General vegetation ($):
http://www.bionatics.com/EASYnat2_5Download.html
As for trees (free):
http://www.scriptspot.com/3ds-max/tree-maker
and ivy (free):
http://www.guruware.at/main/ivy/index.html
SirApple
06-17-2009, 04:19 AM
Thanks for links ;). I'll consider downloading to give them a look.
Though, I think I've about gotten this figured out, accept for two things.
To create double sided vegetation (rather then the typical one sided 2d plane), should I for instance; Create a 2d plane, then mirror it as a copy in the opposite direction, and use that for the other side?
And secondly. Lets say I was doing a tree, of course the trunk and branches would be normal mesh, but the leaved areas would be 2d planes. So would I UV the planes on a separate sheet then the rest of the tree?
Thanks again :)
~Apple
GrogMcGee
06-17-2009, 02:13 PM
Thanks for links ;). I'll consider downloading to give them a look.
Though, I think I've about gotten this figured out, accept for two things.
To create double sided vegetation (rather then the typical one sided 2d plane), should I for instance; Create a 2d plane, then mirror it as a copy in the opposite direction, and use that for the other side?
That's a good way.
And secondly. Lets say I was doing a tree, of course the trunk and branches would be normal mesh, but the leaved areas would be 2d planes. So would I UV the planes on a separate sheet then the rest of the tree?
Thanks again :)
~Apple
Ya the leaves should be on a separate sheet to the trunk.
SirApple
06-17-2009, 10:46 PM
Ok - cheers man.
Thanks
illa3d
06-19-2009, 01:02 AM
Here goes.
To simplify the process I'd advise to use "double sided" material instead of making 2 faces, that is, depending on what's your goal.
You can find double sided material option under material itself, "basic shader parameters" rollout on the top, "2-sided" checkbox. Even old games support double sided materials/textures.
Considering the trunk and leaves textures, they can both be on the same image and not often I've seen that solution for games, but I'd recommend having it as 2 separate textures since those two are different materials.
One tip for the texture though, for when you encounter the problem.
Since pixels for the grass edge on your textures fade away into black color of the background, in render or in-game with lower mip-maps (What's a mip-map (http://www.3drender.com/glossary/mipmapping.htm)) you will get black edges around your grass in render/viewport/in-game.
To avoid it, create a grass edge "color bleed" or do a transparent .png save.
http://www.illa3d.com/bin/color_bleed.jpg
Color bleed
We need to do some Photoshop work on the diffuse texture. The goal is to paint pixels surrounding the grass edge that is now fading to black in a same colour the edge texture pixels of the grass are. The quickest way is plain color background, averaging in green of the grass edges. That way it will look more plausible.
Since there are textures with various colors on the edges, as you go around, color bleeding around the edge should be the same as the edge color. The quick and dirty way to do it is to duplicate the grass layer, use gaussian blur to blur the bottom layer. If the grass image is on a transparent layer, duplicate the blurred layer ~7 times and flatten all to one, so the edge color is fully opaque.
That way you can save texture to any format along with it's extra alpha image counterpart not having the problems of sticking out edges.
There's also an 3rd party plugin for Photoshop called Solidify (http://www.flamingpear.com/goodies.html) which does it for you.
.PNG save
If the purpose of the vegetation model is of a purely render intention you can use the .PNG format:
Save the image with transparent background if you're working in Photoshop, just the grass layer, as transparent 24bit .PNG and you put the same texture under diffuse and opacity channels.
As for material settings in max:
Put the same image under diffuse and opacity maps.
Under diffuse, bitmap parameters should be set for "mono channel output:rgb intensity" and "alpha source:none(opaque)"
Under alpha, bitmap parameters as "mono channel output:alpha" and "alpha source:image alpha"
That should get you with a decent transparent texture.
If you're just rendering, ignore following. I'm not certain for is the purpose of the texture, but I'd solve the grass variance using several images with different grass variations instead of having them all on one texture. That way you both increase detail in-game and save precious GFX memory space for games since there's better utilization of empty space in between faces in UVW maps. Usually the trick is to have one face cover the entire UV space (0,0 - 1,1).
Good luck!
SirApple
06-19-2009, 03:13 AM
Ok thanks for the help! Tomorrow or so I'll read through it and follow it accordingly and see my results. :)
Cheers!
CGTalk Moderation
06-19-2009, 03:13 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.