cheers! here's some progress shots of new environment generation method I'm working on:
( I'm mostly cobbling together example scripts at the moment, but it will all come together as something interesting hopefully! )
here's me getting a landscape generated via heightmap:
now I'm using a smooth algorithm because the resolution of the mesh can make the banded gradient too jaggy. I'll use higher res but smoothing it out a little helps a lot. The reason I don't just blur the height image is because the heightmap generation isn't perfect, there's subtle bumps and dimples that benefit from being relaxed:
this is just me enjoying the fact I can vary the landscape resolution at will:
so, there's a reason I want to use heightmap procedural generated mesh over A- sculpted mesh, or B- Unity's landscape tool. I want to be able to change the mesh resolution at any time without changing the design, so this makes heightmaps ideal. And unity's landscape tool has nice painting features and variable mesh resolution but it doesn't give me control of generating UVs or using custom materials which is important..
the next step for me is now to make the tool generate base environment shapes at random (or based on some control parameters)
task list:
- find method of randomly creating image for use with landscape generation. Main idea: pick several pre-made base images at random and combine in various ways ( flip, rotate, invert) to produce unpredictable result
- change aspect ratio and size of landscape without squashing features and keeping scale consistent - eg smaller landscape area does not produce smaller hills
Ey up! aw, people seem unimpressed with my awesome smiley face landscape. On to the next phase, landscape generation. I've gone ahead with my method of selecting several images at random and mashing them together to give new results. I start with a folder of 20 or so squiggly images- some drawn in photoshop, some are very blurred photos. just trying whatever at the moment to see what comes out. here's some examples:
My current method is to take one image, subtract it from another, and add a third- images are randomly rotated as well. To make up for the 'corner' bits of images going missing when they are rotated arbitrarily I zoom in to the image about 120%. here are some generated terrains:
the next feature added is a blur option which smooths out features quite a lot if they seem too detailed. I used a unity store script called FilterMe which has a ton of different image operations, very cheap. recommend it!
Image slides a bit the more it is blurred. Not sure why yet..
One last feature added to the terrain generator: detail zoom. This means that only a portion of generated images create a terrain, and gives the effect of larger terrain features (all I'm doing is narrowing the uv coords used in the calculation):
That is all for this update! next task is:
- change aspect ratio of landscape (eg, make into oblong) without squashing features
I thought about points for flips and stuff, but I'm worried about people gaming the system and it ending up not being 'for fun'. like how I ended up jumping everywhere in morrowind just to boost athletics.
I do want to have special little jump challenges dotted around, eg launch into the air and try to land on a target (and very short checkpoint timed race paths), so it's a one-time throwaway thing each time you play the level to grab some extra points
Replies
( I'm mostly cobbling together example scripts at the moment, but it will all come together as something interesting hopefully! )
here's me getting a landscape generated via heightmap:
now I'm using a smooth algorithm because the resolution of the mesh can make the banded gradient too jaggy. I'll use higher res but smoothing it out a little helps a lot. The reason I don't just blur the height image is because the heightmap generation isn't perfect, there's subtle bumps and dimples that benefit from being relaxed:
this is just me enjoying the fact I can vary the landscape resolution at will:
so, there's a reason I want to use heightmap procedural generated mesh over A- sculpted mesh, or B- Unity's landscape tool. I want to be able to change the mesh resolution at any time without changing the design, so this makes heightmaps ideal. And unity's landscape tool has nice painting features and variable mesh resolution but it doesn't give me control of generating UVs or using custom materials which is important..
the next step for me is now to make the tool generate base environment shapes at random (or based on some control parameters)
task list:
- find method of randomly creating image for use with landscape generation. Main idea: pick several pre-made base images at random and combine in various ways ( flip, rotate, invert) to produce unpredictable result
- change aspect ratio and size of landscape without squashing features and keeping scale consistent - eg smaller landscape area does not produce smaller hills
My current method is to take one image, subtract it from another, and add a third- images are randomly rotated as well. To make up for the 'corner' bits of images going missing when they are rotated arbitrarily I zoom in to the image about 120%. here are some generated terrains:
the next feature added is a blur option which smooths out features quite a lot if they seem too detailed. I used a unity store script called FilterMe which has a ton of different image operations, very cheap. recommend it!
Image slides a bit the more it is blurred. Not sure why yet..
One last feature added to the terrain generator: detail zoom. This means that only a portion of generated images create a terrain, and gives the effect of larger terrain features (all I'm doing is narrowing the uv coords used in the calculation):
That is all for this update! next task is:
- change aspect ratio of landscape (eg, make into oblong) without squashing features
cheers!
-Rich
[ame="http://www.youtube.com/watch?v=HRyCHh8FnNU"]Car-Tank progress update - YouTube[/ame]
That bouncy car XD
Whats the stuff in the bottom left of the screen? looks like a lil box with blocks
[ame="http://www.youtube.com/watch?v=mvAtPcshHmo"]CarTank_IGATrailer - YouTube[/ame]
Are you going to give points for tricks? backflips or spins etc
If you need a tester again, i'm happy to help
I thought about points for flips and stuff, but I'm worried about people gaming the system and it ending up not being 'for fun'. like how I ended up jumping everywhere in morrowind just to boost athletics.
I do want to have special little jump challenges dotted around, eg launch into the air and try to land on a target (and very short checkpoint timed race paths), so it's a one-time throwaway thing each time you play the level to grab some extra points