Octane Gradient & OSL Gradient Issues

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

Moderators: ChrisHekman, aoktar

Post Reply
User avatar
blastframe
Licensed Customer
Posts: 178
Joined: Wed May 21, 2014 6:01 am
Location: Los Angeles, CA USA

Hello,
I'm trying to create radial gradient that does not repeat as it does with a SawWave texture. Also, the SawWave is huge so I have to scale it down a lot to fit my object in real world scale. Here is a screenshot of the Octane Gradient set to Radial:
Octane Gradient
Octane Gradient
This is what I'd like to achieve (this was using the C4D gradient, which I'd rather not use for performance reasons):
Cinema 4D Gradient
Cinema 4D Gradient
I searched the forum about gradients and discovered that there is a C4D-esque shader in the OSL shaders. When I tried it, I got an error - I think the code may be broken.

Code: Select all

<node 'Osl Texture'>: warning: Input parameter 'r' is not used
I couldn't find any documentation on how to use it (or the other OSL shaders). I am getting this result:
OSL Gradient
OSL Gradient
Can anyone help me to achieve this radial gradient with either the Octane Gradient or OSL shader, please? Thank you!
User avatar
bepeg4d
Octane Guru
Posts: 10371
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi blastframe,

About Octane Gradient in Radial mode, it is designed to work with 100x100cm plan.
To avoid the repetitions, just use the Scale values in UV Transform to match the scale of your plan, and use the Gradient sliders to define the hardness/dimensions of the circle:
217751AC-504F-44BC-8C18-4043136ABCBA.jpeg
But, if you disable the Auto baking option for C4D Shaders, and enable only the OSL automatic translation, you should be able to use the C4D Gradient node with no issues in 2020.1.5-R4... you should see Gradient(OSL) in the title of the node, if correctly enabled:
FA2EBBAB-5BC5-4CAF-B319-69199BEAB4E5.jpeg
If you want to use a different OSL script, firstly you need to pipe it into an Octane Gradient node to better control the coloring, then you can use the circles1.osl script from /patterns/ collection:
ADB04F29-7A12-4CDE-995F-4C2EB9D8C990.jpeg
Or the gradient.osl node, but it is just the same as the C4D Gradient node with OSL option active... the error messages are not critical, it means that a specific input value has not been used in the script:
485CB2D5-A5D1-4DBB-B4A0-DF706471269A.jpeg
ciao Beppe
User avatar
blastframe
Licensed Customer
Posts: 178
Joined: Wed May 21, 2014 6:01 am
Location: Los Angeles, CA USA

That is excellent support, thank you Beppe!
Post Reply

Return to “Maxon Cinema 4D”