satthawut / chemshapes

Automatically exported from code.google.com/p/chemshapes
0 stars 0 forks source link

add support to mixed QUAD/TRIANGLE meshes into OBJ loader - Blender OBJ Exporter ( and other exporters ) Not Compatable #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please don't forget to attach the log_<computer name>.html file together
with your bug report!!!!

What steps will reproduce the problem?
1. Export from Blender ( Or most any other 3D App ) in OBJ Format
2. Load Into Slicer program

System specifications were the error occur?
  Operational System: Windows 7 Ultimate 32bit
  Video Board Model: GeForce 8400 GS

Please provide any additional information below.
I've Also tried importing an OBJ model from Wings 3D with the same results.

Original issue reported on code.google.com by ArtByMic...@gmail.com on 19 Apr 2012 at 6:18

Attachments:

GoogleCodeExporter commented 9 years ago
Any additional info you need just let me know :)

Original comment by ArtByMic...@gmail.com on 19 Apr 2012 at 6:22

GoogleCodeExporter commented 9 years ago

Original comment by hra...@gmail.com on 20 Apr 2012 at 12:31

GoogleCodeExporter commented 9 years ago
BlenderMonkey.obj has a mix of Quads and Triangles in its mesh, which the 
current OBJ loader doesn't support. 
If you triangulate your mesh in blender before saving it out as OBJ, it should 
work without problems!
I'll change this issue to a feature request to "add support to mixed 
QUAD/TRIANGLE meshes into OBJ loader"

Original comment by hra...@gmail.com on 20 Apr 2012 at 12:50

GoogleCodeExporter commented 9 years ago
I added some initial support to the loader. You can see it in this debug 
version:

http://chemshapes.googlecode.com/files/debugVersion_svn_777.zip

Please note that QUADS will cause artifacts in the slicing at the moment, as 
all the slicing shader code assumes triangles.

The best solution for the time being is to pre-tesselate the mesh into 
triangles before saving as obj.

To proper support quads, the OBJ loader would have to split then into 
triangles, but that is too expensive to do in python. 

I'll add this once I port the loaders to c++. 

closing this for now. 

Original comment by hra...@gmail.com on 20 Apr 2012 at 1:07

GoogleCodeExporter commented 9 years ago
You're totally right! I exported a mesh using triangulation in Wings3d and it 
totally worked without a hitch!. Thanks so much :) 

Original comment by ArtByMic...@gmail.com on 20 Apr 2012 at 2:08

GoogleCodeExporter commented 9 years ago
Also the debug version has MUCH better support for QUADS now. Almost perfect 
with very little artifacts. This is great! ^_^

Original comment by ArtByMic...@gmail.com on 20 Apr 2012 at 2:10