Jump to content

Exporting model (with textures) to .obj and .mtl - use in webGL


Recommended Posts

Hi,

I am new to this forum and I am pretty new to Houdini. I was searching for this information on web already, but with no luck. So, what do I need?

 

I must develop small 3d game in webGL using Three.js. And because I don't want to "model" everything programmatically, I decided to use Houdini for this. I just need few models (character, walls, enemy...), nothing complicated. But, to use it webGL project, I must have .OBJ and .MTL file with all textures. I managed somehow to export model to obj and mtl, but there is "no signs" of textures on those. Just pure silver color... which is not ok.

So, does anybody know how can I export to .Obj and .MTL properly, with textures and all other stuff. And btw, if you know some other method, how to export form Houdini to use the model then in webGL project... i would like to know it :)

 

Thanks, and sory for my bad English...there my be some mistakes :)

 

 

Link to comment
Share on other sites

obj is easy - as you've found...

but mtl isn't possible within Houdini natively...

you could write your own exporter in python without much trouble

just find the material assigned to the object (or group of primitives) and then write an entry in an .mtl file - you can find the format online - it's pretty simple, just formatted text...

Link to comment
Share on other sites

Hmm, that's sad. One of the best software of its kind and have no ability to export .mtl natively.

 

Yes, I was already looking at .mtl file, but I probably don't know enough python and Houdini to write an exporter for it. Also, I didn't find any on web. (or maybe I was searching for wrong phrases).

I guess I have to use Blender for this purpose, although Houdini FX is great software and I like it more than other similar programs.

Link to comment
Share on other sites

well to be fair .mtl is simply not used much anymore...it's very limited.

 

Aha, yea, maybe this is the reason.

So, I remember now, that I can also use JSON format in Three.js, and I see, I can export it from Houdini. But again, there are no references to textures in it. So, I am wondering if maybe I am not doing something right?

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