Fake stones on a heightfield issue

Started by dhenry2112, January 16, 2017, 02:57:04 PM

Previous topic - Next topic

dhenry2112

The thought just occurred to me that it might be possible to use my heightmap as a mask to run a distribution shader perhaps? Would be most interested in the best way to achieve this.

Dune

2 notes: you can use the tallness function to make a transition from small stones to larger by using a distribution or (white) surface shader with a soft altitude setting as a mask/function. And secondly; your PF's still have the default sizes when applied as displacement for your stones. It's better to relate those sizes to the rock sizes. So for any rock, set highest size to about the rock size, average size about 1/3 or 1/4 of that, depending on how detailed/rough your displacements need to be.
Offset is indeed handy to blow them up, but beware; if you blow them up too much the calculated triangles don't get proper XYZ information. You might have to add an XYZ shader after it to get good further displacements again.

penboack

That video look cool, I shall be very interested to see the final result.

dhenry2112

Quote from: Dune on January 20, 2017, 02:56:10 AM
And secondly; your PF's still have the default sizes when applied as displacement for your stones. It's better to relate those sizes to the rock sizes. So for any rock, set highest size to about the rock size, average size about 1/3 or 1/4 of that, depending on how detailed/rough your displacements need to be.

I am trying to ascertain exactly which parameters match what you are describing as there are no parameters labeled as "highest size" or "average size":

What controls highest size? Would this be the feature scale? So if the scale slider for my rocks is set to 3.5 then my power fractal feature scale should be 3.5 as well?
What controls average size? Is it lead in scale? smallest scale? Displacement amplitude?

I very much appreciate the help. I just need a bit more clarification in order to understand what you are telling me.

bobbystahr

Quote from: dhenry2112 on January 20, 2017, 12:55:24 PM
Quote from: Dune on January 20, 2017, 02:56:10 AM
And secondly; your PF's still have the default sizes when applied as displacement for your stones. It's better to relate those sizes to the rock sizes. So for any rock, set highest size to about the rock size, average size about 1/3 or 1/4 of that, depending on how detailed/rough your displacements need to be.

I am trying to ascertain exactly which parameters match what you are describing as there are no parameters labeled as "highest size" or "average size":

What controls highest size? Would this be the feature scale? So if the scale slider for my rocks is set to 3.5 then my power fractal feature scale should be 3.5 as well?
What controls average size? Is it lead in scale? smallest scale? Displacement amplitude?

I very much appreciate the help. I just need a bit more clarification in order to understand what you are telling me.

I think Dune is referring to Feature scale, Lead in scale and Smallest scale...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

fleetwood

#20
I guess I will chime in. There are several different things being talked about,  Tallness function, Scale function, and more basically what scale of PFs to use for fake stone displacements/ or colors.

When sending input to the tallness and/or scale functions white equals 1 and black equals zero, so whatever gradation mask or altitude distribution mask or PF  you feed in will alter the fake stones basic tallness or scale according to the whiteness level in the spot were that stone occurs.  It you have a set of 1 meter scale fake stones originally and then feed the scale function input a 50 percent gray constant all the stones will now be half a meter. If you feed in a Pf the stones will vary between full 1 meter and zero or they could actually go greater or  negative if you were to feed in unclamped values.

The other item being talked about is simply the colors and displacements applied to the fake stone surface input. The "feature" scale in a PF is the "average", the lead-in will be the largest massed or clumped areas, and the smallest sets the tiniest details . For a one meter stone I would  usually choose average feature scale somewhat smaller than one meter. These are things you can easily see in the fractal previews just scale the window to a 1 meter or 3 meter area and see what results you get as you change the scales up and down, but stones may be very plain if the features are too big for them.

Separate from the PF scales is the amount of displacement set in the displacement tab of the PF. It should be chosen to be appropriate for the stones you are defining. A one meter stone may only need 0.3 of displacement or less. Different looks can be gotten with negative displacement.  Leaving displacement at the default of 1 may be too much. Again you can quickly use the fractal or stone preview window to see if the displacement is ugly or too great or too small or causing spikes. And there are also the roughness and spike limit settings to work with as well as continue spike limit.

  For a 0.2 size stone trying to use 1 meter displacement will most likely be way too much resulting in blown up or spiky stones.

dhenry2112

Excellent and again, many thanks to all of you for your help and for being patient and tolerant of me hehe :)
I am very much looking forward to working on it this weekend and will post some updated results.

Sometimes I wish I could have one of you knowledgeable folk sitting in my office with me to answer questions and explain things lol but the help I have received here on the forums is outstanding.

Dune

Thanks fleetwood for explaining more indepth. Mine was a bit short  :P

dhenry2112

#23
I spent several hours tonight playing with rocks and power fractals. My 3.5m rocks now have a feature scale of 2.3, lead in 1 and smallest scale 0.01. I also adjusted the other rocks accordingly, with displacement values adjusted as well. Its definitely looking better and I'll be working with it all day tomorrow. I thought it would be prudent to share an update to show that your help is being put to good use :)

fleetwood

Quote from: dhenry2112 on January 21, 2017, 03:24:49 AM
...My 3.5m rocks now have a feature scale of 2.3, lead in 1 and smallest scale 0.01.....

Rocks looking pretty good.

Not sure if you mistyped or not, but the "normal" set up is to make the lead in scale bigger than the feature scale. Terragen will create a fractal with whatever numbers are supplied, and if you get a good looking result it's not a problem, but logically the lead in is expected to be the biggest. Every default PF is set up that way, but you can for instance set up the numbers all the same or nearly the same scale for specific effects especially when using the voronoi flavor noise to get distinct cell type structures.

dhenry2112

#25
Results of today's efforts. Didn't get as far along as I would have liked but I can work on it more tomorrow.