Home Technical Talk

Designing a Modular 3D Tile System

strich
polycounter lvl 11
Offline / Send Message
strich polycounter lvl 11
Hi,

I've been mulling over a few game designs for a number of years now whilst self learning the trade, as I'm sure we all do. I've recently boiled my current various designs down to a specific subset or genre if you will, and I've been developing the common framework technology behind them over the past few months.

All of my designs are going to follow a reasonably procedurally generated world and can optionally be infinite. I've got this part of the framework done and finished. For those interested the world is based on a point voxel system and I can successfully render any region of that world to polygons. This is more or less Minecraft at this point I suppose, however I don't really want to be one of those developers to clone it and apart from the most technical core of the design it'll be very different.
I'm currently working on a better way of rendering the world. I really don't want to rely on procedurally generated polygons - You can get anywhere from Minecraft style graphics up to pretty damn decent biological terrain using such a method but its very hit and miss and it constrains you to certain graphics styles. My other concern is that I want to apply this to a myriad of environments - Anything from forests and caves to spaceships interiors.

So, for the past week or two I've been toying with the idea of using just plain models to piece together a single voxel point and seamlessly interconnect with other voxel points. Should the concept prove viable it should allow me to be able to procedurally generate worlds at the voxel point level and have the world be rendered using 3D model 'tilesets'.

To do this I believe I need to make it as modular as possible. The modular system will only deal with the core environment - walls, doors, floors, roofs, stairs, etc. Anything like grass, trees, rocks, equipment, lights, etc can all come afterwards in another pass after the world has been generated.
I've put together a quick visual representation of what I mean by all this and the current design decisions I'm facing:
http://i44.tinypic.com/9qbv48.jpg


I'm always a firm believer that if a solution is inherently complex it probably means you're doing it wrong, and I think that's what I'm doing here. I need ot find that sweet spot between having to create too many models for specific cases and too little transitional models between different voxel 'types'. Additionally, I'm looking for any technology I may not be aware of that could help.

Its at this point I'd like to request the input of the community. Happy to open-source this part of the project and/or write a blog on my experiences as a form of give back and incentive to help.

Just a quick note before anyone points this out: I'm not looking to generate say big rolling hills and forests right now. I know that specific topic is actually fairly well documented and viable to do.

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    There's a very good document on modular level design on the unreal site. haven't got a link to hand but won't be hard to find. i recommend reading that ..
  • iWeReZ
    Options
    Offline / Send Message
    No real helpful personal information from me, but im working on something similar and i a couple of links in my thread, such as:


    http://wiki.polycount.com/CategoryEnvironmentModularity
    provided some great resorces. specifically Thiagos guide.
  • Gestalt
    Options
    Offline / Send Message
    Gestalt polycounter lvl 11
    Well are you looking to make something with voxels or tileable 3d meshes? Not the same thing. If you are using voxels and voxel data you could make your assets merged from high-poly meshes. 3d-coat natively supports voxel work so if that's what you mean by voxels then that'd be good to have. Looking into sparse-voxel octrees, gigavoxels, and voxel animation would also be a good idea if that is the type of direction you are talking about.

    If you are referring to using meshes and tiling them in 3d space then I'd say any shape other than a cube will give you problems, normally the shapes are created from marching cubes at a high resolution and not by changing the shape of large "voxel" meshes themselves.

    I'm not too sure how helpful I can be, but I might be able to help more if you clarify what you are going for.
  • strich
    Options
    Offline / Send Message
    strich polycounter lvl 11
    Thanks for the replies! I actually found a number of fantastic guides and link last night via this forum and had a good read. It helped put a few things into perspective, but I've yet to find anyone whose actually attempted a 3D tileset tilable both horizontally and vertically.
    Well are you looking to make something with voxels or tileable 3d meshes?
    3D meshes. I'm using a voxel-like data structure to manage the world data.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    strich wrote: »
    but I've yet to find anyone whose actually attempted a 3D tileset tilable both horizontally and vertically.

    lots of buildings are made this way. There's quite a few buildings like this in the gears of war series. And there's some cliffs made like this.

    for example

    http://udn.epicgames.com/Three/ProceduralBuildingsTutorial.html

    http://udn.epicgames.com/Three/ProceduralBuildings.html
  • Artist_in_a_box
    Options
    Offline / Send Message
    Artist_in_a_box polycounter lvl 7
    this just blew my mind. I am working with modular assets at the moment and had no idea you create them procedurally.
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    I would recommend looking into some CSG for your 3d tile buisness. Having things in terms of convex primitives allows things such as co-planar faces to be omitted and you can generate uvs and apply a smoothing effect to certain faces as described in your mock-up image.
    Just look at how half-life does it in which a terrain brush would still have a CSG block in memory for culling and to detecting what brushes may be next to it.
    Also since things are convex it is very efficient for physics calculations.

    Here is a good library for CSG.

    As for modeling the stuff it is pretty much the same logics as 2D tiles in which you have to do transitions between materials and blocks that handle every which situation(turns, stairs, doors, walls, etc).
    Keep walls as its own tile but the tile data should contain the direction it is facing OR cliff geometry could be entirely procedural using the marching cubes algorithm(or just a tessellated plane) so that you may have customized roughness and such.

    Think of it this way
    -Cliff tile
    --Direction it is facing(up down forward whatever)
    ---It will snap the geometry to the specified face on the 3d cube
    --other params (roughness, texture, etc)

    And then at run-time it would generate the geometry needed depending on the surrounding tiles and update when needed.

    I probably made it more complicated than it is
Sign In or Register to comment.