Loading...
Logo
Processing Forum
ashleyjamesbrown's Profile
17 Posts
58 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    Getting Out of Memory errors simply playing 1 looping gif in the draw() which is terrible performance on 1.5.1

    Putting dispose() in a keypress and triggering clears the gif from memory, but then it has to be loaded back again.


    Wondering about sending the images from the animated gif to an offscreen texture using GLSL and then rendering back to the screen to try and save memory. Also wondering whether to use gifAnimation at all ? 

    Anyone have any more optimised ideas ?


    Hi forum friends hopefully someone can point me in the correct direction or the mathematics required.

    I currently have a nice skeleton tracking system in processing 2.0 using simpleopenni library. I can get the joint positions of the skeleton and overlay some Images so that you become a 2d puppet. What i cant figure out is the correct rotation of the images to align with the limbs and joints so that the hands for example point the correct way, the same with the arms and legs etc etc

    Im sure its some PVector maths required between getting 2 joint positions and figuring the line bewteen the 2 points and then making that into the correct number of degrees...but this is as far as i have got.

    Much appreciated

    Ashley
    Hey guys/girls

    Im curating part of a series of artworks - moving image, animation and generative for display on a set of screens as part of a festival at the end of this month and first week in June.

    Call out is below - tiny fees really - but a chance to showcase some work. Must be moving of course and must fulfill the theme.

    Please spread the word - would suit those of you who have older sketches that might fit the brief rather than making something specific as funding is low.


    There is another brief is for an interactive set of work - feel free to apply however we have had some great response already and have probably decided on what we want - especially with such a short timescale




    physics.removeBehaviour() lets me specify a behaviour but how do i reference all behaviours current in the sketch.

    I have lots of Attraction Behaviours being created causing the particles to be attracted no problem but i want a keypress to remove all so that the particles will have no attraction and just drop.

    Im struggling to figure the syntax using the javadocs.




    Code currently just using the controlp5 example frame command to have controls in a separate window.

    I have it working fine to use sliders to control in the parent however i am using the newly updated version of modelbuilder back with the UTilesaver class and getting an error when trying to do the tilesave hires

    Using processing 2.0ab5, cant say for sure which version of controlp5 but think its the latest as i added it using the new library import func


    Wierdly if i use setup(400,400,???) anything in the question marks the controlp5 frame disappears. Is this to do with using the java.awt.frame and conflict with opengl2 in processing 2 ?

    Im assuming that becuase modelbuilder uses pgraphics3d and its not in processing2 (?) then this is the problem.

    Saveframe() works of course, from a button on the frame window

    Any help appreciated.

    Ashley

    I really cant get my head round why this wont work - i am most assured that its an easy fix but i really cant see it

    I want to load 20 images from the data folder in and display them slightly overlapping each other

    breaking it down it seems to work and throw the null pointer when i try to display the images using the image(loadedImage) command

    help much appreciated - im quite ashamed i cant figure this out after many years of processing.... #fail

    1. void loadPics() {
    2.  PImage[] loadedImage = new PImage[20];

    3. for(int i=0; i<20; i++) {
    4.  loadedImage[i]=loadImage(""+(i)+".png"); 
    5. }
    6. for(int i=0; i<20; i++) {
    7.   image(loadedImage[i],0,i+100);
    8.  }

    9. }//end void
    anybody got the skylanders game and tried to read the rfid with processing and the touchatag library?

    Ive got the game and several characters(my son has i mean) and i fancy using the portal (its a read/write RFID) to read some data and maybe write it back. Either way its also a cool way for me to get into RFID as i have a reader in the house and mifare chips are like £3.

    Ive seen some hacks online but all pulled down.

    Oh and im on a mac.

    Any help appreciated
    Hi everyone

    Im using the kinect library from Shiffman (openkinect) and the great library from diewald for reading barcodes.

    Separately they work fine within a sketch however i cant get them to work together, lots of errors.

    Im using processing 1.5.1 and latest (only) versions of the libs.

    If anyone has any ideas i would appreciate it. Code wise im literally mashing both together.


    Problem: What i am trying to achieve is a background image that stays for 50 seconds and then after 10 seconds, clear the background, change the background image for just 10 seconds and then go back again to the original image and so on.



    Im using the shiffman Timer class and all is working great with one Timer.


    In the draw im checking if firstTimer.isFinished() and if so i change the background image and then restart the timer. obviously this happens really quickly (like 1 frame) so im trying to put the second timer and its not working.

    Im sure its so easy and im incredibly silly but i cant see the answer for looking.


    1. import processing.opengl.*;

    2. Timer firstTimer, secondTimer;
    3. PImage firstScreen, secondScreen;

    4. void setup() {
    5.   size(800, 800, OPENGL);
    6.   firstTimer = new Timer(50000);
    7.   secondTimer = new Timer(10000);
    8.   firstScreen = loadImage("footer2.png");
    9.   secondScreen = loadImage("footer3.png");
    10. }

    11. void draw() {
    12.   if (firstTimer.isFinished()) {
    13.     background(0);
    14.     image(secondScreen,0, 0, width, height);
    15.     //need to pause it for 10 seconds
    16.     //then restart timer
    17.     firstTimer.start();
    18.   }
    19.   else
    20.   {
    21.     image(firstScreen, 0, 0, width, height);
    22.   }
    23.   fill(255);
    24.   ellipse(mouseX, mouseY, 20, 20);
    25. }
    Like i say this works it just doesnt pause long enough to show the secondScreen.which will of course keep the background clear even moving the mouse around

    I really need to got through 3 screens, one at 45 seconds, one at 10 and then one at 5

    If someone can point me in the right direction that would be great

    Ok im using processing 1.5.1 on the mac osx 10.6.8 Snow Leopard.

    Ive made work and exported applications before however i came to do it yesterday and i have 2 errors


    The first is it states it cannot find source file  filename.java but it seems to create the application


    The second is the exported application windows 32 or 64 will not work.

    I get an error saying 'Could not create the Java Virtual Machine'

    Last one i did was 19th April and it worked fine. Ive checked and i didnt update java on my mac so why am i getting this error. 

    I even try a bundled example and it does the same, but only if i use OPENGL

    I swear it did not do this a few months ago.
    Hi wondering if anyone can help with some TUIO implementation

    I currently have processing readin in the tuio cursors and displaying an arc around each position no problem.

    What im trying todo is store each position so that in a for loop i can call and render lines between all cursor positions. Once this is working and i can reference all of the cursors positions not within the tuio functions i can then redner more interesting graphical feedback.

    Any suggestions.

    I thought maybe a hashmap storing the cursors sessionID along with its x and y but maybe an arraylist is best ? this way i can within the addcursor and remove cursor inbuilt tuio functions i can access the arraylist to add and remove items.

    Im a bit stuck and it seems so simple

    Thank you


    Hi this seems lke it should be a really easy piece of code but im a bit stuck.

    I am wanting to be rendering PImage which is a greyscale .png and is a circle and the use the tint to colour 1 of 6 variations.

    I got this working fine but when they overlay its nt quite right for me. Taking the png into photoshop - colouring with my 5 colours and layering up using MULTIPLY i get a nice darker tone when several layer up ( as is what MULTIPLY does  i know)

    So i how can i do this with processing ?

    It seems blend is for blending between 2 PIages but my PImage is for a particle system involving 200 copies. Should i maybe have the blend function between the PImage and some other PImage which is the size of the screen ?

    I tried using just ellipses and rendering rgb values with transparency and the colour is right but the overlay blend isnt

    I have been coding processing for over 2 years now but not had to do this before and ive made my own particle (PVector) class system with updates etc but cant seem to figure this out.

    Also - i was using GLGraphics in teh same sketch as i was testing something out but im going to not use it anymore i think - could this rendering be interfering with my colours

    Ill post some code up if needs be but ideally i need to see if it can be done just if someone can show me the code to render three ellipses on the screen overlapping to look lke the multiple effect

    I found some openGL hack code but could only seem to see additive blend ?


       
            GL gl = ((PGraphicsOpenGL)g).gl;

            // additive blending

            gl.glEnable(GL.GL_BLEND);

            gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);

            // disable depth test

            gl.glDisable(GL.GL_DEPTH_TEST);
       

    Hey happy forum helpers

    Quick question which might prove tricky - i cant figure it out yet myself.

    I have an arduino with sensors sending data to Processing over the usb connection and processing is rendering visuals to the screen.

    I have an issue - which is obvious really - that when the usb lead is disconnected i get the error in the console that it cant read the serial event and some errors todo with gnu.rxtx - the processing sketch keeps running but cant read the data. You have to restart the sketch even if you replug in the usb lead

    Does anybody know how to code in a way that it could auto reconnect - or even with a keypressed command ?

    I have a feeling its not standard code and that its more java i might need.

    Im intermediate with my understanding of code but quite new to arduino interfacing. 

    Thanks a lot

    Ashley
    Seem to have an issue in that i cannot get 094 working in Android mode with my HTC Desire and the SDK. 

    I have WIN 7 (64)
    Processing 094
    HTC Desire
    SDK Platform versions 3.0 and all below down to 1.5
    SDK Platform tools revision 3
    SDK Tools revision 10
    USB Driver v10


    Dont know whether it helps for info wise but ive got on my computer the APPInventor which i have been using since beta and this works on my phone no problem. I have to pick HTC Sync mode and then when its finished doing its sync it then connects to APP Inventor and launches my sketch on my phone.. no problem. Ive been doing this for a while now and only just got around to installing this version of processing. (Ive been using processing for about 3 years now)

    Could there be a conflict because of this ?

    I cannot even get the emulator to work from Processing but if i start the SDK Manager from the computer and browse to the Virtual Devices and click Start..Launch then it does open the Emulator.

    Any help much appreciated please.
    http://www.thepublic.com/exhibitions/touch-interactive-2011

    As part of Touch Interactive i created a touch based interactive installation using processing. It was made with msafluid lib and toxiclibs 

    Gravity and force apply momentum to the ‘comet’ to move it through space. The ‘comet’ is constantly exploding leaving behind it a trail of light which gradually fades as time elapses. Occasionally the ‘comet’ explodes brightly and small bands of colour emerge from the sparks and trails. The user is able to interact with the ‘comet’ by altering gravity and force to push and change the momentum and speed of the ‘comet’, creating new explosions and trails which warp and twist as the ‘comet’ moves through space. 


    My daughter having a play with it - February 2011


    Hi just a really simple query but im scratching ym head to implement - probably because most of my stuff is generative and doesnt use Pimage and pGraphics or video - or im thick

    Anyway


    I want to render a video as the background - which i just achieved by loading a video file to a movie variable and then displaying a pimage at location 0,0 using the image(mymovie,0,0,width,height).


    What i want is then to cover the screen black and only show a rectangle of say size 35 at the mouseX,mouseY which basically reveals out of the black the video behind.

    Its to go onto a bigger project using tracking of movement and physics to slide the rectanlge about a bit more and i actually have all that code working so id swap the mouseX,mouseY for all my other code.

    So does anyone have an idea - im presuming some tintin or alpha transparency or even mask() is required but to be honest ive never done this and dont know where to start.



    plainspeaking terms - the mouse is a torch revealing the video. the screen is totally black if the mouse is not in focus.
    Hi i have a nice little capture live video input program which basically upon keyPressed captures the current frame and then displays it to the screen in a specific place.


    What i want though is for when the key is pressed to check the current time, then show the live feed and over the time do a countdown timer in text. When countdown is finished stop reading the live stream and just display the last frame as the image(myCapture,xPos,yPos,200,200);



    My trouble is that i can only seem to get the feed to be live within the main draw - rather than the keyPressed - 

    and i cannot get it to run a simple check of if (millis() >= startCounter + 5000) 




    SO can i run timer based loop recursion within the keyPressed ?

    I tried setting a global boolean to if keyPressed= true  then start a timer and then run an if check - but it didnt work. it jut didnt loop because it ran through so fast that it didnt stop. When i put the timer check in it just didnt actually check the time. Unless my layering of syntax was incorrect

    Anybody got any neat ways to achieve this.

    Many Thanks