Pages

Wavefront obj Exporter with Materials

Marten van der Honing sent me a modified version of zbyls' X exporter hacked to export wavefront .obj files with materials. Click for direct download, and see the file's header for contact information.



[ ObjExporter.rb ]


15 comments:

  1. That exports to .x (not sure what that is) not .obj. Please fix it because I want to make .obj models with textures!

    Thanks

    ReplyDelete
  2. Works great, thanks!

    ReplyDelete
  3. @Seif :

    Don't download the X-Exporter, if u want to export an OBJ-file.

    There is a link in the post to: [ ObjExporter.rb ] - use that one to download the OBJExporter :D

    ReplyDelete
  4. AnonymousMay 29, 2009

    i cant get the model to show up in daz, someone one help me

    ReplyDelete
  5. AnonymousMay 29, 2009

    nvm, but i want to know how to texture it

    ReplyDelete
  6. AnonymousMay 30, 2009

    Hi, I found a small problem in the UV coordinate export. I had to change lines 598-599 to just

    uq = (uvq.x)
    vq = (uvq.y)

    This was only necessary with a certain method of texturing (not sure of the details) but if anyone has this problem, try changing those lines.

    ReplyDelete
  7. AnonymousJune 09, 2009

    where the hell do i put it

    ReplyDelete
  8. Thanks for sharing! The script works great! Thanks anonymous for the heads up on tex coordinates.

    ReplyDelete
  9. Found that I had to make the change to 598-599 as listed above and then also had to change line 62 from mapKd to map_Kd (added underscore) for a lot of things to pick up the texture.

    ReplyDelete
  10. I have downloaded the obj exporter from here and placed it in the plugins folder of version 5, 6.4, 7.1 and it hasn´t worked at all. Can you tell me what version you are using console says.

    string pattern instead of regexp; metacharacters no longer effective
    C:/Program Files/Google/Google SketchUp 6/Plugins/ObjExporter.rb:716: warning: string pattern instead of regexp; metacharacters no longer effective
    C:/Program Files/Google/Google SketchUp 6/Plugins/ObjExporter.rb:716: warning: string pattern instead of regexp; metacharacters no longer effective

    ReplyDelete
  11. Teacher - I get those warning also. But they are just that: warnings. The export is working for me in spite of the warnings.

    Where are you saving the outpu to, and does the file exists there?

    ReplyDelete
  12. the link is now broken and will suggest the simple "ObjExporter.rb".
    "- Simple export to Wavefront .obj file. Supports v's and f's only."

    But I am interested in the exporter that exports materials as well. Can you please update link? Thank you!

    ReplyDelete
  13. While testing this (I too made all the changes mentioned on lines 62 and lines 598 - 599) I found that all solid colors are successfully imported into Blender, but textures (i.e. bricks, translucent glass,etc) are lost. Any further suggestions on mods that might retain those textures? Thanks again.
    ~jon

    ReplyDelete
  14. Thank you for this program. I downloaded it and used it in SketchUp version #6 and I was able to export as an .obj. I found that if I exported to Bryce I didn't get the windows or door BUT if I exported to Wings3d I could alter the .obj to include the windows and doors.

    ReplyDelete
  15. The link is broken! Please fix!

    ReplyDelete