OSL Doesnt work C4D R20 4.01.1-R2

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

Moderators: ChrisHekman, aoktar

Post Reply
sethRichardson
Licensed Customer
Posts: 95
Joined: Thu Feb 27, 2014 2:16 am

As the title says not a single OSL texture works currently.

I have tried every single one in the preset folder, ones that work in standalone etc etc. Not one works in 4.01.1R2, they dont compile.

There seems to be info missing when working in the editor as well.
Attachments
2019-02-05_15-42-38.png
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

You have to connect it to material.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
frankmci
Licensed Customer
Posts: 917
Joined: Fri May 26, 2017 2:00 pm
Location: Washington DC

It's working fine for me under that configuration. Do you have your OSL nodes connected to a material? They won't compile as free-floating nodes.
Animation Technical Director - Washington DC
sethRichardson
Licensed Customer
Posts: 95
Joined: Thu Feb 27, 2014 2:16 am

aoktar wrote:You have to connect it to material.

My question I guess is how do I achieve something like a material switch like so many other engines have?

I need to swap between multiple materials on a single item and would rather not duplicate a ton of materials to do it and clutter my scene when it should be doable with nodes. This is clearly not attached to anything. Does this just flat not work in c4d only standalone?
Attachments
2019-02-05_17-52-27.png
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

You can't connect materials to osl scripts. It's a texture type. Why don't do that with xpresso or python scripts in C4D level?
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
frankmci
Licensed Customer
Posts: 917
Joined: Fri May 26, 2017 2:00 pm
Location: Washington DC

sethRichardson wrote:
aoktar wrote:You have to connect it to material.

My question I guess is how do I achieve something like a material switch like so many other engines have?

I need to swap between multiple materials on a single item and would rather not duplicate a ton of materials to do it and clutter my scene when it should be doable with nodes. This is clearly not attached to anything. Does this just flat not work in c4d only standalone?
As I understand it, the OSL compiler needs to "know" its output in order to compile, so no, it flat out will not compile unattached.

It's perhaps not the most elegant solution, but a Blend Material with the first slot left empty works pretty well as a simple material switch, although you will have to specifically build those materials as "Sub Materials." It can get a little complicated if you need to switch displacements, since that's a separate input.
Animation Technical Director - Washington DC
Post Reply

Return to “Maxon Cinema 4D”