Community
Arnold for Houdini Forum
Rendering with Arnold in Houdini and Solaris using the HtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

osl volume shader output

2 REPLIES 2
Reply
Message 1 of 3
jpparker
700 Views, 2 Replies

osl volume shader output

I'm new to OSL for Arnold and would like to create a custom volume shader that can potentially interact with other Arnold nodes. What kind of output should the shader provide? Can I mix volume closures in the same way I can mix surface shaders?

Labels (4)
2 REPLIES 2
Message 2 of 3
jpparker
in reply to: jpparker

In Houdini, this just returns a BSDF type, which doesn't seem to work:

volume sample_volume_shader (
color absorb = color(0, 0, 0),
color scatter = color(1, 1, 1),
color emit = color(0, 0, 0),
float g = 0,

output closure color result = 0
)
{
result = volume_henyey_greenstein(absorb, scatter, emit, g);
}

Message 3 of 3

You need to add a metadata file for the osl file, and add the following:

[node simple_volume] 
houdini.shader_type STRING "volume"

Save this as a file with the same name as the osl file but with the extension ".mtd"



Ashley Handscomb Retallack
Arnold Support Specialist
Arnold Documentation | Arnold Downloads

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report