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.
Page Index Toggle Pages: 1
3D Export (Read 1432 times)
3D Export
Oct 5th, 2005, 5:20pm
 
I noticed a DFX export package in the libraries but there was no .jar or .class to download that I could see. I'm interested in exporting some stuff to 3DMax, but Maya or Blender would be just fine. I have little or no experience with 3D modellers, I'm just interested in recording some paths (using EyesWeb, 2 PCs and 2 video cameras - 2D proof of concept in the bag so far) and then porting them into something that adds a little industrial light and magic.

Any suggestions?
Re: 3D Export
Reply #1 - Oct 6th, 2005, 1:46am
 
St33d,
The Simon Greenwold's DXF lib usage is described here: http://www.architecture.yale.edu/872a/assignment5/DXFWrite.pde. It's not like the Beta libs, you must iclude the code inside your project. It works well and you'll be able to export triangles. But I'm not sure about paths.

For a camera path, you could try to import a path inside 3dMax, and constrain the camera movement to the path. It will be the same with eyes path.

For this, you might try to export your path using .obj format. You could have a look at http://users.design.ucla.edu/~tatsuyas/tools/objloader/index.htm
wich is the inverse process (loading geometry inside p5).

If you want to export a path from P5, you could divide your path in segments and export them in a *.obj file. You export each points. The structure has to look like this:
Code:

o myPathName
v 214.307 0 -157.8553
v 341.646 0 136.476
v -358.3279 0 -86.6762
...
v x(n) y(n) z(n)
...
v 129.358 0 53.818
l -7 -6 -5 -4 -3 -2 -1


o = NameOf your Object
v = Points on your path
l = Make a line with the Points

In P5:
Code:

println("o myPath");
for(int i=0;i<pt.length-1; i++)
{
line(pt[i].x, pt[i].y, pt[i].z, pt[i+1].x, pt[i+1].y, pt[i+1].z);
println("v "+pt[i].x+" "+pt[i].y+" "+pt[i].z);
}
print("l ");
for(int i=0;i<pt.length; i++)
print("-"+pt.length-i+" ");
println();

Where pt[] is your points array.

There must be plenty of other ways to do it, like using AutoLisp instead of DXF lib, but you have to use AutoCAD to import it.
Re: 3D Export
Reply #2 - Oct 7th, 2005, 6:08pm
 
I found a useful .obj file import plug in for max that is freeware. Versions for different editions of 3dMax can be downloaded here

Thankyou for the code and link. I'm going to try both methods to see what works. Personally I only wanted to create a shell around my path to beautify it, the technical demonstrator helping me was hoping we could get some live action going tracking motion though. We'll wait and see.
Re: 3D Export
Reply #3 - Oct 7th, 2005, 6:12pm
 
i have a decent c++ 3ds loader class, from a while back, which works pretty well..
I'm planning on converting it to processing, but it might take some time.. and later on.. saving... but i'm guessing i'll be posting alot of questions on this topic..

-seltar
Re: 3D Export
Reply #4 - Oct 8th, 2005, 6:49am
 
Seltar,
If you're looking for some help, I would love to work on 3DS im|exporter. Is the layers and object grouping are supported?

I was trying to figure how we could work with DWF files, but it seems to be protected now. The .obj description is limited.
Re: 3D Export
Reply #5 - Oct 19th, 2005, 11:14pm
 
I have implemented a box export for .obj files. Unfortunately the above plugin for max does not recognise splines, import or export. The DXF code above doesn't seem to work either. It seems to be refering to some properties that existed in Alpha.

The export device uses JohnG's tube casting. I have altered it to take various quantitys of sides. I'm using just a box though so I can test the export. For all intents and purposes it seems to work. The file imported into max with no trouble.

cylinder export

It's not the tidiest code. I may get round to making it smarter. I think you could have various amounts or faces on the cylinder edges if you left out capping the cylinders either end.

I have a multiple "cylinder" export in the GUI of a project below. Turning on a couple of paths, clicking record and simulate should create some dummy paths. Those can then be "shelled" with cylinders and saved.

3D Tracker
Page Index Toggle Pages: 1