question

Brian Hanke avatar image
Brian Hanke asked ·

Applying transforms to procedural noise?

Is there a way to rotate procedural noise (for example, instead of facing up, have it angled at 45 degrees)? I tried various UV and projection nodes and nothing worked. I seem to remember that Octane had to "bake" noise before transforming. Is it possible in Arnold? Thanks!screenshot-2020-11-18-134242.png

shaders
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered ·

The uv_transform has a rotate.


1605773665503.png


1605773397044.png (377.0 KiB)
1605773665503.png (368.1 KiB)
1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Thank you. I got it working after I set the noise Coord Space to "uv." It defaulted to "object." All good now.

1 Like 1 · ·
Mads Drøschler avatar image
Mads Drøschler answered ·

No problem.
You have a list of ways to do that.

Let me mention the 2 most releveant.

Use the OSL UV Transform node piped into a procedurals noises, P point. Rotate, and its done. This will also show in the viewport under HQ mode in 3ds max.

The second method is to use an Arnold UV transform and hook your noise up to the passthrough slot, then rotate.
Do note, this map wont show in viewport and wont work with viewport PBR. Use OSL method instead.

qwe.png


qwe.png (536.3 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

qweqwe.png


Here I wrote a new shader for you.
All you need to do is wire it up and play with the logic in the UI.

I build the rotation into the noise's UV transform directly and exposed a couple of features in the ui.


shader RotatingNoise
(
    float Rotate = 23,
    float scale = 40,
    float stretch = 0.01,
    output vector Noise = 0,
)
{
    point Po = point(u,v,0);    
    point uv = rotate(Po, radians(Rotate), point(0.5,0.5,0)  , point(0.5,0.5,0) +vector(0.0,0.0,1.0) )*vector(stretch,1,1)/scale;
    Noise = noise("perlin",uv);
}



qweqwe.png (349.0 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Brian Hanke avatar image
Brian Hanke answered ·

Thanks for the reply! I was able to get the result I wanted using this method, but only with one of Maya's noises. Does this not work with aiNoise or aiCellNoise?

Edit: Aha, down at the very very very bottom of the Arnold for Maya help page on aiUVTransform it says it does not work with aiNoise since it's not calculated in UV space. At least I have a workaround now, using Maya noise instead.

5 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Both of them should work fine.

Remember, that OSL Transform is happening before the point is injected, in Arnold Transoform, they have done it post the node, oposit of OSL.
Note I source from the P slot if using uv transform.


I can rotate both noises like this.

ccc.png

0 Likes 0 · ·
ccc.png (183.3 KiB)

Hmm, interesting. I copied your code into an aiOslShader and plugged that into P on the noise and that does indeed work. Any idea why I can't get aiUVTransform to do the same thing?

0 Likes 0 · ·

111.png


Sounds like to me, that you are rotating the frame and not the transform point.

The node has 2 rotate float values, use the Transform one

0 Likes 0 · ·
111.png (111.4 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.