• Posts 17
  • Reputation 0
  • Member Since
  • Last Active
Email
All Posts Topics Started Likes
pyExpression and batch rendering.
Thanks for the reply pshipkov.

The example file is just for a point cloud that mimicked what I am doing on my end. I Am exporting particles with many attributes from Houdini into Maya. Using the Houdini engine and baking out a cache file increases cache sizes to staggering amounts due to all the extra attributes that are added automatically. Using python I can write the particle data as a custom file format out of Houdini and Load it into Maya using the PyExpression node and only save and use the necessary attributes saving massive amounts of space. However, over the weekend I had discovered the SOup nCache manager that helped break down the cacheFile command which helped a lot.

In the end what I was hoping for is a way to rig up user controls to adjust the attributes of an already cached file such as speeding up or slowing down rotation or changing item id's. We are in the process of transitioning into 2018 but for the time being we are working with 2014. 2014 does have the ArrayExpression and it does not work with Cache array data. This would be really useful to have the arrayExpression or a new cacheArrayExpression to use to alter incoming cache data.

Thanks again for your time!
0 0
pyExpression and batch rendering.
There should be animation. I have the time variable T offsetting the rotation output.

I have also tried to pipe the y channel of an animated locator to input F[0] and setting it to OF[0] and attaching that to another locator and no animation seemed to happen. When running batch mode the pyExpression plugin states that it is loaded however the array data is not updated as it is when scrubbing the timeline. 
0 0
pyExpression and batch rendering.
Thanks pshipkov. Does the test scene batchrender fine on the Maya version you are running? 
0 0
pyExpression and batch rendering.
If I am interpreting that correctly PE as parallel evaluation? Maya 2014 does not have settings to switch to PE so It must be using the dependency graph? 
0 0
pyExpression and batch rendering.
Thanks pshipkov, I have attached a simplified scene using the same method. Works fine scrubbing and rendering to the pictureviewer but does not work via batch render. 
0 0
pyExpression and batch rendering.
I am using the pyExpression node to randomly create and animate points which is then piped into a dynamic array node and from there into an instancer. When scrubbing and rendering (VRay) through Maya everything works as expected until I try to batch render (locally). At this point it seems that the pyExpression node is not updating correctly.

Is there a way to force the node to update while in batch mode? 

Ssing Soup for Maya 2014 and the latest pyExpression plugin(2016?). 
0 0
Dynamic Array to Particle Shape
Awesome, got it working thanks pshipkov!

Looks like all you need is position and id.
0 0
Dynamic Array to Particle Shape
Using a pyExpression I am creating a position array. This array is being piped into an arrayToDynArrays node and then piped to the particle shape Cache Array Data.

This does not seem to work. the format of the array is  pointCnt, posVect, posVect.. ect. this is set dynamically via the pyExpression node.
Code:
cmds.setAttr(OS+'.tempPosArray', type='vectorArray', *( [len(newVertList)]+newVertList ) )


This works really well with the instancer but seems to fail when piping to the cache array input of a particle shape node. Is the formatting different for a cache array and a vector array. 
arrayToParticles.jpg 
0 0
Poly creation
Running the mel version also gives no mesh.
Code:
setAttr polySurfaceShape1.inMesh -type mesh 

"v" 3 0 0 0 0 1 0 0 0 1
"vn" 3 1 0 0 1 0 0 1 0 0
"vt" 3 0 0 0 1 1 0
"e" 3 0 1 "hard" 1 2 "hard" 2 0 "hard";


However the nurbsCurve works as expected on a curve.create input
Code:
setAttr node.curveAttr -type nurbsCurve 3 1 0 no 3
6 0 0 0 1 1 1
4 -2 3 0 -2 1 0 -2 -1 0 -2 -3 0;

Maybe the mesh data type is flawed? 
0 0
Poly creation
I am looking to store a temporary mesh in the attribute.

After the value is set I should be able to plug in the .tempMesh into the .inMesh of a polyshape.

It works fine if I use a polyCube and connect the .output to the .tempMesh of a locator, disconnect it(setting the attribute) and then plug that into a polySurface.
setMeshDataType.jpg 

What I want to do is manually set the mesh datatype attribute manually.

When using 
Code:
cmds.setAttr(OS+'.tempMesh', "v", 3, (0, 0, 0), (0, 1, 0), (0, 0, 1), "e", 3, 0, 1, "hard", 0, 2, "hard", 1, 2, "hard", type='mesh' )
I get no errors but also no geometry shows up and adding the 'vn' I get the error. I am thinking that There is still something goofy with the formatting that is not working.

In the end I am using a pyExpression node to read a file from a server and using the data in said file to load in a small mesh dynamically. 
0 0
Poly creation
Thanks for looking into that pshiokov.

I want able to get that to produce any results. I did notice that 'vn' is required and so I put it back in and I get an error:
Code:
# RuntimeError: setAttr: Error reading data element number 17: #


Code:
cmds.setAttr('locator1.tempMesh', "v", 3, (0, 0, 0), (0, 1, 0), (0, 0, 1), "vn", 3, (1, 0, 0), (1, 0, 0), (1, 0, 0), "e", 3, (0, 1, "hard"), (1, 2, "hard"), (2, 0, "hard"), type="mesh" )


Looking at the 'documentation' the e values should also be wrapped by parentheses. 


0 0
Poly creation
Looking into this further it seems that just the format of the data being added through the setAttr is wrong and they type = 'mesh' has to be present since it is a non-numeric data type. 

It looks like if I can solve the formatting issue everything should work just fine.

Does anyone know how to properly format the data for a -type mesh? 
0 0
Poly creation
Thanks pshipkov, 

Adding the type='Mesh' returns: 
Code:
TypeError: 'int' object is not callable


I would need full control over where the points are placed and which make up the polygons. Essentially the end goal is reading in an obj file, parsing the obj data with the incoming connections and then piping it to an empty mesh (polySurface).

I have everything good to go except the part of pushing the new mesh data to an 'out mesh' attribute. 
0 0
Poly creation
Using a pyExpression I am trying to fill the attribute with the example on this page for (-type mesh) https://help.autodesk.com/cloudhelp/2016/CHS/Maya-Tech-Docs/Commands/setAttr.html

I have created a data type 'mesh' on the node using.
Code:
 cmds.addAttr( OS, longName='tempMesh', dataType='mesh' )


When trying to set the attribute I am getting an error: Quote: SyntaxError: non-keyword arg after keyword arg.

Any ideas how to properly input the data? My formatting is just off. 

here is the code in the pyExpression node:

 

Code:

import maya.cmds as cmds

 

#cmds.addAttr( OS, longName='tempMesh', dataType='mesh' )

 

cmds.setAttr(OS+'.tempMesh', type='mesh', { ("v" [3 ( (0, 0, 0), (0, 1, 0), (0, 0, 1) )] ),\

                                          ("vn" [3 ( (1, 0, 0), (1, 0, 0), (1, 0, 0) )] ),\

                                          ("e" [3 ((0, 1, "hard"), (1, 2, "hard"), (2, 0, "hard") )] )} )

 

0 0
Poly creation
Can SOup allow you to create polygons, normals and UV's? I'm curious if I can build custom primitives via SOup. 
0 0
count post selected

Add a Website Forum to your website.