Distrobution shader doesnt work on base terrain fractals?

Started by Themodman101, June 07, 2012, 12:32:20 AM

Previous topic - Next topic

Themodman101

http://img341.imageshack.us/img341/6258/needhelpf.jpg

Do I need Some sort of Compute node that im not aware of to get this to work? im using the Distribution shader to try and tell the displacement Fractal to limit itself to a minimum angle of 45 Degree's. You know, for cliffs and stuff. Ive tried using surface layers, but I cant get detail to show up on rock faces Post displacement. Im using a hieghtmap, otherwise I would include a work file. :)

Thanks in advance for any type of help you guys can give me. Ive tried a ton of things, and I cant seem to get this very basic idea to work :/

Ah here is a clip file, just in case that helps


EDIT:

Ahhhh okay guys, I didn't know that I needed both a compute normal and a compute terrain leading into the Distribution shader.

Now I'm wondering something else. is there a special order that you have to do things in to get good results with DEM without loosing the shapes that are there naturally? Cause anytime I add detail it seems I loose the subtle shapes that make up the DEM. and it also creates nasty artifacts.

I attached an image to show what I mean.

Dune

Your smallest scale fractal is probably displaced too much. Especially when you limit by angle, at certain angles there is a rapid increase from 'black to white'. Increase the fuzzy zone (angle).

A compute normal would do before the added PF. Enlarge the patch size to 20 or 50.

I hope this helps.

Themodman101

#2
Oh wow! that made a huge difference! thanks! :o

Why is the default patch size so low compared to that?

Okay, thanks but now im seeing some really strange random blobby forms coming off my secondary Displacement, which is just after my DEM.
http://img99.imageshack.us/img99/2296/problem2mk.jpg

I tell yah, working with DEM data is a huge pain. None of the normal displacements seem to work. Im trying to adjust my scales to fit correctly. But when I do that it gets really blobby. And detail cant be placed on the high degree slopes.

This single node's params are only 2 on the Amplitude, and .7 roughness. On top of the scales that are in the image.


Ive read a few things on this type of displacement. And people say to keep the amplitude the same as the base scale of the Fractal. if thats so, how do you adjust how much Ooomph the Fractal actually has? this is very confusing  :o

Dune

I don't know about the blobs, it's probably a random blob just there where the slope is permitting it. Hitting seed will change it, I guess. If you have an amplitude of 2 and restrict it by the spike limit to 0.2 or so, it won't be an amplitude of 2 anymore. Try that. If you increase roughness to 1.2-1.5 or so it'll have small roughness, but low amplitude. Maybe that's the anwser to your Ooomph...

Themodman101

Yeah that worked really well.

Have any of your guys worked with DEM data? once its already in TG2 I mean, that part was rather easy to be honest.

Is there a specific way that you have to order the displacements? Do you put detail before the DEM? or after.

Tangled-Universe

#5
Quote from: Themodman101 on June 07, 2012, 12:32:20 AM

EDIT:

1) Ahhhh okay guys, I didn't know that I needed both a compute normal and a compute terrain leading into the Distribution shader.

2) Now I'm wondering something else. is there a special order that you have to do things in to get good results with DEM without loosing the shapes that are there naturally? Cause anytime I add detail it seems I loose the subtle shapes that make up the DEM. and it also creates nasty artifacts.

I attached an image to show what I mean.

1) No, that's not true. Like Ulco (Dune) said you'd need to have a compute normal before the terrain fractal in an order like:
Heightfield Shader -> Compute normal -> Fractal Terrain (blended by distribution) -> more displacements -> compute terrain -> shade/texture.

The reason for a compute normal before the fractal terrain is because it will provide the data-stream from the heightfield to the fractal terrain shader with the calculated normals of the heightfield. Since selection by slope is based on the direction the faces are facing, i.e. the normals, you only need to compute those.
For altitude restriction you'd need texture space to be calculated. You can do this separately with a "TEX coords from XYZ" node.
However, a "compute terrain" node does BOTH normals and texture space.

2) See above answer for the most easy way to understand how it works. At a later/advanced stage you can use compute nodes throughout all the network, but seldom that's necessary and like I said only necessary when doing complicated stuff.

I'd suggest you disable fractal detail in the heightfield shader (red one). You'll get a supersmooth heightfield which you can precisely tweak with fractals. Often the enrichment of the heightfield shader by the fractal detail function can get in the way with other things, like fine displacements or fake stones etc.

monks

Very useful explanation by Martin there of the pipeline. I think some things need to be stickied, like Oshyan's description of the Blend Shader. After using World Machine for some time, I've not found TG comes naturally. To be honest the learning curve has frustrated me. That's probably partly due to the fact that I always use heightfields, and they're more difficult to work with.

monks