Home Technical Talk

Intersecting Meshes

polycounter lvl 15
Offline / Send Message
Cody polycounter lvl 15
I'm modeling a tree that would ideally be for a next gen game. My question is whether it would be better for it to be one mesh with smooth topology instead of each branch being a different object, or if it matters.

treev2.jpg

Replies

  • JKMakowka
    Offline / Send Message
    JKMakowka polycounter lvl 18
    Use some common sense... the seams will be noticable close up, especially with normalmaps.
    The question is "how close will a player get?"
    Probably not close enough that it will matter.
  • Cody
    Offline / Send Message
    Cody polycounter lvl 15
    good point. Thanks JK
  • MacD
    Offline / Send Message
    MacD polycounter lvl 18
    But the real question is: how will the engine handle it? I know that at least some engines used to screw up lighting when things were done this way; if the verts where inside something, the lighting could really screw up those first (intersected) polys, as those verts would be 'in the dark' (no light inside that other mesh). So do current engines handle that better?
  • pliang
    Offline / Send Message
    pliang polycounter lvl 17
    It's better off for most engines to model those pieces seperately...UV it and then re-attatch them...worked for me when doing my first.
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    I would go for the one smooth mesh. Separate pieces will not share verts with the main trunk and will increase your vert count. See this thread for more discussion.
  • Cody
    Offline / Send Message
    Cody polycounter lvl 15
    Haha. Getting different opinions here. I suppose I'll just go for one mesh. smile.gif
  • East
    Offline / Send Message
    East polycounter lvl 14
    As for seams, you are probably going to get them either way, as you can't lay out the UVs on a tree (or any object) without them. You can limit these by baking out maps from a high resolution object, and/or painting the textures / texture details using projection painting in e.g. BodyPaint.

    I would go for one mesh as well just because the seams are probably easier to control this way, and you can get much better organic shapes, especially where the branches meet the trunk.
  • Mark Dygert
    My answer is, it depends on so much its hard to give a "you must always do it this way" answer. The best way is to answer it yourself and do both when you have the time. That way you learn both ways, and can easily contrast them in the future when you need to make a similar object. Just blindly following rules because some anonymous poster said to do it that way is the lazy way out.

    If joining every branch means your tree geometry is going to shoot up significantly while not providing the silhouette with a smoother shape then you've failed to use those polys effectively. Instead of blindly following a rule that someone tosses out, think about what is the best way to pull off the most detail with the least amount of resources in the time you have, and do it that way. If you can get more detail by joining everything AND you have the time to do it, have fun go nuts. But if it will be easier to unwrap each piece if they are separate and the detail won't take a hit then save yourself some time for something that someone is more apt to look at.

    With this model you have enough polys to join every branch to the trunk while keeping the same poly count you currently have. BUT only because you made every branch as round as possible by over modeling their thickness. If you trimmed them down to 3-4-5 sided cylinders and didn't join them you could do much more, put in more bends in each branch, add more branches and leaves, make a little birds nest, create a stranded kite maybe even make a tree fort. You also have to worry about the joints that are created when you join everything and what those joints will do to the lighting. Often all you get for your joining effort is a chunked up your poly count and misshapen joints. If it takes 200 polys and 4hrs to join everything thats 200 polys and 4hrs of leaves you could use to really fill out the tree.

    I know right now time might not seam like a concern but when you're given a list of 20 props to make in 3 days, sitting there welding and joining every last branch is going to seam pretty insane.

    You might be able to get better results if you join everything but ask yourself this:
    1) Do I have the time to align, cut, weld and unwrap all those branches?
    2) Is it really going to increase the detail or is it just a waste of time and resources?

    [ QUOTE ]
    But the real question is: how will the engine handle it? I know that at least some engines used to screw up lighting when things were done this way; if the verts where inside something, the lighting could really screw up those first (intersected) polys, as those verts would be 'in the dark' (no light inside that other mesh). So do current engines handle that better?

    [/ QUOTE ]I think the proper question is are artist smarter now and better at handling the issue. The engine you talk about is running on vertex lighting and deals with long polys that have verts inside of a dark area. To get around this you can either not put the verts in a dark area OR Place a ring of verts just outside the mesh so those verts will catch light and light the rest of the branch correctly while a small part of the branch by the trunk is lite darkly, kind of faking some AO which can be a nice effect. You can also minimize the amounts of verts hidden inside the tree, saving yourself polys, verts and time.
    Tree00.jpg
    Tree01.jpg

    So quick recap. It depends on what engine, what time you have, and what will get you the best results with the least resources. You won't find a "pros do it this way and only this way" answer to a question like this. What you will find is that pros ask questions and take the grand scope of the game into account when considering how to build something.
  • Cody
    Offline / Send Message
    Cody polycounter lvl 15
    East: I probably plan on normal mapping this in some way.

    Vig: Awesome. This is the kind of response I was looking for, without knowing it. I see your point about time vs. resources over technique. I hate asking noob questions like this, but how else do you learn, eh?
  • Eric Chadwick
    If you're using 3ds Max, you might check out the Tree Maker script, auto-welds and auto-UVs the branches, a solid starting point for a welded tree.
    http://www.scriptspot.com/3ds-max/tree-maker
  • Mark Dygert
    [ QUOTE ]
    but how else do you learn, eh?

    [/ QUOTE ]
    Exactly. So don't worry about asking, chances are because you took a chance and asked you answered someone else's questions also.

    I would stay away from the make tree button until you have a few quality trees made on your own. Its a great script at making very particular trees. I use it all the time but I choose to do the leave planes myself. I didn't want to mention it because its too easy to relay on but since the cats out of the bag... If you're in the mood to use tree maker programs check these out.
    http://www.onyxtree.com/stormx.html
    http://www.bionatics.com/
    http://www.speedtree.com/
    http://www.treegenerator.com/
    http://graphics.uni-konstanz.de/~luft/ivy_generator/ <-Ivy generator
    http://www.guruware.at/main/ivy/index.html <- 3ds Max script based on the program above
    I'm sure there are more out there, these are the ones I remember off the top of my head.

    Remember, if you end up switching 3D apps you can't take the script with you and some places might not want to put down extra money for your "amazing tree generating skills" ie program... But if you know how to approach making trees you'll be in a good position to just roll on along.
  • JKMakowka
    Offline / Send Message
    JKMakowka polycounter lvl 18
    You forgot the best/most versatile free one:
    http://ngplant.sourceforge.net/
Sign In or Register to comment.