Home Technical Talk

Modelling a path on top of ground (for games). Also UV tiling question.

A question! With stuff like this:

xOrvMCq.jpg

How are the paths and dirt patches usually textured/modelled?

Would the entire surface be grass, then the dirt patches and path is geometry (path is curved geometry) overlaid slightly on top of it, with them being transparent so you can see the grass through? Like this:

itvAcaB.jpg

Or would the path and dirt textures be applied to actual polygons on the mesh (so the path would probably be curved in the physical texture), and the texturing has the actual grass on the side of the textures? The main problem I can see that I'm curious about is the part where it curves vertically at the edge of the terrain. Would the overlay be only the flat path and the edge would just be a separate part of the UV map, or?

Not sure how this is usually gone about, and I'm interested! I can't tell if the path tiles or not.

Also what about the tiling grass? If I went with the first option, would the mesh for the grass be something like this? (More cleaned up though. And maybe just a grid because of the small deformations around the edges? In which case maybe you wouldn't need to have to do the UV tiling. Hm.)

MdcIoiA.jpg

Which is then flattened out and uv mapped so it's stretched out 5x+ past the bounds enough that the grass texture tiles to get the size right?

This would be for a game so you don't want to have to swap out textures much, but for something with a tiling texture like that is it better to literally have a single polygon for each tile of the texture (and pack the grass into the model texture itself), or do what I did there and swap to a separate "grass" texture for that. Judging by the background behind the scene, there has to be a tileable grass texture that takes up the full 0-1 UV space, so. I don't have much experience in tiling textures when UVW unwrapping a mesh rather than the standard way of 3D programs just plopping down materials wherever and setting the projection, however, so it's always been kinda foreign to me.

Which texture sheets would you say the sides of the terrain, (including the part where the dirt path ends), the path itself, and the dirt patches, be on? The top of the grass would be on a separate sheet if it tiles, but I don't know about where the rest would best go. One for each might be a bit of overhead, but maybe it won't matter with the small size of the maps?

Sorry if anything's confusing! I'll try and explain some things in better detail if you need!

Also excuse the bad diagrams!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I cant really tell if this game is actually 3d or not, but this kind of paths are usually done with using geometries on top of the terrain (a little above from the terrain to prevent the z-fighting), and with tileable textures, or tileable+some reuseable textures (like for the bended parts of the path if the geometry gives angular result, but adding a little more geo wouldnt hurt). So I would say paths from polygons and tileable textures is the best, cheapest, and fastest way. Alternatively you can use a vertex color shader to blend some textures together based on the painted vertex colors, but then you need more geo for the terrain.
  • Jewel
    Options
    Offline / Send Message
    Oh. To clarify yes it's completely 3D, you can rotate around. The characters are all 2D billboards though.

    The problem in why I'm not completely understanding how they do it, though, is where it wraps around; this chunk in particular:

    07ApJmr.png

    What I'm thinking is it might be this (excuse the mess).

    OvP7ZFa.png

    With red being a grass texture
    Light blue being a dirt texture
    Yellow being a side-grass texture
    And Black being the geometry for the path texture which is floating above the rest.

    But I'm curious how you'd do the corners, and the dirt side with some path bricks, if this was a dirt path overlay on grass.

    BUSu4S5.png

    So it can't be that exact workflow. That's where I'm stuck, basically.

    Edit: I'm an idiot. Went and got a picture without the overlays.

    5cVAdGn.jpg

    Edit2: Managed to snap a pic of the other side of the path, if that's any help:

    yJzPMpw.png
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    An another texture(s) specifically for the sides? :) That can be tileable horizontally (its visible on the pic that you have linked) Your drawing about where the pieces are separated sounds right though.
  • Jewel
    Options
    Offline / Send Message
    Doesn't make sense, because it'd have to deform exactly to where the path connects (which I'm almost positive is floating geometry, so it can be any size or position or even offset along the UV), plus the bricks.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I dont really see why it doesnt make sense. Take an easy test. Place a box, and make a similar texture for its sides, and one grassy for the top. If you paint it good, then it'll be flawless. Then if you want the road, you make it for the top.Then you paint a new side texture for the side.Same here, if you paint it good, then it will be flawless. Then you can distort your mesh how you want, it will be still flawless.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I made some quick textures for you to test this.Try out them on planes or boxes :)
    https://www.dropbox.com/sh/ylx95wkxkd32bbk/K1v8EVI1Vu
  • Jewel
    Options
    Offline / Send Message
    konAWTB.png

    Hm. So you've have the grass on top, with floating path geometry (red).
    You'd have grass->dirt texture on the side (yellow).
    And you'd have Path_End texture on the light blue?

    The only problem I can see with that is the path would have to end on a specific polygon (the path end on the left is different to the one on the right), so would they have specific Path_End textures for each possible polygon or I guess just make them per-use-case? Still seems a bit weird to me overall but hm. You could be right.

    Edit: To the post above, I think you might be on the mindset that the path is a physically curved texture, to which I say I don't think it is! I think it's a straight texture that's curved via floating geometry. But the stuff about the side might still be correct.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Yeah looks like this or similar. The last thing that I would say is that the paths can be done with using simple polygons, and specific road textures like straight, bended right, bended left, and as much as you want to use.Good Luck !

    Edit:
    "Edit: To the post above, I think you might be on the mindset that the path is a physically curved texture, to which I say I don't think it is! I think it's a straight texture that's curved via floating geometry. But the stuff about the side might still be correct."

    Well. Im just telling you some options. Who could tell how its exactly made, without seeing the wires? :)
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    My bet is it's a unique texture for everything based on tiles and edited manually. First i don't spot tile in the path.
    1 texture is vram consuming but requires less gpu/cpu calculations than several objects/materials with alpha, and well, there's only that on screen anyway.
    Not that it couldnt be done the ways you describe for more generic purpose (large terrain) but probably not as clean.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    In the case of an actual terrain, a vertex paint or terrain shader would be the good choice, obviously. I think the answer for the road question is depending on the case. I would give a try to the VP shader in this case (that has been showed) too.
  • Jewel
    Options
    Offline / Send Message
    Pretty sure it's not a shader because the road texture curves. If it were just grass->dirt yeah it'd probably be one but because it's grass->curved path I very much doubt it is. Also the transition on the grass->path edge is much too precise and handpainted to be texture splatting with shaders.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    I looked at better res pic of this game Disgaea D2: A Brighter Darkness
    And i was wrong, the seams are obvious.
    I still think the path is a huge splat with grass border painted on it, not curved shape. Looking at some screens, there are zone, that couldn't be done that way.
    http://www.micromania.fr/zooms/PlayStation_3/disgaead2/disgaeaddeux019.jpg
  • Jewel
    Options
    Offline / Send Message
    Augh. That picture throws my understanding back out the window.

    If it were a huge splat wouldn't that use way too many resources in both storing a huge texture and loading it into runtime alongside all the other stuff it has to load? Also there's still a seam here..

    OEwdrdi.png
Sign In or Register to comment.