Cycles Rendering in Blender

Posted on: November 22nd, 2011 by admin

Blender Cycles demo

A quick demo of the new Blender cycles rendering engine. Still to be implemented into the official release, this new rendering engine provides much more realistic effects and can alternate between using either the CPU or GPU for rendering (essentially you choose whichever is more powerful in your machine). Also gives live full-render updates in the viewport, however a high-end machine is required to make this feature useful. Blender Builds with the cycle renderer can be obtained from http://graphicall.org/

Click here, to see a larger version of the image & a little experiment which blends 2 renders to create the illusion of a changing focal depth. Needs Flash Player 11 as images are using GPU acceleration.

Flash Player discontinued on Mobile Devices

Posted on: November 10th, 2011 by admin

Adobe today announced the end of Flash Player on Mobile Devices.

Although the Desktop version will still be developed, what with Microsoft’s plug-in free Windows 8, it is hard to imagine this remaining the case for too much longer. I doubt anyone was developing Flash content specifically for mobile browsers anyhow, but the difference is why would you now develop anything requiring Flash Player for desktop Browsers, when you know you would have to rebuild it using some other platform for mobile browsers. In fact the only thing I can now see keeping Flash Player on the web, is the huge number of gaming sites that a dependent on the plugin.

So Adobe is putting its faith in Apps for mobile using the AIR platform (which is still Flash). I still believe Flash, through AIR, has the potential for a healthy future. It has not exactly taken the desktop world by storm but AIR is proving much more successful on mobile, so they are effectively putting all of the remaining eggs in the one basket. Will it be enough?

Ultimately this decision simplifies the whole development landscape in a number of ways, so while I am a little sad at the news, I’m glad that this ridiculous Flash vs HTML 5 debate can finally be put to bed.

Flint – Stage 3D accelerated Particles

Posted on: October 30th, 2011 by admin

Just discovered Flint for generating particles. Flint contains an away3d 4 renderer, which means we can have stage 3d accelerated particles.

See the demo.

And here is the code for this demo. To get this working you will need the FLINT source, and the latest Away3D 4 (broomstick) source.


package
{
import away3d.cameras.Camera3D;
import away3d.containers.ObjectContainer3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.debug.AwayStats;
import away3d.lights.PointLight;
import away3d.materials.BitmapFileMaterial;
import away3d.materials.ColorMaterial;
import away3d.primitives.Cube;
import away3d.primitives.Plane;
import away3d.primitives.Sphere;

import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Vector3D;

import org.flintparticles.common.actions.Age;
import org.flintparticles.common.counters.Steady;
import org.flintparticles.common.displayObjects.RadialDot;
import org.flintparticles.common.initializers.ImageClass;
import org.flintparticles.common.initializers.Lifetime;
import org.flintparticles.common.initializers.ScaleImageInit;
import org.flintparticles.integration.away3d.v4.A3D4Renderer;
import org.flintparticles.integration.away3d.v4.initializers.A3D4CloneObject;
import org.flintparticles.threeD.actions.DeathZone;
import org.flintparticles.threeD.actions.Move;
import org.flintparticles.threeD.actions.RandomDrift;
import org.flintparticles.threeD.emitters.Emitter3D;
import org.flintparticles.threeD.initializers.Position;
import org.flintparticles.threeD.initializers.Velocity;
import org.flintparticles.threeD.zones.BoxZone;
import org.flintparticles.threeD.zones.LineZone;
import org.flintparticles.threeD.zones.PointZone;

[SWF(width="1280", height="720", frameRate="60", backgroundColor="0x000000")]
public class SnowStorm extends Sprite
{

//engine
private var view:View3D ;
private var scene:Scene3D;
private var camera:Camera3D;

// materials
private var groundMat:ColorMaterial;
private var wallMat:ColorMaterial;

//lights
private var mainLight:PointLight;

//objects
private var ground:Plane;
private var cube:Cube;
private var player:Cube;

//particles
private var partContainer:ObjectContainer3D;
private var emitter:Emitter3D;
private var renderer:A3D4Renderer;
private var zone:BoxZone;
private var position:Position;
private var zone2:PointZone;
private var velocity:Velocity;
private var move:Move;
private var boxZone:BoxZone;
private var deathZone:DeathZone;
private var scaleImage:ScaleImageInit;

// other
private var isMouseDown:Boolean;

public function SnowStorm()
{
initEngine();
initLights();
initMaterials();
initObjects();
initParticles();
initListeners();
}

private function initEngine():void{

scene = new Scene3D();
camera = new Camera3D();

view = new View3D();
view.antiAlias = 4;
view.camera = camera;
view.scene = scene;
view.backgroundColor = 0x000000;
this.addChild(view);

camera.z=-250;
camera.y=50;

addChild(new AwayStats(view));
}

private function initLights():void{

mainLight = new PointLight ();
mainLight.x = 1000;
mainLight.y = 5000;
mainLight.z = -2000;
scene.addChild(mainLight);

}

private function initMaterials():void{

groundMat = new ColorMaterial (0xffffff,1);
groundMat.lights = [mainLight];
wallMat = new ColorMaterial(0xff3300,1);
wallMat.lights = [mainLight];

}

private function initObjects():void{

ground = new Plane (groundMat,5000,5000,1,1);
ground.x=0;
ground.y=0;
ground.z=0;
scene.addChild(ground);

cube = new Cube (wallMat,100,100,100,1,1,1);
cube.x=0;
cube.y=50;
cube.z=0;
cube.rotationY=30;
scene.addChild(cube);
// the player mesh. This mesh is technically not required as it is not in view of the camera, and does nothing. It is included for future collision detection, but you can remove all refernence to player if you like.
player = new Cube (wallMat,50,50,50,1,1,1);
player.x = camera.x;
player.y = camera.y-25;
player.z = camera.z+250;
scene.addChild(player);

partContainer = new ObjectContainer3D();
partContainer.x=0;
partContainer.y=500;
partContainer.z=0;
scene.addChild(partContainer);

}
private function initParticles():void{

//create emitter
emitter = new Emitter3D();

//initialize particle count
emitter.counter = new Steady(100);

//particle material
var particleMaterial:ColorMaterial = new ColorMaterial( 0xffffff,1);
var sphere:Sphere = new Sphere( particleMaterial, 2, 6, 6 );
emitter.addInitializer( new A3D4CloneObject( sphere, true, 400 ) );

//emission zone
zone = new BoxZone(5000,50,5000,new Vector3D(0,0,0));
position = new Position(zone);
emitter.addInitializer(position);

//velocity zone
zone2 = new PointZone(new Vector3D(0,-50,0));
velocity = new Velocity(zone2);
emitter.addInitializer(velocity);

//particle life
emitter.addInitializer(new Lifetime(10)); // this is the abbreviated way of using the addInitializer method

// add actions
move = new Move();
emitter.addAction(move);

//this is the abbreviated way of using the addAction method
emitter.addAction(new Age());
emitter.addAction(new RandomDrift(50,50,50));

// specify renderer
renderer = new A3D4Renderer(partContainer);
renderer.addEmitter(emitter);

//start the emitter
emitter.start();

}
private function initListeners():void{

this.addEventListener(MouseEvent.MOUSE_DOWN,onMdown);
this.addEventListener(MouseEvent.MOUSE_UP,onMup);
this.addEventListener(Event.ENTER_FRAME, loop);
}

private function onMdown(e:MouseEvent):void{
isMouseDown = true;
}
private function onMup(e:MouseEvent):void{
isMouseDown = false;
}

private function loop (e:Event ):void{

mouseMove();
view.render();

}

private function mouseMove():void{

// Tilt the camera up/down based on mouse position.
camera.rotationX -= -( mouseY - ( stage.stageHeight*0.5 ) ) * 0.005;

// spin the camera around based on mouse position.
camera.rotationY += ( mouseX - stage.stageWidth*0.5 ) * 0.005;
player.rotationY = camera.rotationY;
// if the mouse is down then move forward.
if( isMouseDown ) {
var xComponent:Number = Math.sin( camera.rotationY * Math.PI / 180 ) * 10;
var zComponent:Number = Math.cos( camera.rotationY * Math.PI / 180 ) * 10;
camera.position = new Vector3D(
camera.x + xComponent, camera.y, camera.z + zComponent );
player.position = new Vector3D(    camera.x + xComponent, camera.y-25, camera.z + zComponent )

}
}
}
}

New remixes at sista4tune

Posted on: April 21st, 2011 by admin

2 track on the have been remixed & polished @ sista4tune. Head on over and have a listen to “Call Me” and “Doin’ It Right”.

sista4tune on-line

Posted on: March 22nd, 2011 by admin

The website for sista4tune is now up & her music can be listened to directly from the website. This site incorporates CSS, jQuery & Flash to create a simple single page experience. Streamlined design & integration of technology allowed for a low-cost solution for this talented young artists to get a promotional site up and running.

sista4tune website
sista4tune website.
Near future updates will include additional tracks &  iTunes integration.

New site Layout

Posted on: February 22nd, 2011 by admin

A new layout for subcultural!

This was mostly done as an exercise for my GSIT students, as they are learning how to create custom WordPress themes.

Still a bit of fine-tuning involved and one problem I have yet to overcome. If you are on a page where the left sidebar is longer than the main content area, then the sidebar overflows into the footer. The normal “clear:both;” method is not working…? Suggestions are most welcome!!!

Cheat Sheets Galore!

Posted on: June 23rd, 2010 by admin

Spyrestudios have just posted the most impressive list of cheatsheets I’ve ever seen. Head on over and have a look : Cheatsheet Mega Collection