ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss


Diverter
13.05.2008
Hehe, that's interesting... for first time somebody used one of my tunes instead of me being the one that is using somebody else tune :D

posted by r08028 at 15:54

Inspire08 demo log, day 30
13.05.2008
Status:
-2 days left until Inspire08
Back to the system code


... Ok, porting this to LWJGL ended up being a waste of time. The main porting was very quick, like, in 30min I had it done and working. Doing the applet version took more time, about 4 hours or so. And in the end there were some weird bugs with the timer, and after all the time spent trying to understand how to do the Applet version is the last thing I wanted to see. So, back to JOGL.

I also spent more time again on getting the position of the tune. I managed to get something this time. SourceDataLine.getFramePosition() return the amount of samples played, but they numbers aren't as smooth as a normal Timer, like the same number may repeat 5 times, which means that the animation is jumping. I had to do a crap fix for that:

public static long getPosition()
{
	/*
	 * For some reason the SourceDataLine.getFramePosition()
	 * doesn't give back smooth sequence of numbers, here it's
	 * a crap fix for it.
	 */
	
	if (lastSampleInfo != tune.getPosition())
	{
		lastSampleInfo = tune.getPosition();
		lastTimerInfo = System.currentTimeMillis();
	}
	
	return lastSampleInfo + (System.currentTimeMillis() - lastTimerInfo);
}

Am I the only one that thinks that it's weird that I have to do this? Still, it kind of works, but sometimes jumps back a tiny bit, I may come back to this code in a few days to try other things, but at least it uses the audio timer (somehow).

I was now starting doing the font system, it will take a bit still as I need to find the best/most dynamic approach.

I felt that closing the previews was a bad idea, so as soon as I have some text on top of the screen working I'll put a new version online so you can see where the thing is going.
posted by trace at 01:20

Inspire08 demo log, day 29
11.05.2008
Status:
-1 days left until Inspire08
Back to the system code


As now I have more time (lol) to finish this, I'm now taking a look to lwgl as an alternative for jogl. On Friday I was amazed of how easy was to have something compatible for main OS and browser and I wondered why no other sceners used it for avoiding shit time compiling stuff. Then I realised that there were more people on the scene doing demos with Java, at least Pandur did. So I mailed him and after a couple of mails he explained he used lwgl instead. After spending almost all the evening today I still don't know what are the benefits on using jogl or lwjgl, but I think, after testing it a bit, and specially after having been answered nicely all my questions by the people on #LWJGL I think I'll use this one instead. Also the applets seem to be a bit more robust than Jogl ones. Don't take me seriously here, I have no idea what I'm talking about ;) It's just what I feel is the best.

I did some more tweaks on the font, so tomorrow I'll try quickly port the code (shouldn't be too hard) to lwgl and create the font in 3D and.
posted by trace at 17:22

Inspire08 demo log, day 27 and 28
10.05.2008
Status:
-1(0) days left until Inspire08
Content, sync


So, yeah... unfortunately I didn't make it in the end. Well, as 50% of the prods that sceners work on anyway. However, the good thing is that yesterday night I started to have something going on which was very interesting visually and could develop very well. I don't think I'll put more WIP versions available now until I finish it, it has nothing to do with what I showed before and if I showed it it would spoil some effects :P But if you really want to see how it is going, let me know and I'll send you the .zip

Anyway... I'll keep working on it daily and keep logging it until I finish, it doesn't go at all with D/// topic, which is a shame, I don't know if I should change the name/purpose of the demo at this point. Maybe I should and do the next one, for Euskal (which btw, I got the tickets already :D) with the appropriate topic and leave this one as the experimental/test one. Yeah, that makes sense.

Anyway, yesterday night I implemented some Triangle/Vertex/Vect3D classes to the "engine", and today I managed to do very lightweight Tweener-like library/wrapper. It uses Robert Penner Tween equations, which, if you have used some before, you can't live without anymore. This is how the implementation looks like:

triangle.v1.position.x = Tween.process(t, d, triangleDest.v1.position.x, triangleOrig.v1.position.x, Tween.EXPO_EASEIN);

(I got the Java port of the libraries from here).

As I seem to be a bit stuck on how to evolve the effect on the demo (although I have 3/4 of the demo with content already), I guess it's a good time to start thinking about the font. I haven't had a chance to see how to load images yet, but I think I won't do that in the end for this one. So, I will be doing the definition of the font with lines. First I'm designing the font with inkscape:



Doing that was about 5min job. I'll spend a bit of time tweaking the font now tho and then I'll go character by character reproducing it with GL_LINES in a nice class :) While doing the font I tested it on top of a screenshot of the demo, and it more or less fits by now. Man it's starting to look like a global war game or something :D



Well.. tomorrow more.

PS: Some of the prods released at Inspire are already on pouet! Check them out!
posted by trace at 18:12

Inspire08 demo log, day 26 (part 2)
08.05.2008
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...

http://ricardocabello.com/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).
posted by trace at 16:10

Inspire08 demo log, day 26 (part 1)
08.05.2008
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:

http://ricardocabello.com/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.
posted by trace at 10:34

Inspire08 demo log, day 25
07.05.2008
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.

http://ricardocabello.com/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();
	}
}
posted by trace at 19:29

iPhone $399, Dominio 9,95€, Wordpress 0€ ...
07.05.2008
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…"

"wei peña komo va el freskito??
a ver os deso muxa suerte a todo el munso xo necesito ese caxarrito jajaja weno bss y suerte"


"ESTO SEGURO QUE NO VOY A GANAR, EL PRODUCTO ES MY NOBEDOSO MUY BUENO PORQUE ES APPLE Y ES LA TECNOLOGIA PUESTO EN TUS MANOSY PENSAR QUE LAS PRIMERAS COMPUTADORAS ERRA COMO UNA HABITACIO DE GRANDES Y AHORA LAS PODES YEBAR EN EL BOLSILLO, QUIEN LO UVIERA DICHO. ¡LO QUE ES LA CIENCIA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

"Bueno la musica no es lo mio pero mi hijo no puede vivir sin ella y segun el como el ipod nada de nada, asi que aqui me e apuntado para darle la sorpresa si lo gano, un saludo a todos y suerte."

"Hola a tod@s. Ante todo agradecer a los administradores de esta web el iPod que me ha tocado. Primera semana y gano el premio, mejor imposible. Animaros a tod@s a seguir participando, porque aunque todavia seamos pocos, podemos hacer de esta web, una página importante para tomar decisiones en cuanto a la adquisición de productos. Como profesional de la informática, me comprometo a seguir colaborando semanalmente en todo lo que pueda, y me ofrezco para ayudaros en lo que necesiteis. No se si puedo hacerlo, pero dejo por aqui mi msn para cualquier duda o consulta. obi_medina (arroba) hotmail (punto) com. Un saludo!!!"

...
posted by ricardo cabello at 03:41

Inspire08 demo log, day 24
06.05.2008
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:

http://ricardocabello.com/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.
posted by trace at 17:23

What happened to your experimentation?
06.05.2008
... 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/

http://ricardocabello.com/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!
posted by mr.doob at 10:08
Pages:
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
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *affiliations 

xplsv.com admin, development, design
xplsv.tv admin, development, design
escena.org admin, design
molomucho.com development, design