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

Use CSV/XML file to drive shader

1 REPLY 1
Reply
Message 1 of 2
valentin_n
190 Views, 1 Reply

Use CSV/XML file to drive shader

Hi,

on my current project i'm trying to have something efficiently set and easily manageable.

What i'd like is to use an XLSX files that i made that contains :
column A = ID
column B = Name
column C to E = R G B value as float


The XLSX file will be converted to either CSV or XML but i don't know which one.

I also don't know how to use the file i have to actually drive the color value depending on the attribute value of my object.

There's one line of said file

6Light green0,7610,8550,722


Let's say my object has an attribute called "materialName" and it's value is "Light green". I'd like that at rendertime, it automatically fetch the RGB value in my file and inject them to my shader accordingly (via a UserDataRGB node i guess).


I don't know if i'm clear to be honest, i hope i am ^^

Thanks for the answer

Tags (2)
Labels (2)
1 REPLY 1
Message 2 of 2
madsd
in reply to: valentin_n

Try look here.

https://www.facebook.com/groups/OSL.Shaders/permalink/492412244875233/

Link to files.

https://github.com/qmasingarbe/osl-shaders/tree/master/TextShader

He loads the vec2 into the shader as points and draw them in shade space.
You can extend it to a normal 3 float vector(x,y,z);

Maybe you can find some inspiration to dump xml data to shaders that Arnold will render like this. If that is what you need.

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

Post to forums  

Autodesk Design & Make Report