PDA

View Full Version : nvpx.CreateConvexHull Error - Cannot convert Editable Mesh to type Mesh


wallworm
04-13-2012, 04:34 PM
After updating the PhysX plugin to 2.71 in Max 2012 a chunk of code now fails. In fact, the code fails in a vanilla install of Max 2013 too. The following code worked for me in previous versions, though.



/*Make a teapot*/
tp = TeaPot()

/*convert teapot to mesh to pass into PhysX function*/
ConvertToMesh tp

/*Create an empty Editable_mesh to store the new hull*/
newnode = Editable_mesh()

newnode.mesh = nvpx.CreateConvexHull (tp) 44 0 --Exception happens here!

update newnode


The exception that happend:
-- Unable to convert: $Editable_Mesh:Teapot001 @ [0.000000,0.000000,0.000000] to type: Mesh


Any ideas? Is it that I was originally using this function incorrectly (but it magically worked), or is this a new bug?

hblan
04-17-2012, 01:49 AM
ss = editable_mesh ()
classof ss.mesh --> TriMesh

make a box , convert it to mesh . select it . then :
classof $ --> Editable_mesh
classof $.mesh --> TriMesh

Editable_mesh == TriMesh -- > false

that is means :
classof ss.mesh != classof any mesh object .

--------------------------------------------------
Maybe the return of function u mentioned is a "Editable_mesh" . then u assign it to a TriMesh varable of the Editable_mesh modifier class instance .
---------------------------------------------------
maybe coding like this will be ok :
(editable_mesh()).mesh = (the return of the function).mesh

wallworm
04-18-2012, 11:56 AM
Thanks for the feedback. I actually tried that and various similar ideas when the functions stopped working... and it would always simply fail. It just happens that in previous versions you could pass an editable_mesh (and the function would work fine). But now it simply won't work in any way I write it.

nVidia has now confirmed this to be a bug in these versions of PhysX/MassFX (http://forums.developer.nvidia.com/devforum/discussion/comment/15546). There are related hull functions that are also broken that specifically take nodes instead of a trimesh and they are also broken.

CGTalk Moderation
04-18-2012, 11:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.