Jump to content
Akabane

Exporting attributes to 3DS Max

Recommended Posts

Hey people!

I'm currently using Alembic to go back and forth between Houdini and Max.

I've been trying to figure out how some of the attrs need to be setup so that max can read them.

Already figured out I needed to promote N to vertex (otherwise every loaded frame it tries to reload all normals, fails, etc, sloow - other solution has been turning off import N from max so it rebuilt its own, but it wasn't as desired)

Now the problem I'm facing is how to create material IDs for Max - the geometry that came in, even if it had Material IDs in Max, didn't import any kind of attr in Houdini that could refer to that, so I don't know what it needs, if Primitive, Vertex etc...

Anyone had previous experience and wants to share? :D

Thanks!

Share this post


Link to post
Share on other sites

Didn't experiment Houdini/Max with alembic yet. But assigning materials to primitive in Houdini export fine with FBX, Max get them as differents IDs.

Share this post


Link to post
Share on other sites

I tried a number of different approach with various export formats but none of them doesn't work. Houdini does understand material ID from max via FBX. It recorgnize them as groups which have the names of their material. It doesn't work other way around.

Share this post


Link to post
Share on other sites

We ran into the same problem yesterday. We needed Material IDs for fractured geometry that needed to be OBJ. Our workaround was to simply offset the UVs for each ID by 1 in U direction.

So matID 1 was 0-1, matID 2 was 1-2 etc. Then in Max we ran a simple script to assign Material IDs based on the mapping position of each face:
 

(
 with redraw off
 (
  undo on
  for obj in selection do
  (
   int_uvfaces = polyop.getNumMapFaces obj 1
   for i = 1 to int_uvfaces do
   (
    arr_uvverts = polyop.getMapFace obj 1 i
    pos_vert = polyop.getMapVert obj 1 arr_uvverts[1]
    int_ID = pos_vert[1] as integer + 1
    polyop.setFaceMatID obj i int_ID
   )
   print ( obj.name + " done" )
  )
 )
)

HouMaxMatIDs.hip

 

Edited by blackpixel
  • Like 3

Share this post


Link to post
Share on other sites

We ran into the same problem yesterday. We needed Material IDs for fractured geometry that needed to be OBJ. Our workaround was to simply offset the UVs for each ID by 1 in U direction.

So matID 1 was 0-1, matID 2 was 1-2 etc. Then in Max we ran a simple script to assign Material IDs based on the mapping position of each face:

 

Can't tell you how much this helped me out with the same issue.  Thank you.

attachicon.gifHouMaxMatIDs.hip

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×