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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › saito object loader for beta 1.0.1
Page Index Toggle Pages: 1
saito object loader for beta 1.0.1 (Read 1540 times)
saito object loader for beta 1.0.1
Dec 9th, 2008, 11:39am
 
good morning everybody,

after having downloaded the new beta version (1.0), I used the object loader to include my sketch in a wiki-browser. when I exported it, everything seemed to be right in my applet.
But when I want to open the jar-file, a box opens and says:
'Could not find the main class. Program will exit.'

Then I did the same with the 0135 version and it works... But the 0135 version doesn't run as fluently as the new.It seems to be not very healty to my graphic driver.

With the new 1.0.1 version it doesn't work... I don't know why. So I hope that somebody here can help me, please.

have a nice day!


saito object loader for 1.0.1
Reply #1 - Dec 9th, 2008, 5:59pm
 
so, when I export my sketch, I get these three jar-files:

objectloader.jar
filename.jar
core.jar

with the older versions I just had one jar-file with the filename...
Re: saito object loader for beta 1.0.1
Reply #2 - Dec 9th, 2008, 7:29pm
 
If you want a version you can double click on and run, use Export Application. Export is purely for the web, and isn't directly runnable.

I think it only worked sort of by accident previously, and wasn't specifically intended.
Re: saito object loader for beta 1.0.1
Reply #3 - Dec 9th, 2008, 11:37pm
 
ok... I did that but the application can not be included in the browser. and nevertheless I should be able to run the jar file. till the 0154 version there wasn't any problem with the export and including. there's a code I have to edit and then load up the jar_file, so the sketch runs directly on the edited site... so if it doesn't work on my pc it doesn't work on the browser.

???

sorry that I called the 1.0.1 a beta version...

thanks.

Re: saito object loader for beta 1.0.1
Reply #4 - Dec 10th, 2008, 12:00am
 
The jar files created can be uploaded to your site with the HTML file also generated, and it will work, even though you can't double click on it to run it.

In a browser, it *doesn't* try to run a "main" method, whereas double clicking on a jar file, it does. This is why even though it doesn't run when you double click, it will run when run through a browser with the generated HTML page.
Re: saito object loader for beta 1.0.1
Reply #5 - Dec 27th, 2008, 12:46am
 
Hi! my issue is even more basic.
I don't know why i can't even get to load the library. I'm pretty new to processing, but i've been able in the past to load libraries. I tried to put the library in the sketchfolder, but it doesnt work...any help..?
Re: saito object loader for beta 1.0.1
Reply #6 - Dec 27th, 2008, 1:47pm
 
hi

at first you should put the library into the library folder...
then import the library at thze top of the sketch...
sketch->add library

it should work...

to get your 3d piece on the screen, you have to add an .mtl and an .obj-file of your part...

sketch->add file...

try it...

whitch issue do you have???
Re: saito object loader for 1.0.1
Reply #7 - Dec 27th, 2008, 7:48pm
 
i guess i'm dumb...
I created a folder called "libraries" in my sketchbook folder. i added the library "objloader.jar".

Then i opened the example, but it still tells me that it can't find the library.

import saito.objloader.*;

OBJModel model;
float rotX;
float rotY;

void setup()
{
 size(600, 600, P3D);
 framerate(30);
 model = new OBJModel(this);
 model.debugMode();
 model.load("dma.obj");
}
void draw()
{
 background(255);
 lights();
 pushMatrix();
 translate(width/2, height/2, 0);
 rotateX(rotY);
 rotateY(rotX);
 scale(30.0);
 model.draw();
 popMatrix();
}

boolean bTexture = true;
boolean bStroke = true;
void keyPressed(){
 if(key == 't'){
   if(!bTexture){
     model.enableTexture();
     bTexture = true;
   } else {
     model.disableTexture();
     bTexture = false;
   }
 }
 if(key == 's'){
   if(!bStroke){
     stroke(10, 10, 10, 100);
     bStroke = true;
   } else {
     noStroke();
     bStroke = false;
   }
 }
 else if(key=='1')
 model.drawMode(POINTS);
 else if(key=='2')
 model.drawMode(LINE_LOOP);
 else if(key=='3')
 model.drawMode(TRIANGLES);
 else if(key=='4')
 model.drawMode(POLYGON);
}

void mouseDragged()
{
 rotX += (mouseX - pmouseX) * 0.01;
 rotY -= (mouseY - pmouseY) * 0.01;
}
Re: saito object loader for beta 1.0.1
Reply #8 - Dec 27th, 2008, 9:39pm
 
Did it! finally..
Re: saito object loader for beta 1.0.1
Reply #9 - Dec 27th, 2008, 10:01pm
 
Hey! how do you make a mtl file? i'm using cinema 4d for mac...Thanks a lot.
Re: saito object loader for beta 1.0.1
Reply #10 - Dec 27th, 2008, 11:47pm
 
when I save the part in pro e as wavefront, I get both - a .mtl and an .obj-file. I don't know if you can do that with cinema 4d...

Re: saito object loader for beta 1.0.1
Reply #11 - Feb 3rd, 2009, 11:13pm
 
Quote:
Did it! finally..



hi I'm new to processing, with the latest version of 1.0.1 the above code provokes processing to throw "This code needs to be updated, please read the "changes" reference"

any help is appreciated.

just before hitting Post, i realized that framerate(); has been renamed to frameRate();  atleast something is happening now.
Re: saito object loader for beta 1.0.1
Reply #12 - Mar 13th, 2009, 4:59pm
 
so i got this working only after placing objloader.jar inside the /code folder within the obj loader sample sketch.  then saito.objloader.* was ok

it was confusing that placing the objloader.jar inside the libraries folder in sketchbook didnt display the import library dropdown inside the PDE ( but maybe it shouldnt?)

anyway, after commenting out the various now unsupported LINE_LOOP, LINE_STRIP and POLYGON finally the obj loaded.
( as suggested in http://processing.org/reference/changes.html )
Page Index Toggle Pages: 1