Jump to content

Trouble With Imported Objs


Ruben

Recommended Posts

I`m importing OBJ geometry saved from Maya(with default options) to Houdini (with File SOP) and i get inverted normals and it draws black in the viewport, so i have to ReverseSOP it to get normals looking outward and correct view in the viewport.

Is it normal or maybe i`m doing something wrong?

Link to comment
Share on other sites

  • 1 year later...

Don't know about the uv's (they should just be there if using .obj) but as for the normals, I would blow them away with a Point SOP. If you recompute the normals after reversing the prims, they change slightly!

I don't know how maya generates normals. I suspect they "cheat" their normals slightly to enhance variation of surface topology in the viewport to "enhance" the modelling experience. Just my guess.

I don't trust Maya generated point Normals in Houdini..

Link to comment
Share on other sites

You and me both.

Yeah, you have to export vertex normals from Maya and then use a VertexSplit SOP in Houdini on "N". Here you get the same cusping you have in Maya but end up changing the topology of the mesh to do it. This is because Houdini sadly doesn't support vertex Normals (which is a hard thing to do at this stage, understandably). This an issue if you're trying to "round-trip" geometry back to Maya and you'd like the topology to remain the same. It makes you have to be a lot more careful but its doable.

I can't remember if the Maya OBJ exporter exports vertex normals or point normals.. I think point, right? We have our own BGEO exporter from Maya that does the right thing.

Cheers,

Jason

PS. When I say Houdini doesn't support vertex Normals, I mean that it does carry them on geometry like it would any arbitrary vertex attributes but they don't have special significance in the same way that point normals do. The Facet SOP, Cusp SOP and so on don't pay heed to them or generate them.

Link to comment
Share on other sites

Yeah, you have to export vertex normals from Maya and then use a VertexSplit SOP in Houdini on "N". Here you get the same cusping you have in Maya but end up changing the topology of the mesh to do it.

How exactly you export vertex normals from Maya?

Link to comment
Share on other sites

How exactly you export vertex normals from Maya?

Well, I'm not sure you can without a custom plugin to do it. Unfortunately I know this is the problem but I don't know how to solve it with the available tools. As I said, ours is a custom BGEO exporter. Sorry this only helpful as information and not as a solution.

Just thinking out loud, I wonder if there is a way to export two OBjs from Maya, one as-is and the other with every face unshared. Then attempt to transfer the point normals from the unshared model to the vertex normals of the intact original one and then follow up with a VertexSplit SOP. I'm not sure if it'll work because Maya is notorious for reordering stuff in an unpredictable way but it's worth the 15-minute workout to find out.

Link to comment
Share on other sites

Now what is really weird that there are no UV's Does anyone know how to solve this problem?

Houdini (at least versions 5-8) doesn't import UVs from OBJ files so the good idea is to write your own MEL/MAXScript/whatever converter from your package to Houdini's GEO/BGEO format.

Link to comment
Share on other sites

Now what is really weird that there are no UV's Does anyone know how to solve this problem?

Houdini (at least versions 5-8) doesn't import UVs from OBJ files so the good idea is to write your own MEL/MAXScript/whatever converter from your package to Houdini's GEO/BGEO format.

Houdini's OBJ reader certainly DOES support importing UVs (as vertex attributes). You can try it yourself: if you save out an OBJ from Houdini with UVs and then loading it right back in, the UV's are intact . The problem must be from whichever package you're writing out from not writing them out correctly (or at all). Make sure you have the relevant export options checked in the other package.

Cheers,

Jason

Link to comment
Share on other sites

Houdini's OBJ reader certainly DOES support importing UVs (as vertex attributes). You can try it yourself: if you save out an OBJ from Houdini with UVs and then loading it right back in, the UV's are intact . The problem must be from whichever package you're writing out from not writing them out correctly (or at all). Make sure you have the relevant export options checked in the other package.

Cheers,

Jason

Hummm... Really, I tried to import OBJ in H8 and I see correct UVs but I'm ready to swear that earlier it did not work with both 3DSMax and Maya OBJ exporters :blink: I don't understand :o Are you sure that H5-7 and first H8 builds understand OBJs UVs too?

But maybe I'm liar... :lol: Maybe that was problems with Max exporter only. :unsure:

Link to comment
Share on other sites

But maybe I'm liar... :lol: Maybe that was problems with Max exporter only. :unsure:

Heh heh, yep - it has always worked fine. We still interchange with OBJ a lot since we have some of those other packages like Lightwave and ZBrush for which we haven't bothered with a BGEO exporter.. and I don't remember any time it didn't work for us.

Link to comment
Share on other sites

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...