Procedural Scaling

Started by dhavalmistry, January 29, 2008, 03:15:13 AM

Previous topic - Next topic

dhavalmistry

I just thought of this while I was on my way back.....

you make default terrain and add a very simple voronoi function with a procedural function as scale of voronoi (based on altitude, see screenshot below) ...and there you go....

a semi detailed rock! (1.jpg)

then you add some details (in my case connect the remaining nodes) and there it is.....a little more detailed rock! (2.jpg)



Render Times:

1.jpg - 10 min 53 sec
2.jpg - 12 min 17 sec
def.jpg - 08 min 02 sec


800 x 600
detail - 0.5
AA - 2
GI - 1,1





[I made 2 get position nodes so that I could keep the node network tidy and clean, I dont like node lines cutting through nodes.]
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

rcallicotte

This is very cool.  Your node work looks more complex than your explanation, though.  Not sure I could build what I see just by following the node network.  The values behind, etc. could keep me from getting your excellent results.
So this is Disney World.  Can we live here?

Matt

This looks really good, but you'll find that the magnitude of the details/distortion is proportional to the distance from the origin (0,0,0). In other words, further away from the origin the distortion will get to a point where it's much too large. That will always happen when you use a function to change the scale of a noise function.

Matt


Just because milk is white doesn't mean that clouds are made of milk.

dhavalmistry

Quote from: Matt on January 29, 2008, 08:48:42 AM
This looks really good, but you'll find that the magnitude of the details/distortion is proportional to the distance from the origin (0,0,0). In other words, further away from the origin the distortion will get to a point where it's much too large. That will always happen when you use a function to change the scale of a noise function.

Matt




you are absolutely right Matt...I moved the camera far away and there is hardly any effect of the voronoi....but what I dont understand is why....I mean the scale is dependent on the altitude of the terrain and the altitude is not constantly increasing as we move away from (0,0,0)....please explain further....



Quote from: calico on January 29, 2008, 08:39:41 AM
This is very cool.  Your node work looks more complex than your explanation, though.  Not sure I could build what I see just by following the node network.  The values behind, etc. could keep me from getting your excellent results.


Please dont think that I am not sharing...the only reason I didnt share the TGD is because I just started the project and the result you see is just 5 min effort toward the project....but anyways....here you go ;D
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

rcallicotte

@DH - Oh, I didn't think you aren't sharing.  I just couldn't recreate it based on the node network.  I found this out last time I tried a picture of nodes from moodflow.  I could never get the desired results and tried for a week.   ;D

So this is Disney World.  Can we live here?

Matt

#5
The noise scales itself by multiplying the position input by the inverse (reciprocal) of the scale. When the position input has a large value (i.e. it is far from 0,0,0), small changes to the scale have large absolute changes to the position because it is a multiplication effect. Therefore whatever function you use has more effect on the noise shape at larger distances from the origin, regardless of what function you use.

It is possible to cancel out this effect by dividing part of your function by the distance from the origin, but you need to make sure that there is also a constant component to your scale function which you don't apply the divide to. Difficult to explain without providing an example... but hopefully you can see what I mean.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

dhavalmistry

thanx for the explanation Matt...it did make sense a bit but I guess I will understand more by experimenting with what you just said and what I understood!
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

dhavalmistry

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

rcallicotte

I like the rock face.  I'll try some stuff with your ideas, if I have time.

So this is Disney World.  Can we live here?

Mr_Lamppost

The information about the scaling is interesting I will have to work through some tests when I get the chance. 

Not sure about the steps but the initial rocks look good  :)
Smoke me a kipper I'll be back for breakfast.

bigben

Having a play with this now... thanks DH

Trying a simple hack based on Matt's explanation (if I understand it correctly... or at all  ;))

Feed Get position into Length to scalar
Divide Get position by Length to scalar
Replace previous Get position connections with the output from this Divide vector node.

(May need to add a small constant to Length to scalar before dividing to avoid remote chance of divide by 0 error)

jo

Hi Ben,

Quote from: bigben on January 29, 2008, 10:46:03 PM
(May need to add a small constant to Length to scalar before dividing to avoid remote chance of divide by 0 error)

The Divide family of nodes safely handle divide-by-zero, as mentioned in the docs. I just thought I'd link to the docs to remind people they're there. 99.9% of the function nodes documented now.

Regards,

Jo

bigben

Quote from: jo on January 30, 2008, 01:11:06 AM
Hi Ben,

Quote from: bigben on January 29, 2008, 10:46:03 PM
(May need to add a small constant to Length to scalar before dividing to avoid remote chance of divide by 0 error)

The Divide family of nodes safely handle divide-by-zero, as mentioned in the docs. I just thought I'd link to the docs to remind people they're there. 99.9% of the function nodes documented now.

Regards,

Jo

Hi Jo

Yes I've noticed that. I'd already made a separate bookmark direct to the function nodes docs... very helpful.. even if I hadn't read that bit  ;)
.
http://forums.planetside.co.uk/index.php?board=18.0;sort=subject

rcallicotte

Sweet!

Quote from: jo on January 30, 2008, 01:11:06 AM
99.9% of the function nodes documented now.

Regards,

Jo
So this is Disney World.  Can we live here?

dhavalmistry

#14
yea there are even documentations of the nodes that are not current present in TG2....I guess they are saving themselves for the final version...


I am particularly and egerly waiting to get my hands on "bias scaler" node


http://forums.planetside.co.uk/index.php?topic=3175
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"