Register Latest Topics
 
 
 


Reply
  Author   Comment  
ruchit

Cooking networks
Registered:
Posts: 156
Reply with quote  #1 
Hi,
Need help for exporting alembic Data with shader info using Python & JSON.

*How to store ...Which shader is assigned to particular mesh?
*How to store ... Which shaders (i.e multiple) is assigned to mesh face ??
0
Zeedorf

Second taste
Registered:
Posts: 45
Reply with quote  #2 
Easy like 1-2-3 :)

First of all you should define to store the data shader or geometry centric way. I mean that you can store geo -> shaders or shader -> geos.

I pretend the goal is to reconnect shaders to an alembic cache. I developed shader-geometry connection method which was shader centric. The data model looks like this:

{
  "Geometries": [
    "geoName1",
    "geoName2",
    "geoName3.f[4:30]",
  ],
  "Shaders": {
    "displacementShader": null,
    "surfaceShader": "ShaderName",
    "volumeShader": null
  },
  "ShapeAttrs": {
    "attrName1" : "value1",
    "attrName2" : "value2"
  }
}


So the shader is saved as .ma file and the .json file is store the shader name and the connected geometries. I found useful to store displacement, surface and volume shaders separately. Also useful to store shape node attributes and their value because render engines like Arnold has a lot of settings on the shape node.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation: