aAVis
Processing Based Visualsation Tool
Navigate/Search

Archive for the 'OpenGL' Category

Exhibition Photos

Friday, November 2nd, 2007

My good friend Ben Bradford [ http://www.benjbradford.com ] just sent me some photos he took at our expo. So here you are, aAVis in the flesh.

expo_setup.jpg expo_editing.jpg expo_editing2.jpg

Motion Blur and Accumulation Buffer.

Monday, October 29th, 2007

I spent the day today doing two things :
1) I spent the morning trying to get motionblur working.  Trying to use multiple textures to simulate a blurring effect ( Basically using lots of drawtotextures ).
2) Went to uni to check the room in which aAVis will be presented.

After heading into uni and spending 3 hours there trying to get it to work on the uni computers, I found that the machines there just don’t work well with the way I’ve got it set up ( As it’s been designed on my machine, it tends to freak out on others - plus I hadn’t tested it on modern radeon video cards yet, which seem to be what the macs at uni are running ).

So I’ve decided to just go with the best possible option I *know* will work, and that’s me bringing in my home computer.  It’s heavy, but it will work!

While relaxing and playing some TF2 tonight ( and admiring their amazing motionblur they’ve added to that game ), I realised … “Well, if I’m bringing my home machine, I know *exactly* the kind of system I’ll be running it on”.  And then it hit me, I can use the Accumulation Buffer!
I ditched the idea in the early stages, because my laptop does not support it, and originally - that was my presentation machine.  However, it works perfecly on my desktop computer and provides brilliant motionblur!

And the best thing is ?
It’s only about 6 lines of code.
How about that eh ?

Changes before the Expo

Monday, October 29th, 2007

The end of year exhibition is coming up, and even though I’m not being marked on aAVis at it ( I’ve already been assessed, marks yet to be delivered ), I’ve got a few things I’d like to change so it’s more impressive for the people moving through.

I sat down today and re-wrote the ‘frame saving’ code for the “party mode” I’ve introduced. I was using processings in-built ’saveFrame()’ function to save a .jpg of the current scene, then using this - it loads that frame as a texture onto a 800×600 ( stage size ) QUAD, and fades that quad out. Quite simple really - but very effective. The only problem is, that processing takes a bit to process ( haha ) this ’save frame’. So I’ve re-coded it in opengl. The save frame takes absolutely no time whatsoever anymore, the only pause is the loading of the new preset, which at the moment is unavoidable.

I also sat down and attempted to build a really nice motionblur out of a similar technique, but I’m having problems with it, and there’s a big storm outside so I need to turn the desktop off. So no more of that tonight.

EDIT - On another note, I’m glad wordpress saves posts as drafts while you work through them! As I was typing, that “big storm” blew the power in my house.  Fortunately nothing was damaged and my computers are still functioning perfectly! ( yay ! ).

Latest News, Additive Blending, and Motion Blur

Thursday, September 20th, 2007

So now that I’m all nicely moved, I thought it was about time I told you all what I’ve been up to.

I’ve been working on the GUI, come up against some problems, but I think I’ve solved most of them now - I’m working on that tonight and tomorrow and should have something semi-decent ready for the weekend to test loading/saving. Currently I’ve got a version that lets the user create spheres after specifying dimensions. Nothing amazing, but it works, so I’m happy.

As well as working on that, I’ve been doing a series of OpenGL experiments.

Example 1 Was a test of my new particle system. It creates a stream of 3d rotating cubes at the location of the mouse. It also features OpenGL Additive blending.

Example 2 was a happy accident. Once again it’s a stream of particles moving away from the mouse, this time into the Z axis as they rotate. And they are 2D objects. It gives a cool ‘wavy’ feel. I quite like it really!

Besides these three, I’ve also now created something I am incredibly happy with. I call it my motion blur example. I realised that I could use my particle generator to make 3 copies of the same object, each with a slightly lower alpha value and simulate a “motion blur” effect. I also realised that if I made the “particles” move off into the distance, I can get some rather interesting results. So I coded up a simple oscilloscope(esque thing) and added my motion blur class to it. The results were great :

oscilloscopeandmotionblur

The Osc. Motion Blur example reacts to audio input, and looks quite interesting ( it too, has additive blending ). Unfortunately I have trouble exporting these as applets. However here are the files for those of you wanting to have a play :

Mac Users (1.4mb)
PC Users (1.3mb)

It will react to whatever you have selected as your audio-in. I’ve got a possible solution for mac users which I’ll post in the near by future too, I’d appreciate it if a fellow mac users could test it out for me ? Thankyou.

Overall I’m relatively happy with my progress so far. Next on my list is to work on loading and saving presets, and from there, the completion of the GUI. After that, all that remains is to add the various graphical elements, and various effects. That will be the long and hard - although interesting part.

- Anthony

GUI’s and OpenGL

Monday, September 3rd, 2007

First things first, thought I’d just mention the latest update to my blog, on the right hand side you can now see a list of what needs to be done in order to complete my prototype. Highlighted in green are the elements that are complete, highlighted in orange are the elements I’m currently working on. So you can keep track of my progress. And this leads in to my current problem.

In processing there are two options for GUI’s ( Graphical User Interfaces ).

1) Use a GUI Library
2) Code it all yourself from scratch

Option 2 would take a *long* time, so this leaves option 1. However, even option 1 has problems. Processing has 4 GUI Libraries ( that I am aware of ).
- controlP5
- MyGUI
- Interfascia
- SpringGUI
They all work fine by themselves. However add P3D or OpenGL, and they tend to break. MyGUI and Interfascia seem to die all together. SpringGUI works with P3D but not OpenGL, and controlP5 works with openGL, however the 3D elements always draw on TOP of the GUI. I tried running the GUI elements in a separate window, however that caused issues, and it seems to only work part of the time.

I have heard rumors of a way of re-coding MyGUI to work in conjunction with OpenGL, but I am not 100% sure of its authenticity ( or on the re-compiling process, I’d have to brush up on that ).

So I’ve gone to the processing forums for support, I’m hoping someone there can offer a suitable solution - Until then, I’m sort of forced to put everything on hold - so hopefully I’ll get a solution before then.

Processing Forum Thread

If I can’t get a solution, I will have to work out a possible solution. Even if this means ensuring no 3D elements move closer than 0 on the Z axis, and drawing all the GUI elements on that point. This will mess up perspective, but it may be the only compromise open to me.

- Anthony