Rock Won't Displace

Started by treddie, September 17, 2017, 08:02:14 PM

Previous topic - Next topic

treddie

Oh brother!...Is Terragen being stupid, or am I being stupid?   :( >:( :-\

Anyway, please see the attached screencap.  It seems I can get a rock texture, but only in color, not displacement.  I can't figure out why the texture is not displacing.  I tried applying the Power Fractal to the Mesh Displace input of the rock, but no go.

[attach=1]

Kadri


There is a bug i think.
You need to unlink and link the powerfractal again to see the new change in displacement.
Just disabling and enabling doesn't seem to work.

fleetwood

#2
With your example only 20 faces are set, those facets become like the polygons or divisions of the rock model. 20 faces cannot show detailed displacements.

Give the rock a lot more faces if you want to see fine displacement.  Maybe 256 or 512 faces gives you something like a sphere to start with. It will take longer to generate however if you use a population. The rock object is kind of an early Terragen left over, as I understand it, not highly developed, at one time it was considered to be dropped from Terragen, I believe.

Probably it is much better to import your own high polygon rock model and set it to use forced displacement.   

Forgot to add there are   subdivide mesh  and subdivision level parameters in the rock. You probably will want to use those as well for more detail.

Made a test file and a couple renders of it.
1.  Has 256 faces and subdivided 3 times
2. Has 256 faces and subdivided 4 times

Not much difference unless you look close or get the camera closer.
This uses one Pf internally in the rock node with color and displacement to the surface. (Tried using a Pf as an external Mesh displacer but it just didn't work very well . I think 256 is still not enough faces for that)

Oshyan

Literally all you need to do is enable Subdivide Mesh. That will give you basic displacement with the Mesh Displacement input, but it will be faceted with default of subdivision level 3. Try 6 for a smoother look. The number of rock faces doesn't need to be changed to get good displacement, it will just determine how many faces the displacement is based on, but the subdivision is what determines how smooth it is.

- Oshyan

Dune

So a rock with 80 faces is not the same as a 20 faces rock subdivided 4X? How can I interpret that?

fleetwood

#5
Quote from: Dune on September 20, 2017, 02:04:27 AM
So a rock with 80 faces is not the same as a 20 faces rock subdivided 4X? How can I interpret that?

Not sure if this answers your question but I defined a ridiculous rock with only one face (becomes a flat triangle) and put the preview in wireframe display.
In wireframe display, it becomes possible to actually count the subdivisions. By count every new subdivision level divides each previous triangle into 4 smaller triangles.

So in your example a 20 face rock becomes 5120 smaller triangles (20*4*4*4*4)


agent unawares

Yeah, subdivision is exponential, not multiplicative.

Dune

Yeah, of course, I didn't think obviously. But my initial doubt was about whether there is any difference between a rock with a certain amount of faces (say 80) and the same rock with a subdivision employed, totalling the same amount of triangles (so a 20 face rock divided once if it multiplies by 4). Thát was the question actually. Oshyan's remark made me doubt this.

fleetwood

Thought I'd test : 20 face subdivided once versus 80 face not subdivided. Using smooth normals.

20 face rock subdivided once on left.
80 face rock with no subdivisions on right.
Both have same seed, same 1 meter diameter, same color and displacement fractal.

treddie

I don't see displacement out at the edges.  It's as if the rock has been bump mapped, not displaced.

Oshyan

Fleetwood is probably using the Displacement input of the surface shader for the rock and not the Mesh Displacer.

Ulco, even in Fleetwood's non-displaced example you can already hopefully see and understand why a 20 face displaced rock would look different than an 80 face displaced rock *even with the same displacement shader*. It's because the base rock shape changes, and thus the displacement is based on different underlying shapes. It's the same as if you were to import a regular 3D model and displace it - a frog model displaced with the same shader as a horse model would produce different results. This is no different, changing to an 80 face rock does not really make "a more detailed/smooth version of the existing rock", it makes a different rock with more faces. The number of faces is essentially a component of the aesthetic of the rock.

- Oshyan

fleetwood

Quote from: treddie on September 20, 2017, 04:49:26 PM
I don't see displacement out at the edges.  It's as if the rock has been bump mapped, not displaced.

Your eye is right! I neglected to render that with forced displacement so it came out bump mapped only.

But the idea was really to show whether the two rocks are different or not even before adding any displacement.
I think the render shows the two rock shapes are different. In fact they are different in both shape and size from the start.
These two might show it better. One with no displacement and not using smooth normals. One with small pf displacements (forced this time) and smooth normals set on.

Dune

Thanks for explaining Oshyan. My question seemed like a noob question now  :-[

luvsmuzik

#13
Can it also be said that once we have our little subdivided potatoes or pancakes (scaling option) .....that in the displacement function one could then add things like redirec, twist and shear or even a strata option? I think there used to be a fake stone tutorial around that showed these on stones, but this would work even better on subdivided surfaces no doubt?

Edit: I had to hook a compute normal between the PF displace to 50, and redirect on Z, Mesh faces 128, subdiv 3  Oblong scaling. Color and displace function same PF in default shader

Tangled-Universe

Quote from: fleetwood on September 20, 2017, 06:11:04 PM
Quote from: treddie on September 20, 2017, 04:49:26 PM
I don't see displacement out at the edges.  It's as if the rock has been bump mapped, not displaced.

Your eye is right! I neglected to render that with forced displacement so it came out bump mapped only.

But the idea was really to show whether the two rocks are different or not even before adding any displacement.
I think the render shows the two rock shapes are different. In fact they are different in both shape and size from the start.
These two might show it better. One with no displacement and not using smooth normals. One with small pf displacements (forced this time) and smooth normals set on.

Did you also transform the powerfractal to make sure that both rock objects receive the same info?
Say the left rock is at the origin 0,0,0 and the right rock is at 2,0,0.
Then for the right rock you'd need to transform the powerfractals output with +2 meters for an exact match of input.