I'm trying to use saito obj loader library to upload some of my 3dfiles created in 123d design, exported as .stl files and then exported as .obj files using meshviewer.
Then I tried to upload then in an applet and I'm not getting a blank screen .
Then to start with I wrote the following code just to upload a simple 3d .OBJ file (made in
blender's mesh's icosphere)
( Add->mesh->icosphere.)
then I exported the file into .OBJ format as guided in the video.
Th code is:
import processing.opengl.*;
import saito.objloader.*;
OBJModel model ;
void setup()
{
size(1000, 600, OPENGL);
//frameRate(30);
model = new OBJModel(this, "test3.obj");
//model.enableDebug();
model.scale(20);
model.translateToCenter();
noStroke();
}
void draw()
{
background(129);
lights();
translate(width/2, height/2, 0);
model.draw();
}
I just got a gray screen and nothing on it and following in the troubleshoot monitor of processing:
Loading this = test3.obj
Loading this = test3.mtl
java.lang.ArrayIndexOutOfBoundsException: 1
at saito.objloader.OBJModel.parseMTL(OBJModel.java:993)
at saito.objloader.OBJModel.parseOBJ(OBJModel.java:813)
at saito.objloader.OBJModel.load(OBJModel.java:577)
at saito.objloader.OBJModel.<init>(OBJModel.java:86)
at obj_test.setup(obj_test.java:32)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Obj Name: Icosphere
java.lang.ArrayIndexOutOfBoundsException: 1
at saito.objloader.OBJModel.parseOBJ(OBJModel.java:840)
at saito.objloader.OBJModel.load(OBJModel.java:577)
at saito.objloader.OBJModel.<init>(OBJModel.java:86)
at obj_test.setup(obj_test.java:32)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
V Size: 42
Vt Size: 0
Vn Size: 0
G Size: 1
S Size: 0
OBJBoundingBox - Getting the Bounding Box
.
In the video I noticed the guy mentioned about syncing the scaling as same in blender environment in the last few seconds as initially he was also facing the same trouble.
Hello everyone;
currently I'm making a gestural interface & for that I'm feeding a data from the Arduino serially to the processing & making a blob for the tracking purpose. I need the mouse cursor to follow the blob . Down here is the code with out cursor following function.:
import fullscreen.*;
import processing.serial.*;
FullScreen fs;
Serial port;
String X_data = "";
String Y_data = "";
String data = "";
int index= 0;
int x = 0;
int y = 0;
PFont font;
PImage img;
void setup()
{
size(1400, 770);
fs = new FullScreen(this);
fs.enter();
img = loadImage("heading.png");
port = new Serial(this, "COM3", 9600);
port.bufferUntil('.');
font = loadFont("AgencyFB-Reg-30.vlw");
textFont(font, 30);
smooth();
noStroke();
}
void draw()
{
//background(140, 140, 140);
background(0);
//image(img, 25, 10, img.width/2, img.height/2);
////////////////////////////////////////////
fill(30, 30, 30);
rect(20, 50, 260, 40);
fill(255);
text("X : ", 45, 81);
fill(5, 130, 255);
text(x, 75, 82);
fill(255);
text("Y : ", 165, 81);
fill(5, 130, 255);
text(y, 195, 82);
fill(128, 0, 0);
ellipse(250, 70, 15, 15);
fill(128, 0, 0);
ellipse(x, y, 15, 15);
}
void serialEvent (Serial port)
{
data = port.readStringUntil('.');
data = data.substring(0, data.length() - 1);
index = data.indexOf(",");
X_data = data.substring(0, index);
X_data = trim(X_data);
x = int(X_data);
Y_data = data.substring(index+1, data.length());
Y_data = trim(Y_data);
y = int(Y_data);
}
Can anybody help me with this?
Advanced thanks
& here is the snap shot of the tracking interface:
I've written a code where I use some data coming from Arduino to control the perspective orientation of a cube & control an audio sample using band pass filters & draw the respective waveform. Now the orientation of cube displaces the waveform. I mean to say when i make changes in the band pass filter & rotate the cube, the waveform goes out of the screen(changes it's position vertically).
I want to save two types of data in two separate boxes of an excel sheet . I'm saving the data coming through serial port & keeping an index . These two data (index & serial data) are saved in the same box. I want to have a separation of data boxes here.
Any sort of help is appreciated.
Here is the code :
(
Note: important lines in the code, related to the quarry, are highlighted as
yellow
)
hello everyone! I'm trying to make a speech control like seen in ironman.
I've developed a script in Windows Speech Recognition macros where in when I say-"Hello Jarvis" a keystroke "c" is send. ANd it sends a single only keystroke(I've checked it using notepad. When I say "Hello Jarvis", a 'c' is printed in the text editor)
Now I've developed a processing sketch using "tts lib" wherein, when a keystroke "c" is received, the sketch speaks out a return gesture by saying : "Hello Saurabh".
Now the problem is it keeps on saying that & does not stops.
I've tried opening up a "link" & when I say "Hello Jarvis"- it opens multiple tabs.
I'm trying to display some simple serial data coming from an Arduino to a processing applet in way such that the continuous data keeps on scrolling down in a fashion similar to the
Arduino IDE's serial monitor. In a way you can tell that I'm trying to make a serial monitor in processing with the data continuously scrolling & not
fixed at a place & changing .
A sketch which takes care of the later condition of -"fixed placed continuously changing serial value monitor" is given below:
import processing.serial.*;
PFont fontB;
Serial port;
int freq = 0;
void setup()
{
size(680, 420);
port = new Serial(this, "COM8", 115200);
port.bufferUntil('\n');
fontB = loadFont("ArialMT-48.vlw");
textFont(fontB, 48);
}
void draw()
{
background(0);
fill(255);
text(freq, 350, 350);
}
void serialEvent (Serial port)
{
String inString = port.readStringUntil('\n');//reading from serial data until new line
if (inString != null)
{
//conversion of the string into integer
inString = trim(inString);
freq = int(inString);
}
}
Can anybody help me here ps? It's for a project that I'm making & would really appreciate if anybody can guide me here a bit.
hello; I've been facing a problem since the time I installed processing on my system. The issue is, when I export a simple sketch (without having any libraries in it), on double clicking the .jre file, it runs well. But as soon as I start using external libraries in it & then export it, on double clicking the .jre file of the applet, It shows a small window saying on it's heading-"
Java Virtual machine launcher " & inside the window a "X" symbol saying next to it -
"A java exception has occurred". I've latest java installed in my system.
I'am doing kind of similar stuff. I'm saving frames using the JSVideo lib as JPEG files(from the capture example). Now I need to upload them In the same applet. I can use a ControlP5 for an intuitive UI (I know how to upload images using PImage). But every time how can I upload the latest saved image?
sequence will be like:
. On a click of a button-1, picture will be taken & stored in the sketch's folder.
. On a click of another button-2, the capture window will get closed & viewer window will be opened.
. There two new button will take over the earlier ones as button 3 & 4 resp.
. On clicking button-4, next image will appear in the applet.
. On clicking button-3, earlier image will appear in the applet.
Now I can do all these if I know the no. of image files in that folder & their Ids.
But the problem is if I go on clicking I don't know the current volume & ID.
I'm having problems in using
Unfolding lib with processing 1.5.x.
when I ran the "Simple map App" code (Actually any code)
Something like this happened with a grey window & no map :
As I was about to make an interactive graphical nodal system as made in
GEPHI, I googled around & came up
with this.
I followed the steps as given here but I get message something like this (for both versions of processing (latest & 1.5.x)):
Can any body tell me How to use
keystone library (for projection mapping) in windows?
As shown in the
Keystone lib website, for windows I went to download extra 'Advanced java imaging lib. viz .
jai ' through
this link;and I'm actually stuck here (Here's actually so many, I'm confused to choose from) .
A snap shot of the page
Now I installed the ones named with windows(just by double clicking 'em & storing in my C/: drive) & placed the last .zip (
jai-1 1 1-lib.zip) in the lib folder of the sketchbook.
Now when I ran the applet with-out a projector I see a white screen just & nothing else & it shows some kind of error.
I recently tried to extract some of my processing applets . It's getting extracted but when I double click on the .jar file, it shows run-time error. I've downloaded & installed recent java also, but no effect.
I'am still using version 1.5.1 as I've installed many libraries in it & is too lazy to copy 'em to the new one.