Home Technical Talk

3ds Max Game Terrain & Workflow.

greentooth
Offline / Send Message
PeterK greentooth
Hi Everyone,

I'm working with an engine that does not have a terrain or map editor, so my editor is Max. I'm looking for general info and specific info on terrains and terrain creation.

If you treat a terrain/env like a city, with cliff's, valleys, and underpasses as various "features", what sort of workflow do you guys imagine? Modular, heightmap ? I've tried using ZB as well, so Zbrush/mudd info is also pertinent.

this was useful:
http://boards.polycount.net/showthread.php?t=50160#Post242205


I did these this morning to tests some modular stuff:

rockface_3.jpg

Replies

  • Eric Chadwick
    We used Max a couple years ago to make and layout all the terrain for an adver-game, worked OK. Some pics and video (bottom of the page).

    Terrain was made of canyons underwater, so I created a set of U-cross-sectioned canyon pieces that all tiled with one another.

    We made a tiled normal map of the rock wall, baked from high-res mesh. The map was tiled on each piece in whole numbers along the length of each piece, so the next geom would tile seamlessly.

    Also had to make sure it mirror-tiled at the edges... when you map it on a U shape, as it goes across the U to the other side it changes to upside down, so if you rotate another piece 180° and snap it to the first piece, the two pieces will meet with their normalmaps upside down to each other.

    We added support for Max's Edit Normals modifier so the tiles could be snapped to each other but the seams would be hidden because their edge normals were all the same.

    We use this morph-like engine tech, so I could randomize the canyons out of four variations for each tile (four morph targets). So I made four variations of Straight, four of turn left, four of end pieces, etc. Pretty easy to vary them once I had the basic shape.

    We also placed some random boulders, pillars, rock bridges, etc. to break it up.

    Xrefs were a big help, it got unweildy real fast with several hundred tiles of pure geom pieces in the level. We didn't use Max's xref (too buggy), we made our own lean-n-mean exporter-compatible setup.

    Hope this helps. I'll try to dig up some in-progress pics.

    Oh, did I mention...? We had to finish the game in six months. :)
  • Murdoc
    Offline / Send Message
    Murdoc polycounter lvl 11
    We're pretty much doing the same thing as Eric described... and yes it's a pain in the butt.

    You can use ZB or something for your normals maps or texture creation, but we're just using them to tile.

    I was trying push for a blended material and use a map or vertex painting to blend between 3-4 texture/shaders using RGBA, but it posed too expensive and when we started playing the game(3rd person action) you really aren't staring at the ground that much, so didn't make any sense.
  • Eric Chadwick
    http://www.ericchadwick.com/examples/images/nte_tiles.jpg
    Here are the terrain tiles. They all use the same vertex shape along the open edges, and the open edge is also mirrored left-right (perfect U) so pieces can be snapped 180°. Can't really tell in-game.

    http://www.ericchadwick.com/examples/images/nte_layout.jpg
    The game layout using our Xref setup, about 1500 entities total. Scene scale becomes really important if laying out a scene that stretches for miles, because Max's precision gets really bad at small vs. large scales (things start to not want to snap together when it gets big). Helps to read up on Max's unit setup before you start laying out your level.
  • PeterK
    Offline / Send Message
    PeterK greentooth
    Eric, that's really impressive. I'm going to study this. Thank you.
  • kio
    Offline / Send Message
    kio polycounter lvl 16
    I was really impressed by the combination of sculpting an terrain editors they used on enemy territory http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture

  • Mark Dygert
    http://www.ericchadwick.com/examples/images/nte_tiles.jpg
    Here are the terrain tiles. They all use the same vertex shape along the open edges, and the open edge is also mirrored left-right (perfect U) so pieces can be snapped 180°. Can't really tell in-game.

    http://www.ericchadwick.com/examples/images/nte_layout.jpg
    The game layout using our Xref setup, about 1500 entities total. Scene scale becomes really important if laying out a scene that stretches for miles, because Max's precision gets really bad at small vs. large scales (things start to not want to snap together when it gets big). Helps to read up on Max's unit setup before you start laying out your level.

    Holy crap we used almost the same method in two of our games for mine tunnels, sewers and a snow field. We used splines to layout the paths, sticking to strict angle rules and distances. Then snapped the correct tiles to the spline knots.

    To make some of the jointed pieces we skinned a straight section of the tile and bent it, then cleaned it up. Or did an angled symmetry and cleaned that up.

    After we had the tiles and layout done, we created props and paint scattered them around. We also created alternate textures and used vertex colors to blend them. We mostly used this in the snow field because we had separate sets of tracks to keep track of.

    Glad to see at least someone else was frustrated with XRef's enough to not use them.
  • PeterK
    Offline / Send Message
    PeterK greentooth
    Hey Vig, what's the URL for those paint scatter scripts?
  • midorisabato
    Here's a link to one of the better paint scatter scripts around. Hope this helps.

    http://www.scriptspot.com/3ds-max/advanced-painter
  • Eric Chadwick
    The only bummer with Advanced Painter is it won't randomize the rotation IIRC, have to run another script afterwards.

    Neil Blevins' objectPainter might be better, haven't tried it yet.
    http://www.neilblevins.com/soulburnscripts/soulburnscripts.htm
  • Mark Dygert
    I haven't tried out Neil's yet. Does it come with spline painting? I think someone else made a separate script that paints splines, but I only ran across it, shouldn't be too hard to find again but I lost track of it as I never tried it out. AdvPainter works well for what I need it to.

    Spline painting comes in really handy for painting hanging wire bundles. But does require a tiny bit of clean up in AdvPainter


    Eric, AdvPainter does randomize the rotation, if you start to plug values in the "Min/Max Orientation" fields. The first row is X rotation, the next is Y, and last is Z.
    I think the field runs on percent 0-100%, 100 being 360 degrees. So if you type in 50 it will randomize from 0-180 degrees. Or it runs on actually degrees... I can't remember right now, computers tied up ATM.

    Thanks for posting a link to Neil's site (I had forgotten about it) I'll have to check out more of his scripts, it looks like he added a few since I last checked =)
  • Eric Chadwick
    It's missing something I needed, maybe it was random scale?

    Neil has a splinePainter, might be the one you're thinking of. He also has that wireBundler script.
  • Mark Dygert
    Ahh yes, it lacks scale. I've had to do separate objects at different scales. Also if you used uniform scale on the "object" you needed to reset transforms before AdvPainter would notice the scale change. Very annoying.

    Weird, that was the script I was looking at, but it came from another place. I tried out the wire bundle script quite a while ago, but I remember it was kind of hard to control. It was easier to just paint the wires instead.

    EDIT:
    Ok, just replaced AdvPainter, with Niels scripts, hands down easier and faster to use.
    His spline painter has more features to control the final output of the spline, meaning less clean up.
    The scatter script is great and logically laid out, much easier to use.

    I really like how all of his scripts are accessible through one button "souldburn script listener" brilliant! Hopefully I can weed out the ones I'll never use as the list is huge...

    EDIT EDIT: And now that I've hi-jacked your thread enough, lets get back to bussiness =/
  • PeterK
    Offline / Send Message
    PeterK greentooth
    The coder has implemented a shader that lets me blend 4 maps using the channels of a mask, but the issue that was really bugging me was blending between two shaders/materials. So, I think the engine would have to be altered to allow for something like that.

    I tried vertex colors and blending to get that effect, but I think my issues all come back to lack of support in the engine. Noel suggested the blending, and it works fine in max, but I'd have to confer with the programmers to see how it would act in-engine.

    either way, I think blending between the two shaders/materials would require a new shader, and potentially multiple UV channels.

    By the way, thanks for the links , images, and info everyone.
  • Eric Chadwick
    It should be fairly easy for them to setup a shader that also mixes 4 normalmaps and 4 diffusemaps and 4 specpowermaps etc. That way you wouldn't need multiple shaders.

    Funny, I tried the Reality Engine wiki link and it's still up, even tho the company page is clearly dead. Some pics here about how they (used to) mix 4 diffuse maps.
    http://reality.artificialstudios.com/twiki/bin/view/Main/MixMapTutorial
  • Baddcog
    Offline / Send Message
    Baddcog polycounter lvl 9
    Sorry to ressurect/hi-jack the thread but it seems like a good place to post.

    I'm working on a map for Zero Gear right now. Doing all the mapping/modelling in Max.

    I've always just done prop pieces and characters. (I did a few scene pieces for Morrowind but they were just small house segments, etc...)

    So the major issue I'm having is getting close enough to the work to see what I'm doing in perspective. I'll hit U and can see what's going on a little better in User view, but it's things like tunnels that are really hard to get inside and look around.

    My basic tunnel construction was initially built from the outside, then I flipped the normals. But now getting inside it to detail is virtually impossible.
  • Eric Chadwick
    Like I said above,
    Scene scale becomes really important if laying out a scene that stretches for miles, because Max's precision gets really bad at small vs. large scales (things start to not want to snap together when it gets big). Helps to read up on Max's unit setup before you start laying out your level.
    But you can work around that by adding a camera in your level and manually setting the near and far clipping planes.
  • carlo_c
    Could you just scale up the whole level to detail it by a whole number like say 5, then scale it down again by 5 when your done detailing?

    Or is that just a simple mind type of solution lol.
  • Eric Chadwick
    Yeah you could try Rescale World Units in the utility panel, but you should do a test run thru your exporter after scaling it back down, to make sure none of your entities get screwed up. Skeletons in particular hate to be scaled this way.
  • Baddcog
    Offline / Send Message
    Baddcog polycounter lvl 9
    Whoops, sorry 'bout that, I skimmed most of the posts but missed that part.

    Scaling should work fine I guess. There won't be anything rigged in here, just a simple cave tunnel but I want it to look decent.

    I actually used that scale trick alot making stuff for Thief2. The scale in that engine compared to Max is REALLY small. I think Zero Gear is more 1 to 1. I just get to the point where I zoom all the way in so I'm almost there and it won't go anymore, like it doesn't want to get 'inside' the terrain.
Sign In or Register to comment.