Dark Bit Factory & Gravity

GENERAL => Challenges & Competitions => Topic started by: Raizor on December 23, 2013

Title: [XMAS_2013] Merry Christmas DBF!
Post by: Raizor on December 23, 2013
Here's a little video of mine and Punqtured's entry for the DBF Xmas Compo, entitled "Merry Christmas DBF!".

It's a little OpenGL intro, that didn't quite get finished in time. I should have a 'final' version ready in the near future, but I wanted to make a video available for now (in time for the compo). Some parts didn't get finished in time and some were removed due to being buggy (craggy rocks, trees and textures mainly). I'll try and get those in for a final. Sorry the video quality isn't great. I used Windows Live Movie maker to process the output of Fraps (for YouTube) and it's a little grainy (and those damn borders at the sides).

Exe size is ~12KB. There are no textures or data included in the intro, everything used is generated at runtime (apart from the font "Trebuchet MS Bold" from Windows) :)

[youtube]wM_p5hAA510[/youtube]

Credits:
Raizor - Code/Design/Modelling
Revival - Code
Punqtured - Music

I had to overcome quite a few challenges when putting this together (which ate the majority of my dev time, sadly). It contains an implementation of IQ's ZBuffer for Raymarching technique (http://www.iquilezles.org/www/articles/raypolys/raypolys.htm), which took quite a bit of head scratching (and some of Revival's patented magic) to get working properly. I hope to write a tutorial covering a detailed walk-through of this. Essentially, it allows you to write depth values to the z-buffer from the raymarching shader. You can then throw regular geometry (GL_TRIANGLES, GL_QUADS etc) over the top and the depth testing gets taken care of automagically. For this to work, we need to pass the current matrices (modelview, projection etc) to the shader, so that it can perform the necessary transforms for camera and lighting before raymarching. Once this was working properly, it gave me the idea of drawing regular bounding objects (for the raymarched objects such as the snowman and logo) to an offscreen buffer (an FBO, in this case). We can then pass the offscreen buffer image into the raymarching shader to allow it to perform a colour check of the current screen pixel being raymarched. If the pixel does not contain the snowman or the logo, we can simply avoid evaluating the distance functions for those objects, which provides quite a speed up. I'm sure this technique isn't new, in fact, I've got a vague feeling I read about something similar in one of Smash's blog posts some time ago (I'll have to check).

Hopefully it hasn't turned out too badly. I'm a little sad that I had to remove some parts and didn't get time to add some others. I had hoped to get the text to feel more a part of the intro, by having it intersectng the terrain, but didn't have time to that in the end. There are also some bugs with the shadows due to the bounding boxes used for culling. Here's a little list of what's missing:

1. Snowman arms.
2. Clouds and cloud shadows.
3. Craggy terrain.
4. Snowman face animation.
5. Trees.
6. Textures.
7. Better lighting.
8. Proper animated text.
9. Decent sync effects.

Well, that's it for now. Feel free to ask any questions. I appreciate some of the techno-babble above may be a little overwhelming. It was certainly new to me, but it's been kinda fun figuring it out along the way. I'll hopefully upload an exe version in the coming days. Quite tied up with Christmas stuff at the moment, so not a lot of spare time :(

Anyway, Happy Christmas!

Raizor

ps. Sorry if I missed anyone in the greets. Feel free to say if I have and I'll add you :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: combatking0 on December 23, 2013
Regardless of all the cool sounding effects and objects that were dropped due to time constraints, this still looks amazing!
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: padman on December 23, 2013
Damn, even half finished prods from you make me realise once more how lame my retro 2D craptros really are.  :o This rocks! Looking forward to the final standalone version! :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: ninogenio on December 23, 2013
thats some awsome raymarching effects raizor!,

I love that grainy/snowy filter thats being applyed too. it really does capture the essence of winter.

top stuff!

ohh and if you do decide too do a little tutorial ill be all over that :) cheers mate.

Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Hotshot on December 24, 2013
That really Impressive Xmas Demo I have seen so far  :clap:
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: ninogenio on December 24, 2013
forgot too add in my previous, Punqtured has done a stunning job with that tune ive listened too it a few times and it just keeps getting better :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Rbz on December 24, 2013
Pretty cool, the snow/ground effect is really great.
I can't wait to see the final version in it's full glory! :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Canopy on December 24, 2013
real nice!  raymarching + snow environments work well together
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Gore Motel on December 24, 2013
Just one word: damn :clap:
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Raizor on December 26, 2013
Thanks guys :)

I've attached an exe version (the same version as the video) to the first post in this thread. I've only managed to test in on NVidia so far (GTX 580), so there might be some issues on ATi, hell, there are bound to be :) This version is also locked to an 800 x 600 window. There's no precalc animation at the moment, so you'll get a blank screen while Clinkster renders the audio track.

Hope you all had a good Christmas day!

raizor

padman, your stuff rules! (and doesn't require a PC less than a week old to run properly) :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: jace_stknights on December 26, 2013
Whooooaaaaaahhhhh So amazing!!!!

And you said "that didn't quite get finished in time" ahahahahaha  :updance:

(Raizor for President!!!)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: ninogenio on December 26, 2013
ahh ive been looking out for the exe. runs no problem on my laptop i7 gt650 top stuff mate  :cheers:
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Pot Noodle on December 26, 2013
Raizor Raizor, What can I say  :o You have a great little Intro there mate, Makes mine look like Play time at nursery school.
It's COO00ool and I love the DBF coming up out of the snow Brill... K++
 :goodpost:
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Kirl on December 31, 2013
Ooooh, lovely puffy, powdery snow effects (would've liked to see a lot more of that) and I'm a sucker for incomprehencible techno babble as well!  ;D

Excellent work guys!  :cheers:
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Raizor on January 06, 2014
On the subject of a tutorial for using a z-buffer for raymarching, Revival pointed this tutorial (http://blog.hvidtfeldts.net/index.php/2014/01/combining-ray-tracing-and-polygons/) out to me, which looks pretty in depth. It's by the guy who makes Syntopia (afaik). Looks like there's a GIT repo with some example code (in Java, I believe). I still hope to put together some stuff myself, but this seems to cover the concepts nicely, so it's worth a look if you're interested in trying something similar.
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: emook on January 09, 2014
Wow! All in 16kb? or are my eyes fooling me?!

Absolutely fantastic, love the flow and feeling!
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Shockwave on March 09, 2014
I love the way that the objects rise out of the snow.  The music is really cool too :)
Title: Re: [XMAS_2013] Merry Christmas DBF!
Post by: Raizor on March 11, 2014
Thanks emook and Shockwave :)