Processing Tutorial 6 - Android Processing Basics and 3D texturing

preview_player
Показать описание

in this tutorial we talk about the Android Processing basics...

its best to play with the many example codes in the Android sketch examples folder supplied with the development environment.... as this only shows you some very basic ideas!
Рекомендации по теме
Комментарии
Автор

im learning so much from you jaboston keep these tutorials coming

theaussieninja
Автор

yeah I too love your tutorials. more would be awesome! :D i already did all your processing tutorials. they really are great and in general thanks for sharing info with the world! free education rocks! haha

StealThisKarl
Автор

the compiler give me a problem when I try to start it,
it's says me thats it cannot find anything named NORMALIZED

kevinsi
Автор

WOW .. I know processing year ago .. but never knew that it's available for android :)

SWATmansoura
Автор

great tutorial! Its a good idea to make a step by step tutorial for android mode in processing! for beginners, thanks! (i cant connect, find my phone in processing android mode, even i follow every step by step processing official website recomend)

nektarioskourakis
Автор

Very helpful, I always had problems with 3D textures in my apps

dreamcoder
Автор

I installed the Android mode and setup the SDK files in processing 3.0.2 but I get errors on the very basic functions like setup() size() and ellipse() telling that The class "PApplet " does not exists. Please help...

jainvibhore
Автор

sooo... i keep getting the error: "Cannot find anything named "NORMALIZED", and it won't locate my image and i am putting the image into the data folder.

aaronjacobwillman
Автор

Yah Please provide the codes and can you go over changes that is happening in processing?
It seem confusing ... like beta 1, 2, 3, 4, 5, 6 2b6, 1.5.1 different versions?

heiismail
Автор

I wish they made Processing for the iPod.

AKSoapy
Автор

I can't get it to install properly (android adk). It always says the google api is not installed properly. I can't even put it on an emulator b/c i get the same eeror.

seal
Автор

it won't work on my computer. the cube coms out, but not the image i chose to put on it. please help me find the problem.

the IMG_0407.JPG is in the same folder as the sketch.


ps: this is my code

import processing.opengl.*;
float inc = 0.01;
PImage tex;

void setup() {

  tex = loadImage("IMG_0407.JPG");
  //noFill();
  stroke(255);
  // smooth();
  size(600, 600, OPENGL); //opengl allows you play with 3d objects
  textureMode(NORMAL);
}



void draw() {
  background(0);
  inc+=.01;
  lights(); //adds a light source
  pushMatrix();//creates the matrix
  fill(180, 0, 0, 127);
  stroke(255, 155, 155);
  translate(mouseX, mouseY);
  rotateX(-mouseY*0.01);
  rotateY(-mouseX*0.01);
  box(150);//cube, (x, y, z)
  TexturedCubed(tex);
  popMatrix();//actually draws the matrix
}


void TexturedCubed(PImage tex) {
  beginShape(QUADS);
  texture(tex);

  //front face + Z
  vertex(-1, -1, 1, 0, 0);
  vertex(1, -1, 1, 1, 0);
  vertex(1, 1, 1, 1, 1);
  vertex(-1, 1, 1, 0, 1);
  //back face - Z
  vertex(1, -1, -1, 0, 0);
  vertex(-1, -1, -1, 1, 0);
  vertex(-1, 1, -1, 1, 1);
  vertex(1, 1, -1, 0, 1);
  //bottom face + y
  vertex(-1, 1, 1, 0, 0);
  vertex(1, 1, 1, 1, 0);
  vertex(1, 1, -1, 1, 1);
  vertex(-1, 1, -1, 0, 1);
  //top face - y
  vertex(-1, -1, -1, 0, 0);
  vertex(1, -1, -1, 1, 0);
  vertex(1, -1, 1, 1, 1);
  vertex(-1, -1, 1, 0, 1);
  //right face + x
  vertex(1, -1, 1, 0, 0);
  vertex(1, -1, -1, 1, 0);
  vertex(1, 1, -1, 1, 1);
  vertex(1, 1, 1, 0, 1);
  //left face - x
  vertex(-1, -1, -1, 0, 0);
  vertex(-1, -1, 1, 1, 0);
  vertex(-1, 1, 1, 1, 1);
  vertex(-1, 1, -1, 0, 1);

  endShape();
}

dasaed
Автор

Can you give me the vertex code please?

aidendally
Автор

i will try that and let you know if it works.

aaronjacobwillman
Автор

@kwanphil77 thanks means alot!.... I will but I am currently working on releasing an advanced android game to the market... just need to fit together a few more bits! ^_^

thejaboston
Автор

can yoh plz zoom the vids i cant ses some codes :(

imparadiseknowitbtch
Автор

change it to "textureMode(NORMAL);"

Darival
Автор

@AKSoapy29 if you wish to be able to develop for the iPod touch/iPad/iPhone using a similar system then lookup openframeworks (openframeworks.cc).

thejaboston
Автор

 
Good work, perhaps you can help me with this code of processing, I can´t make it work with tablet (ipad) thanks:
void setup () {
  size(500, 500);
  background(255);
 
}

void draw() {
  stroke(0);
  strokeWeight(12);
  if(mousePressed) {
    line(mouseX, mouseY, pmouseX, pmouseY);
  }
}
 
  void keyPressed() {
   
    //background(255);

 
}

hectormorales
visit shbcf.ru