*blog... kind of... *rss 



Inspire08 demo log, day 26 (part 2)
Status:
0(1) days left until Inspire08
Executable demo


Well, after sleeping about 10 hours in 3 days, I better sleep a bit more today as I think tomorrow (friday) will be a kind of party coding day/night (sponsored by red bull). Now that I think about it... it may be the first time I actually do coding when doing partycoding :P

The demo system now works everywhere: Windows / MacOS / Linux...

/projects/inspire08/08/demo.zip

So, tomorrow... content content content, and I guess I won't do the log so there is a bit of surprise for the competition (hopefully).

no comments
Inspire08 demo log, day 26 (part 1)
Status:
0(1) days left until Inspire08
Executable demo


I guess the organisers are expecting executable demos instead of a link on a browser. This is something I had no idea of how to do. But while checking Ne-He's Outline font tutorial, this time the JoGL example had a .bat with a command line that execute the thing on a window. This may sound totally normal to you, but it was exciting to me O:) So I quickly analysed it and extracted the logic and managed to make my demo.jar run directly on Windows!

After tweaking a bit the folders so it looked a bit nicer (I put all the libs (even linux/mac universal inside a /libs folder) the command looks like this:

java -Djava.library.path=.\libs -cp .\demo.jar;.\libs\jogl.jar;.\libs\gluegen-rt.jar MainWindow

This version should already work on Windows:

/projects/inspire08/08/demo.rar

... I'll do the launchers for Mac/Linux later on. uhm... Windows/Mac/Linux/Online, I like how that sounds :P And with all the libraries there ready to run on all the OS the filesize is 5Mb zipped (including the 4Mb OGG), sounds good to me too.

no comments
Inspire08 demo log, day 25
Status:
1(2) days left until Inspire08
Effects


Here we go with some effects... dots and HypnoRays. The demo is not supposed to look like this btw, I'm just adding effects on top of each other by now.

/projects/inspire08/07/

I may try to avoid loading images for this prod... I don't know... It's late tho, time to sleep.

Oh, here is the code for the hypnoray, it's just an idea I had on the bus on the way home today (vertex colors power ;D).

package effects;

import javax.media.opengl.GL;

import com.xplsv.utils.Timer;

import core.Vertex;

public class EffectHypnoRays extends Effect
{
	private Vertex[] meshData;
	
	public EffectHypnoRays(GL gl, int start, int duration)
	{
		super(gl, start, duration);
	}
	
	public void init()
	{
		int sides = 200;
		int radious = 4;
		float angle = ( 360.0f / (float)(sides-1) ) * ( (float)Math.PI / 180.0f );
		
		meshData = new Vertex[sides+1];
		
		Vertex v = new Vertex();

		v.position.x = 0.0f;
		v.position.y = 0.0f;
		v.position.z = 0.0f;

		v.colour.r = 0.0f;
		v.colour.g = 0.0f;
		v.colour.b = 0.2f;
		
		meshData[0] = v;
		
		for (int i = 1; i <= sides; i++)
		{
			v = new Vertex();

			v.position.x = (float) (radious * Math.cos(i * angle));
			v.position.y = (float) (radious * Math.sin(i * angle));
			v.position.z = 0;			

			v.colour.r = (float)Math.random() + (float)Math.sin(i*.5) - 1.0f; 
			v.colour.g = v.colour.r;
			v.colour.b = v.colour.r + 0.2f; 

			meshData[i] = v;
		}
	}
	
	public void render()
	{
		if(!active())
			return;
		
		gl.glLoadIdentity();
		gl.glTranslatef(0.0f, 0.0f, - 5.0f);
		gl.glRotatef((float)(Timer.get()*.01f), 0.1f, 0.0f, 1.0f);
		
		gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
		gl.glBegin(GL.GL_TRIANGLE_FAN);

		for (int i = 0; i < meshData.length; i++)
		{
			gl.glColor4f(meshData[i].colour.r, meshData[i].colour.g, meshData[i].colour.b, 1.0f);
			gl.glVertex3f(meshData[i].position.x, meshData[i].position.y, meshData[i].position.z);
		}

		gl.glEnd();
	}
}

no comments
iPhone $399, Dominio 9,95
Pasarte medio año escribiendo comentarios fake tan estupidos como estos para animar tu concurso, no tiene precio ;)

Y quiero pensar que son fake y que la gente no es asi en realidad...

"ESTOY CONTENTA CON ESTE CONCURSO,Y ESPERO GANARLO,PORQUE ES UNA MARCA MUY BUENA"

no comments
Inspire08 demo log, day 24
Status:
2(3) days left until Inspire08
Timeline, ColorFades, Flashes!!


Well, if you re-checked my previous log you know that I found a quick way to put together the whole demo. There is still hope! :D

I did a quick test of having 100 effects checking if they had to be rendered or not per frame and the performance was really good, like 60fps. So, as I don't think I'll get 100 effects on the timeline I guess it's good enough to use this way for this prod. God bless Eclipse and it's refactoring/rename tool, because I've renamed the SceneManager class a couple of times... It's now called Timeline and it looks like this:

import javax.media.opengl.GL;
import java.util.ArrayList;

import effects.*;

public class Timeline
{
	private ArrayList effects;

	public Timeline(GL gl)
	{
		effects = new ArrayList();
		
		effects.add( new EffectRandomPolys(gl, 0, 27700) );
		effects.add( new EffectColourFade(gl, 0, 10000, 1.0f, 0.0f, new float[] {0.0f,0.0f,0.0f}) );
		
		effects.add( new EffectFlash(gl, 14450, 2000, 0.5f, 0.0f, new float[] {0.0f,0.0f,1.0f}) );
		
		effects.add( new EffectRandomPolys(gl, 27700, 30000) );
		effects.add( new EffectFlash(gl, 27700, 2000, 1.0f, 0.0f, new float[] {1.0f,1.0f,1.0f}) );
		
		effects.add( new DebugInfo(gl, 0, 0) );
		effects.add( new DebugLogger(gl, 0, 0) );
	}

	public void init()
	{
		for (int i = 0; i < effects.size(); i++)
			((Effect)effects.get(i)).init();
	}

	public void render()
	{
		for (int i = 0; i < effects.size(); i++)
			((Effect)effects.get(i)).render();
	}
}

Yep! I have ColourFades and also Flashes :D (The diference is that one is on additive blending ant the other isn't).

This is how the thing looks like now:

/projects/inspire08/06/

Not much there yet, but it's a base. Now, it's really about time to do more effects, learn how to load/display images and find out how to jump to a middle part in the tune.

no comments
What happened to your experimentation?
... you may be asking yourself.

Maybe you're looking for the newest a greatest Papervision3D experiment, and to be honest I would love to work on it, but I recently switched from Windows to Ubuntu 8.04 at home (Yes, I tried MacOS before, and, for me, it's even worst than Windows). This is something I tried previously, but didn't achieve because there weren't good tools for developing Actionscript on Linux.

However, this time, the kind guys of FDT sponsored my Open source projects with a license, and that was great, I use it for developing the apps listed there. But when it comes to experimenting with graphics I'm making myself use Ubuntu. The bad news is that FDT doesn't work on Eclipse/Ubuntu environment, neither they support that. Actually, it almost works, it's just the formatter that doesn't work.

So I was about to fail again, but I decided to remove all the priority to Actionscript development and look for code-fun alternatives. Although most of my friends were trying to persuade me to move to C++ I still like the accessibility of having your work easy to watch with a click from the browser. So the first thing I tried was Processing, unfortunately the GUI was pretty unusable for me. So I tried to, somehow, develop with Eclipse Processing apps. Didn't work nicely either.

So, there I was with Eclipse and a lot of patches for doing p5 apps. Wait, Eclipse?! Isn't Eclipse supposed to be mainly for Java stuff? Uhmm...

So yeah, slowly I've been doing some progress on developing on Java / JoGL. Java is quite hard compared to Actionscript, there aren't as many internet resources and even for doing a Audio Player you can spend a weekend. But with a bit of patience things are getting together and are starting to work. You can see some very-early tests I'm doing here:





And on this one I already have a OGG player and some debug info on the top o/

/projects/inspire08/05/ (Sorry about the tune :P)

So, give me a couple of months playing around with this, and, hopefully, my new experiments will have the complexity of flight404 ones, still being real time (which I assume his ones are also real time, but for some reason only releases video files).

Anyway, the sooner I get something I'll post it here with source files, which hopefully will help to others to get started and play around too.

On the other hand, I'm recently doing some Actionscript experiments for Hi-ReS!, which I think will end up being pretty good. Time will tell.

And, if this wasn't enough, from now on Mr.doob is not just myself anymore. My partner in life just left her work and is now helping with the freelance projects Mr.doob gets :) Wait?! Didn't say on the top that Mr.doob didn't do any freelance projects anymore?! Somehow they still arrive, I'll change that anyway :D

Ahh... exciting times!

no comments
Inspire08 demo log, day 23
Status:
3 days left until Inspire08
Base code, file handling


Right... End of the 3 day weekend. Things are not looking too promising in order to have something releasable for the deadline... I'm doing some progress here and there, but I still need a lot of practice with Java.

Still having problems loading assets... but well, I'm too old to lose sleep time for reaching the deadline :P My invtro for D/// will have to be released somewhere else... Maybe at Euskal??? I'll take my time, maybe I'll just do a teaser, or something else for the party. We'll see.

EDIT: Funny that, after saying I wasn't going to lose sleep time I ended up going to sleep at 4.30 :P Not doing demo stuff tho, mainly reading stuff like this. Anyway, while trying to sleep I was thinking that a quick way to have some synch in place would be just adding start/duration parameter to the effects... avoiding any kind of XML script+resource manager. Something like this:

effects.add(new EffectFlash(gl,19207,1000);

And then, the effect instance would be checking itself if it needs to be rendered or not (per frame). It's very crappy way of doing it, as I may end up with 50 effects asking if they need to be rendered... but well, I'll fix that on the next one. At least it gives some hope to the prod.

no comments
Virtual Hosts with Apache2 on Ubuntu 8.04
I have googled a bit in order to do this, but all the info I was finding was a bit obsolete, so use this info if you want, but the main purpose of writting this down is so I can remember it next time (hopefully without being obsolete):

After installing Apache2 from synaptic...

sudo gedit /etc/hosts

Add line...

127.0.0.1	ricardocabello.local

then...

sudo gedit /etc/apache2/sites-available/ricardocabello

with this kind of content...

<VirtualHost *>
	ServerName ricardocabello.local
	DocumentRoot /home/mrdoob/Desktop/www/ricardocabello.com/
</VirtualHost>

save the file, and then...

sudo a2ensite

chose ricardocabello (this will mainly create a link on sites-enabled). And then, to complete the task:

sudo /etc/init.d/apache2 reload


no comments
Inspire08 demo log, day 22
Status:
4 days left until Inspire08
Base code (still!)


Well, I haven't progressed much visually, but I've refactored everything quite a bit. The base is almost done.

/projects/inspire08/05/

As you can see, I have a Logger, Timer, FPS counter, MS... That's enough for debugging/testing the effects on-the-fly. Also, I have a base for the Scene Managing, I still have to load a XML with the times of start/end and all this but by now it's simple enough and looks like this:

import javax.media.opengl.GL;
import java.util.ArrayList;
import com.xplsv.utils.Logger;

import scenes.*;

public class SceneManager
{
	private ArrayList scenes;

	public SceneManager(GL gl)
	{
		scenes = new ArrayList();
		
		scenes.add(new SceneRandomPolys(gl));
		scenes.add(new SceneInfo(gl));
		scenes.add(new SceneLogger(gl));
	}

	public void init()
	{
		Logger.init();
		Logger.log("SceneManager.init");
		
		for (int i = 0; i < scenes.size(); i++)
			((Scene)scenes.get(i)).init();
	}

	public void render()
	{
		for (int i = 0; i < scenes.size(); i++)
			((Scene)scenes.get(i)).render();
	}
}

Just 4 days to go and I still don't know how the visual content will be... Oh well... Tomorrow more.

no comments
Inspire08 demo log, day 21
Status:
5 days left until Inspire08
Base code


Although my mind was trying to avoid working on the thing today, I managed to concentrate a bit. As getting the milliseconds elapsed in the tune seemed to be something I couldn't achieve at the moment, I decided to look for a workaround which I could fix in the future. Found out the AS3 getTimer() equivalent in Java (System.currentTimeMillis()), so by now, I would depend of the music not being delayed and keeping the same timer as Java has (crossing fingers). So I did a simple class like to get going.

So, tomorrow I should be doing a quick SceneManager and also some Scenes/Effects finally :P

I hope I also find out soon how to jump to a defined part of the tune too :S

no comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72