Jump to content

Exporting attributes to 3DS Max


Akabane

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!

Link to comment
Share on other sites

  • 9 months later...

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.

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 1 month later...

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

 

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...