Home ShaderMap Legacy

How to Add Object From Blender

Is it possible for ShaderMap2 to look in a .blend file and find the objects / meshes created by Blender for adding to a project?

Let me know if you require a sample .blend file and I'll make it available... are file attachments accepted on this forum?

Thanks!

Kelly

Comments

  • Kelly wrote:
    Is it possible for ShaderMap2 to look in a .blend file and find the objects / meshes created by Blender for adding to a project?

    Let me know if you require a sample .blend file and I'll make it available... are file attachments accepted on this forum?
    Kelly

    Blender files are not supported. Currently only FBX and OBJ are supported form mesh import.

    I will add this to "the list" and research the file format at some point. If Blender provides a decent API for loading .blend files it won't be difficult to create an import plugin for SM2.

    I do not require sample .blend files but I appreciate the offer. Attachments are not enabled on this forum at the moment.

    Thanks for your question. :cool:
  • Thanks for the reply Neil - I'll see if I can find somebody more qualified than I to address the API question.

    KellyHi Neil - just was passed this:
    http://www.blender.org/development/architecture/blender-file-format/

    Hope this helps :)
  • However, you should be able to export a mesh from Blender to obj format and load it into the SM Visualizer. I just tried a mesh exported from Lightwave as an obj with 268,000 faces and it loaded fine in the visualizer. Haven't tried Blender though.
  • EXHIBIT-A.png
    Well... In limited testing, the two exports from Blender (v2.66.1) of the mesh, one in .fbx, the other in .obj had different results when adding them into the Material Visualizer.

    The .obj crashes ShaderMap.

    The .fbx is received without issue; however, the texture is not displayed after dragging and dropping the Standard material onto the mesh, only the averaged color gets applied to it and very uniformly. Dragging the Parallax material onto had strange results. Being so new to all of this, I may have messed up something somewhere along the line.
  • In the first test, the results of which are shown above, (eye hook study) the mesh had a subsurf applied to it and some of the edges marked as seams.

    In the second test, (Suzanne) the mesh had only a subsurf and in the third test, (cube) the mesh had nothing done to it. Both 2nd and 3rd test results are shown below.

    In all three tests, the .obj crashed ShaderMap.

    All three meshes (in both formats .obj and .fbx) are available for inspection here.

    EXHIBIT-B-C.png
  • Kelly wrote:
    In all three tests, the .obj crashed ShaderMap.

    Hi Kelly,

    I had a look at the OBJ files and it confirmed my suspicion. The mesh files are missing NORMALS and TEXTURE COORDINATES. Both are required when importing to ShaderMap.

    In your 3D modeling application you will need to ensure normals and texture coordinates are included when exporting. You may need to assign texture coordinates (UV Map) to each model before exporting.

    For Blender see: http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV/Unwrapping

    _N
  • eye-hook-UV.PNG
    D'oh! I hadn't unwrapped the mesh!

    After unwrapping and another export, the .fbx looks okay :)

    The .obj likewise worked, noting the Blender export options has a specific check box to include normals which by default was unchecked (for any Blender folks reading :)

    Thanks for pointing me in the right direction Neil.

    Kelly
Sign In or Register to comment.