We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › OBJ Export library released
Page Index Toggle Pages: 1
OBJ Export library released (Read 4104 times)
OBJ Export library released
May 3rd, 2009, 4:07pm
 
I've released an OBJ export library that works in the same manner as the PDF and DXF libraries.  You can find it at:

n-e-r-v-o-u-s.com/tools/obj.php

I wanted to make a library to export 3D data that would not be triangulated, and you wouldn't have to reset camera() to have your units export correctly.

It's still in beta.  I plan to add support for multiple groups as well as lines, though it seems many programs do not support the standard for lines in objs.

Jesse Louis-Rosenberg
Nervous System
Re: OBJ Export library released
Reply #1 - May 6th, 2009, 4:27pm
 
Thanks, thats great. I guess ill give it a try
Btw, 3 days ago i discovered your work at the processing flickr pool.
I really like your work! Keep it up!
Re: OBJ Export library released
Reply #2 - May 27th, 2009, 2:02pm
 
Hello Jesse,

Thank you for the posting this. It's true, it's better when you have unbroken polygons instead of a scene full of triangles. I did a library for .OBJ exports based on beginRaw() exporter (which is triangles only). It works for various 3D formats. http://labelle.spacekit.ca/supercad/ (rhino-povray-autocad-sketchup).

Since superCAD is only intended for low-level exports, I felt that for things like groups, layers and more complex objects, it was important to create a better DataStructure first. This is what the library http://anar.ch is for. The lib let you exports unbroken polygons, curves and solids into various formats.

For example, you might have box() or sphere() exported into a solid object (CSG-AXIS solid). We keep adding elements; Rhino's Curves (CSplines) are preserved when exported for example.

I'm currently writting a P5-->ANAR recorder to make the things even more easier. It's based on beginRecord() instead of beginRaw() and should be ready soon.
Re: OBJ Export library released
Reply #3 - Feb 10th, 2010, 9:25am
 
Hi,

I know this thread was posted a while ago.. but I'm having trouble with the library. I get an ArrayIndexOutOfBounds Exception regarding the "vertices" Array, when I want to export rather large OBJ-Files.
It's in this line: float vertex[] = vertices[vertexCount]; in the vertex(x,y,z) function. The index is at 512 when it stops.

I wanted to fix it by initializing the vertices Array with a higher value, but I couldt find the declaration of the array anywhere...

Would be great if anyone can help me with this..
Re: OBJ Export library released
Reply #4 - Apr 27th, 2010, 10:43am
 
Hi,

I know this is quite an old discussion, but I hope someone might still be checking it (Jessica maybe?) and help me with this: I downloaded the cellcycle applet to give it a try on my computer. I also downloaded and correctly (or at least so it seems) installed the required libraries. Still, I get this error message:

Cannot find a class or type named "Face"

referring to line 44:

Face faces[] = new Face[0];

Any suggestions?

Thank you very much in advance.

Alessio
Page Index Toggle Pages: 1