1x1m world generation

Started by skarlath, September 19, 2012, 08:35:57 AM

Previous topic - Next topic

skarlath

Doing a minecraft video for someone and is there some function you could create that would make the world out of 1x1m  blocks, so still having the shape of mountains and all but just out of blocks?

Tangled-Universe

Interesting question :)

I think what you would need is a lowish resolution heigtfield and try to disable the interpolation for it.
A 512x512 pixel heightfield on a 512x512m terrain should give you 1m square blocks if no type of interpolation and smoothing is performed on it.

I'm not exactly sure how to do it, but I'm interested to see if it's possible once I'm back home from work.

dandelO

#2
Damn! I always wanted a voxel sculptor to render within TG2, imagine how cool that would be.

To add to TU's answer, using 'stepped' as the interpolation method in a heightfield would help to this effect, I'd think. I made this with the stepped interpolation option, the pyramid terrain was originally a flat heightfield. I don't know if there's a way(maybe compute terrain's 'patch size'?) to adjust the interpolation step scale...

* Sometimes I noticed the stepped interpolation method caused an app'crash when the 3D preview tried to draw it, would be interesting to see if it still does that or if it's been fixed.

** I'd also disable 'fractal detail' in any heightfields using it. Then you'll get the real shape of your terrain.

skarlath

this is what stepped gets me. looks a bit odd, and why does tg2 hate vertical faces?

Kadri

#4

You could use image maps too.
The smaller the image map is the more pixelleted-blocky result you get.
Uncheck the "Smooth disp interpolation" box in the "Image map shader" "Displacement" tab.

Or you could use a pixelate effect on your image maps (maybe with just a little blur added) and use your big-normal textures etc.

You can play additionally with the "Compute terrain" node settings too.

[attachimg=1]


[attachimg=2]


[attachimg=3]



Or you could try it with a real cubic object population:

[attachimg=4]



Kadri


I saw your post now. What did you use skarlath ?
"Bluring your image map" was for  that too much vertical look.

skarlath

i wasnt using an image map it was a height field gen with interpolation on stepped

dandelO

#7
No luck with the stepped method then. I just thought it might have been a good base to go from since TU mentioned the interpolation methods in a heightfield shader.

Kadri has it, I think. You could make a top-down ortho render of the greyscale image of your terrain by using 'shade by height' in the heightfield shader. Disable the following base colours node and anything that follows them in the meantime. Also disable shadows and GI for this render, place the Sun at 90 degree elevation.
Then use Kadri's image map method on that as your base heightfield. Use 'plan Y' and give it the same size/coord's as the old terrain had.

Hetzen

TG doesn't surface 90 degree planes, so you have to cheat it a little, by putting in a slight slant. Saying that, Kadri's cube object population would probably give you the best results, as hard displacements tend to crack at corners.

Here's something I was playing with using modulo set at 100m in x,y,z, which warped a PF to create a 100m chequred patern that used the grey value to displace verticly. The edges are smoothed using the same modulo output to drive a half cycle sine curve which is compressed into a square shape with a gain shader and clamped with a colour adjust, this is used to multiply the chequred output to give the sides a gradient to avoid the 90 texture stretch.

The windows use the same function to create the towers, but this time set to a modulo distance of 10m.

j meyer

Could you please show a node view,too,Jon?

Hetzen

Quote from: j meyer on September 22, 2012, 10:54:54 AM
Could you please show a node view,too,Jon?

I think I'd rather put this in a tutorial on greyscales to be honest. It's not very optimal at the moment. This took a while to render, with bucket errors.


j meyer

Ok.  Anyway,a promising approach,should be great in conjunction with
the other procedural city examples.
I especially like the smoothed corners.

bobbystahr

This is such a cool thread I've enabled notify....way t go folks....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

TheBlackHole

I would load a Minecraft map into jmc2obj and import the mesh into TG2. Then add light sources wherever needed, such as near glowstone, torches, lava, etc.
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

mhaze

Brilliant!  This technique could be useful for as variety of uses so a tut would be handy.