Planetside Software Forums

General => Terragen Discussion => Topic started by: archonforest on June 15, 2017, 03:50:41 AM

Title: Displaced object weirdness
Post by: archonforest on June 15, 2017, 03:50:41 AM
I have a displaced sphere to create a rock. Now if I copy and paste the object I get a different looking rock. Why? Technically the PF data is the same no? So why the displacement is different?
Title: Re: Displaced object weirdness
Post by: Dune on June 15, 2017, 07:27:19 AM
Different location means different values for pf in world space. Could that be it?
Title: Re: Displaced object weirdness
Post by: archonforest on June 15, 2017, 09:06:44 AM
Quote from: Dune on June 15, 2017, 07:27:19 AM
Different location means different values for pf in world space. Could that be it?

Well could be. Not sure how TG sees this PF in its pipeline. I thought it is a separated PF from the planet and it is not effected by anything else. But looks like it is not true.
Title: Re: Displaced object weirdness
Post by: Oshyan on June 15, 2017, 06:41:39 PM
Power Fractal noise functions are in World Space by default. This means the noise function is anchored to the absolute coordinate positions of the overall scene, rather than to coordinates/position relative to the object's position. So if you move the object, the area of the noise function that influences it changes too. This is what the "Translate textures with planet" option in the Planet object is for. So you could replace the sphere with a Planet and use that option.

The other approach would be to add  a Transform Input shader in-between your Power Fractal and the displaced object, then copy the new position of the object to it (Translate and Rotate functions). This will give you the noise function as it appeared if the object was at 0,0,0. If you need to replicate a look for an object that was elsewhere you'll have to work out the difference in coordinates between the old and new position of the object to put that into the Transform shader.

- Oshyan
Title: Re: Displaced object weirdness
Post by: Dune on June 16, 2017, 01:58:52 AM
Or put a cam in the center of the rock, render a spherical image and use that as image map shader's input for other stones elsewhere; they would be all the same.