Access material properties via script?
Alley Rat
Posts: 392
Hi all,
I'm writing a ray tracer (largely based on Peter Shirley's Galileo, but with some custom code), and I'd like to be able to render my G8M characters and DAZ scenes. I can use OBJ files, even making use of the MTL, but the MTL file that's output by default represents very little of the actual information beyond diffuse color, diffuse texture, opacity, in most cases. I've exported OBJ with a character using both 3Delight and Iray source materials, and the amount and type of material information seems to be about the same in both cases. Is there a freely available current reference for scripting in DS 4.10? The wiki is incomplete and isn't exactly helpful for a newcomer.
Thank you
Comments
Have you looked at the sample scripts in the Documentation Centre? There are a couple of material-related samples http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#materials and the next section, on properties, will also be relevant.
Unless I'm not understanding, I believe you'll need to write some files, too:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/file_dz
Hope this helps.
- Greg
Thank you both. And yeah, I will definitely need to write files. My goal is to make it able to render with the click of a button, or to package files for network rendering.