Drystone walls any ideas?

Started by illustratedman, October 28, 2007, 01:25:46 PM

Previous topic - Next topic

illustratedman

Hi Folks, this may be a stupid question as I've only been experimenting with TG2 for about 24 hours, but I was wondering if anyone had any ideas or suggestions as to how I could go about trying to incorporate drystone walls in TG2?  See attached pic for a real world example.

I thought the best way to learn TG2 was by trying to recreate some familiar landscapes and as I'm in the North of England that means the North York Moors and Lake District for me.  However, this area is covered in a network of drystone walls and without them things just don't look right - to me anyway. 

I'm guessing it may be possible using an image map - as the walls are always a fixed height I reckon I ought to be able to use a bump map to extrude them out of an existing terrain so that they follow the undulations on the hills.  I reckon it also ought to be possible to somehow restrict a stone texture to the walls an maybe even get the fake stone shader to do the job?

[attachimg=#]Obviously if they were to be a feature of the foreground then I would model a high res section in another app and import it.  But I'm more interested in using them in the middle distance to give a sense of scale.

If anyone can think of a way or nudge me in the right direction Id very much appreciate it.

BTW sorry if I'm not using the correct terminology for TG2, I mostly work in Cinema 4D (although having much more fun with terragen right now).
cheers
alex


dhavalmistry

I am not aware of any techniques that can do that in terragen...the only way I could think of is to model in a modeling software and import it in TG2
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

Mahnmut

maybe you could create a kind of ridge and then cover it with a negative displacement of some net pattern, fractal or image.
image maps for displacements should be the easiest way in my opinion.
I´ll try it, if it works I´ll post you some results.
Best regards,
Jan

illustratedman

Thanks for the speedy replies guys.

After a lot of messing about I have this, which is pretty crude but does give me hope that it might be possible.
Main problem is trying to get the wall to follow the landscape.

Anyway have to stop for the night - real world to deal with.  Will have another bash at this in the morning.
Attached is my render, also a copy of the Tg2 file and the bump map of the wall that I used (had to convert it to a jpeg to attach it) if anyone wants to try it out (apologies for messy nodes - still have no idea what I;m doing).

cheers
alex

dhavalmistry

it is following the landscape....isnt it??...unless you have something else on your mind....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

rcallicotte

Thanks, illustratedman.  This is an interesting idea.

DH - I think it stops on the hill toward the horizon, but that must be because the bitmap runs out.
So this is Disney World.  Can we live here?

bigben

The approach you're taking would have been my suggestion. You can also use the same image map now to restrict the distribution of a fake stones layer if you want to try adding rocks to the wall.  Not too sure how well it would work but it would be interesting to try.

Will

interesting project, keep us posted.
The world is round... so you have to use spherical projection.

illustratedman

Merging heightfields.

In my first attempt (see previous pix) the main problem was trying to combine the bump map of the wall with the heightfield. I just couldn't get the wall to properly follow the contour of the land.  I want the wall to sit on top of an existing terrain.  The only way I could get this work was to merge the original heightfield and the heightfield load  (the map of the wall).  However this is currently disappointing as the result alters the underlying terrain - I'm not sure if it's averging them or what, none of the merge settings I tried seemed to do the trick.  Another problem must be something to do with resolution of the image map as the wall appears to break-up and look spiky.  This increases with distance so must be something to do with the way that detail is relative to distance from the camera or, you know, something.

Combining terrains in worldbuilder.

It seemed to me that there ought to be a way of getting the wall – which is effectively just an image of a white line on a black background – to overlay on top of the existing terrain (whether it be an imported terrain, a generated heighfield or fractal terrain) so that the wall is a constant height above the terrain.  I decided to try this out in world builder (I'm using the latest free version).  Sure enough I found a way of combining my image of the wall with a terrain that allowed the wall to follow the undulations of the terrain and remain a constant height.  It was just a combine device with the 'add' setting. At first I was getting the same spiky effect with the wall, until a ran the image input through a clamp device that clipped the height.

The resulting combined terrain looked pretty good in worldbuilder and so I imported it into TG2 using heightfield load.  See attached image.
In pic 1 you can see that the wall fades out at the edges as the heightfield is blended.  In pic 3 you can see what happened when I tried to add the fake stones shader.  I realised that it was the fractal detail on the heightfield shader that was causing all the weirdness and as soon as I turned that off, pic 4, it started to look more like what I'd been expecting.  However this then meant that fractal detail was turned off for the entire heightfield and so the hill looks very smooth and unrealistic.  I'm guessing there is a way to restrict this to just the wall using the original bump map as a mask – although I haven't quite worked out how to do this yet as I'm basically using slope contraints to limit the grey colour and rocks to the wall – which is obviously not very satisfactory or accurate (this is why I haven't been able to get the top of the wall to match the sides yet).

Using Project X's Canyon shader.

After seeing Project X's post about his briliant canyon shader, I thought that it might be able to show me an alternative way of looking at the problem.  I started a new project with a fractal terrain and dropped in the canyon shader clip file - then tried to work out what it was doing – no joy I'm not that smart.

See attached pic.

However, I did find that by inverting the displacement and making it a little narrower the finished result is very close to what I was looking for – the sides of the wall are nice and steep and it follows all terrain at a constant height.  It proved to me that you can make a 'wall' in TG2 that crosses all terrain and sits on top of the terrain.

However, Project X's canyon shader is obviously the result of some very clever maths but I failed maths and went to art college, so I tend to think of things in terms of images.  What I'd like to be able to do is design my walls as a greyscale image so that I can have breaks and intersections and enclosures and little wobbly bits etc.  There must be a way of applying some of the clever maths in the canyon shader to my wall image map to create a more flexible result that combines everything I've learned so far.

I'm now sure that this drystone wall thing is possible in TG2 it's just a question of finding a recipe that works.

The search continues...

illustratedman

BTW apologies for rubbish spelling - new reading glasses.

cheers
alex

rcallicotte

This is good thinking.  I love your thinking outside of the box.
So this is Disney World.  Can we live here?

dhavalmistry

"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

Mr_Lamppost

Just a thought  :)

This may not give you enough control over the position of the walls or the shape of the fields but may be useful for filling the distance. 

A long time ago I generated a network of walls using the boundaries of Voronoi cells.  I was using POV-Ray but it should be possible in TG.  My guess would be to take the output of a Voronoi 3D Diff Scalar, pass it through a colour adjust and invert it. Then pass that to a displacement shader. 

Walls   ;)

Smoke me a kipper I'll be back for breakfast.

Mr_Lamppost

I went away and did it or at least a first approximation  ;D

The walls are 2m high and a bit thick (change the colour adjust a little).   ;)

I have used a Voronoi 3D Cell Scalar as a blend between two colours to give variety to the fields.

I have used the function that generates the walls as a mask to prevent them getting covered with Grass.  You can use the inverse of this function to confine shaders to just the wqlls.

TGD attached  ;D
Smoke me a kipper I'll be back for breakfast.

bigben

#14
Taking a break from my masking monologue to chat about someone else's masking...  ;)

The results you've got are looking very promising but it sounds like you've made it way more complicated than it should be... or at least to what I was originally thinking of... so bear with me while I pass on some stuff I've learnt from my own expermients.

The mask image... your mask image is good, don't get me wrong, but I personally prefer LZW compressed TIFF, mainly because it preserves clean blacks and whites which can be important when masking. Working on a 0.5m wide wall I wouldn't go below 4 pixels/m for the resolution of your mask. In the sample below I made the wall 3m high so that it wouldn't look so wide.  As for total size... you could quite comfortably go up to 6000x6000 pixels without chewing up too many resources. The other change I made to the image was to drop the white level so that image was a bit sharper and there was a distinct band of white that would make up the primary displacement for the wall

OK enough of the techy stuff...  on to the wall....

Displacement
In the terrains section, add a displacement shader. Set the displacement to the height of the wall, direction: vertical only ... and connect the image map to the displacement function...  Bingo, one wall!

Masking the wall
To cover the entire wall with a surface (or fake stones) you need a mask that covers the entire width of the wall at the base. If you just use the image map as it is, your surface will only appear to cover the top half. Add a colour adjust shader and connect the image map to the input. Set the white level to 0.1 .... Now you have a mask that covers the bulk of the wall. Use this to mask a surface or as a density shader for fake stones.

Masking parts of the wall
But why stop there? Your walls usually have a single row of rocks along the top at a different orientation (or shape) to the rest of the wall. Add another colour adjust shader and set the black level to 0.95 ... now you have a mask to define the top of the wall... cool huh?  Add a second fake stones node and use this as the density shader and you now have a separate layer of rock along the top of the wall! Getting the right settings for the fake stones is another story ;)

Just for the hell of it... add a subtract scalar node, feed the first colour adjust node to input 1 and the seond to input 2 .... now you have a mask for the sides of the wall, should you happen to need one.

Hi Ho Silver... away!!! ......   ;D


PS. I have some UK Terrains that might be handy... http://www.path.unimelb.edu.au/~bernardk/terragen/terrains/ Scaffel Pike or Snowdon might have some suitable hills around them