Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

tile generation in 3d

Discussion in 'Scripting' started by twn9009, May 2, 2019.

  1. twn9009

    twn9009

    Joined:
    May 2, 2019
    Posts:
    58
    hi i was just wondering how i would go about generating tiles in 3d space, i have found loads of documentation on how to to a 2d tile generator however when i try and get it to work with cubes in 3d it doesn't generate anything, i have learnt the basics c# but need practise so if there are any tutorials i could use i would appreciate it muchly if you could post them
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Could you elaborate on what are you trying to generate? A maze? A cave? A random 16x16x16 block with certain cubes missing?
     
    SparrowGS likes this.
  3. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Doesnt generate anything?, not even errors?
    Show us the code you tried.
     
  4. twn9009

    twn9009

    Joined:
    May 2, 2019
    Posts:
    58
    it generated a hella load of errors i just used code for a 2d tile generator and changed the vector2 to vector3 and added in the z data, its deleted now i'm clearly barking up the wrong tree, i'm trying to generate an infinite procedural landscape that's mostly smooth so that i can add random "biome" related assets to each generated tile, each tile needs to be saved when it is discovered and loading a few tiles at a time around the character to make it seem seamless is what i am trying to go for, sorry for the info dump just don't know where to start
     
  5. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    You'll want to search up voxel terrain generation / chunk generation. It's going to be a lot of work to generate a seamless, streaming infinite terrain.
     
  6. twn9009

    twn9009

    Joined:
    May 2, 2019
    Posts:
    58
    okay thanks i've had a quick look into voxels and octrees but i'll keep searching