Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on October 11, 2010, 05:05:37 AM

Title: Rotate PF function?
Post by: cyphyr on October 11, 2010, 05:05:37 AM
I'm sure I saw a thread about this but I cant find it. It was using a fairly simple (5 nodes?) function network to rotate a Power Fractle about its y axis. I've seen a number of threads looking for the same or similar thing but the usual answer is "hmm, you couldn't do that without functions". Can anybody remember this thread and point me to it?
:)
Cheers
Richard
Title: Re: Rotate PF function?
Post by: FrankB on October 11, 2010, 05:45:05 AM
I don't know how to rotate a PF, I don't think it's possible (happy to stand corrected) , but I know how to rotate a perlin 3D noise. Copy and paste the below into TG2, and play with the rotate vector node.

Cheers,
Frank

<terragen_clip>
    <constant_scalar
        name = "Constant scalar 02"
        gui_use_node_pos = "1"
        gui_node_pos = "-1160 300 0"
        gui_group = ""
        enable = "1"
        input_node = ""
        gui_use_preview_patch_size = "0"
        gui_preview_patch_size = "1000 1000"
        scalar = "22"
        >
    </constant_scalar>
    <constant_scalar
        name = "Constant scalar 01"
        gui_use_node_pos = "1"
        gui_node_pos = "-1300 260 0"
        gui_group = ""
        enable = "1"
        input_node = ""
        gui_use_preview_patch_size = "0"
        gui_preview_patch_size = "1000 1000"
        scalar = "300"
        >
    </constant_scalar>
    <rotate_y_vector
        name = "Rotate y vector 01"
        gui_use_node_pos = "1"
        gui_node_pos = "-1360 320 0"
        gui_group = ""
        enable = "1"
        input_node = "Get position in texture 01"
        gui_use_preview_patch_size = "0"
        gui_preview_patch_size = "1000 1000"
        angle_about_y = "173.25"
        >
    </rotate_y_vector>
    <perlin_3D_scalar
        name = "Perlin 3D scalar 01"
        gui_use_node_pos = "1"
        gui_node_pos = "-1340 200 0"
        gui_group = ""
        enable = "1"
        input_node = "Rotate y vector 01"
        gui_use_preview_patch_size = "0"
        gui_preview_patch_size = "1000 1000"
        scale = "Constant scalar 01"
        seed = "Constant scalar 02"
        >
    </perlin_3D_scalar>
    <get_position_in_texture
        name = "Get position in texture 01"
        gui_use_node_pos = "1"
        gui_node_pos = "-1380 360 0"
        gui_group = ""
        enable = "1"
        input_node = ""
        gui_use_preview_patch_size = "0"
        gui_preview_patch_size = "1000 1000"
        >
    </get_position_in_texture>
</terragen_clip>
Title: Re: Rotate PF function?
Post by: cyphyr on October 11, 2010, 05:53:21 AM
Most excellent, this will do the job VERY nicely :)
Thankyou
Richard
Title: Re: Rotate PF function?
Post by: FrankB on October 11, 2010, 05:54:11 AM
glad to help :)
Title: Re: Rotate PF function?
Post by: inkydigit on October 11, 2010, 09:32:09 AM
thanks Frank...always good to learn something new!
Title: Re: Rotate PF function?
Post by: dandelO on October 11, 2010, 12:13:17 PM
You can rotate almost any shader by plugging it into the shader array node, including a fractal. Set the shader array to create only one instance of the input shader and use the rotation control to rotate the input shader around Y.
Title: Re: Rotate PF function?
Post by: cyphyr on October 11, 2010, 12:38:15 PM
This is what I needed the rotation function for.
Works a treat. I couldn't get your method to work Dandleo on a planetary scale.
Cheers guys
Richard
Ps works animated too  :)