Small side project requires very simple 2D shadow system.. here is what I have so far.
On the weekend of 24-26 Jan Global Game Jam has been hosted at Edinburgh Napier University. 48hour to make a game in *cough* theme *cough* which was:
“We don’t see things as they are,
we see them as we are.”
Ideal theme for horror game, right? right?!
Anyway, I wanted to play bit more with OculusVR and make horror game. Aparently there was more people like me:
Thanks to Floyd Chitalu (Code), Joanna Jamrozy && Malgorzata Kosek (Art)
you guys are awesome!
After 48hours and countles reboots of the machines at the location. Yeah PCs are being wiped out every night – few times.
But, hey there is warning! About 3mins before shutdown.. Thumbs up!
so sit down and relax, because you will not be able to backup your project in time anyway.
The game after all is quite scary, buggy but scarry! – I jumped few times playing it.
More about the project, plus binary ( Windows ) && Video from hardcore testing: http://globalgamejam.org/2014/games/buka
The weekend of 16th-17th Nov my friend and colleague @GordonBrown589 and myself proudly represented Codeplay Software at GameHack – idea was to create a simple and fun game within theme in under 24hrs.
The theme was “childhood”.. well.. we still created fun game using awesome technology that is OculusVR.
There are some of the screen shots.. Game looks much better with VR set!
So that was fun. Adding sphere surface coordinates to texture space converter. Used this “trivial” technique UV mapping.
Apart from that, I moved the code around and cleaned it slightly. that resulted in few additional frames per second. Each Sphere is semi-transparent with the same texture.
now what, normal mapping ?
[edit: 29 Jul 2013]
Apparently ther was a bug in my texturing. It is gone now
and night version,
There is a code that I used.
//intersection point, sphere
//algorithm from http://en.wikipedia.org/wiki/UV_mapping
float3 getTexelID(float3 point, sphere * ss)
float3 pole = (float3)(0.0f,1.0f,0.0f);
float3 equator = (float3)(1.0f,0.0f,0.0f);
float phi = 0.0f;
float theta = 0.0f;
float3 normal = point - ss->pos.xyz;
normal = normalize(normal);
phi = acos( -dot(normal, pole));
theta = acos( dot(normal, equator)/ sin( phi )) / ( 2 * 3.141592653589793 );
if ( dot((cross(pole, equator)), normal) > 0 )
U = theta;
U = 1 - theta;
float3 x = (float3)((float)V, (float)U, 0.0f);
finally I got some spare time to improve this baby.
It is a bit of improvement since the last time – 3rd bounce of rays were hacked into. Now the reflection looks far more realistic.
And here reflection of the reflection.. some artefacts here and there – but I can live with them for now.
oh and I need to fix timer for the frame – that is definietly not 0.31ms per frame – it takes about a second per frame. Still not that bad for the vanila implementation.
[Edit: late night]
Managed to add semi-transparent spheres! Rendering of the frame became extremely slow – had to reduce number of spheres on the scene.
Is it the right time to introduce optimisations?
Grid of 10^3 Spheres – there is no acceleration architecture implemented yet – Octree for spheres? that feels odd..
Oh, btw. That’s raytraced.. so far quite interactive.
It uses OpenCL on Radeon 5700 HD – only primary rays so far on ambient material. Give it some time.
Simple directional light lighting system implemented.
Secondary bounces in place (depth of bounces set to two) – little bit of hackery had to be done since there is problem with recursion in OpenCL.
Every third sphere is ambient.