![]() ![]() Vector, float or int fields of vert object are exported as point cloud attributes with the same identifiers as field names. ![]() Noise texture used as driver for instances scale There are also some strange behaviors: -UVs affect the result - even though we are baking directly to vertices. Pottery is another important source of script as vessels often carry either painted or inscribed writing. OutPoints = p // scale field is exported as an array The best-preserved examples of Maya writing are often from stone monuments, most commonly altars, stelae and elements of architectural sculpture, especially around doorways and stairs. Vector p.noise // Now per-point texture values are accessible by this field vector p.scale = p.noise* 3 // Use texture to drive instances scale To access texture values, declare vector field of vert object with same identifier as input array: vert p = inPoints Values are exported to output array under noise identifier: Input to mgAutomata node comes from mgSampler node, which computes texture values for given set of points. If connection made to inPoints contains array of integers named prop, then in order to access those values declare int field of vert variable named prop and perform input operation. The same approach applies to array attributes (inPoints, outPoints). If mesh connected to inMesh attribute of mgAutomata node has vertex color set named colorSet, then in order to access per-vertex colors within a script, declare vector field with the same identifier as a color-set name: vert v = inMesh Įvery vector field of vert variable that is outputted to outMesh attribute is converted to a color set as well: vert p = inMesh Communication with Maya environment is achieved through node attributes:ĭata input from Maya scene to mgAutomata is performed through attributes visible in script scope, under the same identifier as long name of node attribute: vert v = inMesh Ĭomputation results are exposed through node attributes in the same manner: outMesh = v Īs input and output operations of numeric data are straightforward, there are some custom rules for point and mesh data. ![]() Computations of new values are performed within mgAutomata node. 1 for the example network.MGL operates on a point data like position, normal vector, scale or user defined properties. Then connect the mentalrayVertexColors node to any shader. You should see a colorSet1… just select it, click “Update” and you should have the property you’re looking for. If you don’t see a lorName property on your mesh, try selecting the mesh, then go to Polygons > Colors > Color Set Editor. In mental ray, you’d create a mentalrayVertexColors node, and connect –> mentalrayVertexColors.cpvSets. If you were to select some vertices and look at their properties in the Component Editor, you should see values attached to the “red” “green” and “blue” vertex attributes.Īll that’s left to do at this point is to connect this color data to a texture that can read it. If you have more than one point attribute exporting from Houdini, you may want to check the script editor to make sure you know which index of AlembicNode.prop you are supposed to be connecting.įinally, make a new mesh node and connect arrayToPointColor.outGeometry –> newMesh.inMesh. Create the arrayToPointColor node, and feed it your geometry (mesh.worldMesh –> arrayToPointColor.inGeometry) and then feed it your data array from the AlembicNode (AlembicNode.prop –> arrayToPointColor.inRgbaPP). There is a node called “arrayToPointColor” that will read an array of data and apply it to the point color of the mesh it’s connected to. The Alembic node, though, still contains that data, as the 0th index of the array “prop.” Now all you have to do is get that data from the Alembic node onto the vertex color somehow… Then choose your color and click the button. Maya is creating this “Cd” attribute on the mesh, but it has no idea what to do with the data so it throws an error. Color Changer (ctrls) 1.1.0 for Maya (maya script) Simple select all ctrls that you want to change color. Error: output_AlembicNode.prop -> subnet1.Cd connection not made // Data types of source and destination are not compatible. That’s when I checked out the script editor in Maya a little more closely and saw this: // Error: line 0: Connection not made: 'output_AlembicNode.prop' -> 'subnet1.Cd'. I tried renaming the Cd point attribute in Houdini to all kinds of things in the hopes that Maya would recognize the data, but Maya wasn’t having any of it. The Alembic node makes that a fairly painless process now that Houdini and Maya both support Alembic import/export, although it turns out that getting any data other than point positions and normals is kind of a hassle. From then on you can plug that anywhere that accepts color like diffuse etc. I’m working on a project right now that involves exporting cached geometry from Houdini to Maya. colorName plug to the colorSet plug of the vertex color texture. ![]()
0 Comments
Leave a Reply. |