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 › New Libraries: OBJ Loader, Google Web API
Pages: 1 2 3 
New Libraries: OBJ Loader, Google Web API (Read 19165 times)
Loading obj's anywhere in the filesystem
Reply #30 - Jun 3rd, 2006, 6:29pm
 
Hi

I'm trying to load an obj using an absolute path, it seems that the library finds the obj file but is not able to find the .mtl

Here's the exception thrown by model.load("/home/.../dma3.obj"):

java.lang.RuntimeException: Could not find .OBJ file dma3.mtl
at processing.core.PApplet.die(PApplet.java:2120)
at processing.core.PApplet.die(PApplet.java:2138)
at saito.objloader.OBJModel.getBufferedReader(OBJModel.java:350)
at saito.objloader.OBJModel.parseOBJ(OBJModel.java:415)
at saito.objloader.OBJModel.load(OBJModel.java:356)
at modelo3d.loadModel(modelo3d.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.plugin.javascript.invoke.JSInvoke.invoke(JSInvoke.java:19)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.plugin.javascript.JSClassLoader.invoke(JSClassLoader.java:44)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(SecureInvocation.java:572)

at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(SecureInvocation.java:204)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(SecureInvocation.java:183)
at sun.plugin.navig.motif.AThread.handleRequest(Native Method)
at sun.plugin.navig.motif.AThread.JNIHandleLoop(AThread.java:35)
at sun.plugin.navig.motif.AThread.run(AThread.java:27)


Eclipse, I think the mtl file is hard coded
Reply #31 - Dec 3rd, 2006, 11:22am
 
If you are using Eclipse, you will have to put the model files in the root of you’re project folder. i.e. You can’t use a path. I think this is because the path for the mtl file is hard coded.

I’m still trying to find a work around for this, but its hard with no source to work from :p
loading OBJ and LINE_LOOP error
Reply #32 - Feb 28th, 2007, 12:25pm
 
Hi,
I have downloaded Tatsuya Saito's OBJ loader
http://users.design.ucla.edu/~tatsuyas/tools/objloader/index.htm
I am getting two errors with the sample file:
first is a "LINE_LOOP" error so i replaced "LINE_LOOP" with "LINES", then i still get an error saying that it cannot load the dma.obj file although it is in the data folder.  I have tried putting the whole file path in this string, but then processing shows errors in the syntax of the file path string.
Does anyone know how to solve this or why this is happenning?

thanks - Hyphen
Re: New Libraries: OBJ Loader, Google Web API
Reply #33 - Feb 28th, 2007, 4:26pm
 
I have found out how the example works now - it was just a matter of copying the example data folder into the new sketch file - cancel the previous question.
thanks
-hyphen
OBJ Loader, texturing model?
Reply #34 - May 9th, 2007, 7:15am
 
Hello, everybody..

I am trying to use this library to load some objects into processing, everything works well except texturing the models.
I have tried to trigger it by many ways with no success..

Objects are loaded and looks perfect, iam using 3D max 9 to create models and its "native" plugin max2obj to export.
(exported files: obj,mtl,texture image file)

I want to import precisely prepared textured models to processing, but there is a problem.. textures are shown like it has wrong UVW coordinates (?).

Here is the example:

Before export:
...

After import:
...

I dont know how OBJLoader reads the texture coordinates, or even if it reads any

Model is textured by "baked" diffuse map, and inside of obj everything looks fine (I hope).. all included in file below:

http://weirdplace.wz.cz/ObjLoadr/objMess.zip



If anyone has suggestion, please help.

Thanks a lot, krystof
Re: New Libraries: OBJ Loader, Google Web API
Reply #35 - May 9th, 2007, 9:34am
 
the OBJloader library seems to be loading the image map right, but translating the UV coordinates differently than other programs.

If you rotate the image by 180' then it gets mapped correctly.
Re: New Libraries: OBJ Loader, Google Web API
Reply #36 - May 9th, 2007, 2:21pm
 
Oh, i didnt realize that..

BTW, I spend at least two days with it and miss such a banality(?!).. Try to sleep more next time.

Ill try it, thanks so much !
Re: New Libraries: OBJ Loader, Google Web API
Reply #37 - May 9th, 2007, 10:46pm
 
just realized this thread is getting long..

let's start new threads for questions about specific libraries rather than using the announcement thread as a support forum.
Pages: 1 2 3