Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / maxscript names for "body object" and "NURBSurface"
  RSS 2.0 ATOM  

maxscript names for "body object" and "NURBSurface"
Rate this thread
 
63355
 
Permlink of this thread  
avatar
  • jinj
  • Posted: 06 January 2012 09:16 PM
  • Total Posts: 28
  • Joined: 09 March 2009 03:18 AM

hi,
if i want to flip faces or normals of a “body object” or a “NURBSurface” via maxscript, like i do with mesh or poly… how can i do it?
macrorecorder doesn’t shows any info during these tasks.

mesh, body object, NURBSurface, are called suboject.... but no other info are displayed during such operations.

anyone have a clue on this?

converting them to poly lat me loose all the surface tweaking stuff.... adding a edit poly or edit mesh mofifier convert them to mesh if collapsed.. also into dense meshes :(

also would be fun if there is a way collapse a body object in to a nurbssurface… both are nurbs, but nurbssurface are better… more internal options.

for example this is code part to flip normals on mesh

if col.state do (
 
convertToMesh o
 meshop
.flipNormals  o #{1..(getNumFaces o)}
 
update o

thank you in advance



Replies: 1
/img/forum/dark/default_avatar.png

am not a good source to help on this one, just hope anyway that the next helps a bit about nurbs…

ns getNurbsSet #relational
ns.flipNormals true
Author: Anubis

Replied: 07 January 2012 02:24 AM  
avatar
  • jinj
  • Posted: 07 January 2012 05:00 AM

Hi Anubis…

i added that code part.... well it recognize a nurbssurface but not a body object.
runtime error: getnurbsset: node is not anurbs object: $Body_Object:............

for nurbs it doesn’t recognize ns.flipNormals or flipFace/s

any clue?
thank you again



Replies: 0
avatar
  • jinj
  • Posted: 07 January 2012 08:45 AM

after a bit playing I got the ms working.
i’m able to flip the pivot and the normals using this code part:

ns getNurbsSet #relational
flipNormals true

the nurbsSurface is collapsed into a nurbssurface
looking for body object now



Replies: 0
avatar
  • jinj
  • Posted: 08 January 2012 11:57 PM

the NurbsSurface can now correctly edited without to add a normal modifier… meaning a conversion to editable mesh.
the same code works on the body object.... but it works a bit differently on it....
i’m still trying to get the correct codes to handle them.
i hope that n-power translator has a forum.... since the body object are natively written by them for autodesk.



Replies: 1
/userdata/avatar/avatar_14884.gif

nPower does have a forum on their website, but a lot of functions lack access with their tools. AFAIK there is no way directly access faces or selection, and no way to trigger UI actions. On top of that to get full access to a Body Objects properties it has to be loaded into the modify panel.

-Eric

Author: PiXeL_MoNKeY

Replied: 10 January 2012 03:29 AM  
avatar
  • jinj
  • Posted: 11 January 2012 05:55 AM

done… contacted them by email.... and they said that they can’t help with… body object are now an autodesk thingy :) but they still deliver tools for playing with them inside max :)
anyway it would be nice to could convert-collapse them via script into nurbssurfaces.
thank you Erik for the info on it.



Replies: 1
/userdata/avatar/avatar_14884.gif

Not possible. You can go NURBS to Body, but not the other way around.

With the nPower plugins you can extract the data to NURBS, but the results are not overly useful. For example, compound shapes or trimmed objects are exported as untrimmed data. Kind of worthless in my honest opinion.

I would convert to poly and then flip, as that is easily scriptable and supports vertex normals. Unfortunately, at this time when you convert a Body Object you lose the vertex normals that define the surface shading. So for now it doesn’t matter what you convert to as you will lose the normals, but if they ever fix that issue then that would be the safest route to flipping data and retaining proper normals.

-Eric

Author: PiXeL_MoNKeY

Replied: 19 January 2012 05:41 PM  
avatar
  • jinj
  • Posted: 19 January 2012 10:25 PM

thank you for the answer.
i think that the conversion from body object to nurbs is a locked thing.. like the speed limit on a BMW :)
most probably it has to do with the fact that npower will remain an independent plugin for 3ds max.
for the normals flipping, well the problem is gone.... i have now two script that flips the pivots on any supported geometries in max, also one of them while flipping the axis of the pivot.. is able to flip the normals on it ;) i can chose which one to use.
thank you again for the support and answer.

PS: now i have a set of pivots tool useful when working in max with imported geometries which exportation lose any orientation info on it.



Replies: 0
avatar
  • Anubis
  • Posted: 20 January 2012 07:52 PM

its a time someone to build good Rhino2Max importer,
this is what i think about ;)



Max 9 through 2009, XP-Pro x64 SP2
ASUS EAH3450 Series (Driver 8.470).
Core 2 Duo E8400 3GHz, 4Gb Ram, DX9.0c.

Replies: 0