Warp or Distort OSL C4D Noises

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

Is it possible to distort or "warp" the 3D space of the OSL based C4D Noises? Like plug one noise into the Global Scale parameter of another for example?

The functionality I'm missing was called the "Distorter" that you could layer up with classic C4D.

I need this to work in 3D and not the 2D method "Distort mesh UV"

Any help to achieve this in Octane would be much appreciated!!
astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

Surly there is someone who knows how to do this in Octane. This functionality has been in Arnold for a LONG time and Redshift more recently.
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

I have a set of OSL nodes I've been working on for this. Distorting UVW space in 3D based on other textures. Would you be able to work with OSL nodes, can you test this?

These are OSL-based projections nodes for now, so you have to create an OSL projection and point it to the script.
The design is different than for distorted mesh UV, based on user feedback.

As these have more controls over the transformations I split them into 3 separate nodes for rotation, scaling and translation.

Each node supports three types of operation: uniform transform, map-based transform and map-based jitter. Jitter randomizes within a range with the jitter value driven by a map (expected in [0..1] in this case).

They also all have a projection input, so you can daisy-chain them.

Unlike distort UV, each axis gets its own map, and the maps are expected to be grayscale (typically either a single number or a noise). This way we don't have to build a color map with other nodes or use channel split/merge just to translate on one axis for example.

For scale there are also controls that work on all 3 axes at once.

It would be great if you or anyone could test this and see if it behaves as you expect or ways to improve it.

Here are the three nodes:
proj-rotate.osl
(2.6 KiB) Downloaded 65 times
proj-scale.osl
(2.59 KiB) Downloaded 62 times
proj-translate.osl
(1.96 KiB) Downloaded 69 times
Here is a test ORBX with various examples.
demo-projection-operators.zip
(415.42 KiB) Downloaded 61 times
Example of simple distortion:
proj-demo.jpg
Example of the node interface:
projection-node-interface.png
astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

Awesome jobigoud! These look like a great set of OSL nodes that should do what I'm looking for!! I'll report back once I've had some time to test and play with them! Thank you!
astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

Hey there jobigoud, so these OSL shaders seem to do the trick but not with C4D noises as the projection input on the C4D noises seems to be broken. I can only get these to work correctly with other OSL noises that have a working projection input.

Can someone confirm this? Do the transform and projection inputs on the OSL version of C4D noises not do anything? Why are they there if they don't work...

Thanks!
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

If I’m not mistaken in C4D there are two versions of these noises, the original ones and a re-implementation specific to Octane, and there is an option somewhere to tell it to use one or the other, maybe that’s it?
It works in standalone on the "Cinema 4D noise" texture node we have there so it should work I think, unless these are another implementation.
astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

This is using the OSL based C4D noise (only version I believe that is working in 3D world space) but the projection port does nothing.
Not Working.jpg
In this shot I'm using an OSL based flow noise that is being distorted or "translated" by one of your wonderful OSL shaders and this is working great! I just don't know why the OSL C4D noise ports do not work.
Attachments
Working.jpg
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

Most likely this implementation of the C4D noise hard coded the use of the `P` global for the input point instead of using the variable from the projection pin.
If you plug one of the built-in projection like XYZ to UVW or Box and change its transform it's not working either?
User avatar
jobigoud
OctaneRender Team
Posts: 250
Joined: Sat Aug 15, 2015 1:28 pm

Use the "Noise4D" one instead if possible:
Noise4D.png
Noise4D.png (19.35 KiB) Viewed 1719 times
astrofalcon
Licensed Customer
Posts: 29
Joined: Wed Apr 26, 2017 4:32 am
Contact:

As far as I know that is the "old" c4d noise implementation and does not work as a true 3D/4D noise if I'm not mistaken. I'm more familiar with Arnold and Redshift.
Post Reply

Return to “Maxon Cinema 4D”