Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - hellfire

Pages: [1]
1
General chat / Mindcandy 3
« on: November 24, 2011 »
I'm just watching the Mindcandy 3 blu-ray on a 40" screen and it's really amazing.

2
Challenges & Competitions / [WIREFRAME] Isocubes
« on: May 29, 2011 »
Here's another, again totally rushed, entry to the wireframe challenge.
It draws only lines using OpenGL, no fancy textures, "zero polys and shaders".
Tune is by Dubmood/Razor1911 - check more of his stuff here!
Enjoy.

Here's a video-link for convenience:
[youtube]v7J8pD9n-A0[/youtube]

3
General chat / A math/visualization question
« on: April 18, 2011 »
In 2d a line divides my vector space into two partitions:


In 3d a plane (2d space) divides my vector space into two partitions:


Consequently, in 4d a 3d-space divides my vector space into two partitions.

I'm looking for a plausible illustration for a not-so-much-into-math audience.
Any ideas are welcome :)

4
Projects / BBQ 2010 (Shader 3.0)
« on: June 04, 2010 »
Hi guys,

I though I'd add this one here as the code originated from the led challenge:


Radix was so kind to compose a little tune for it.
And if anyone happens to be near cologne tomorrow, don't hesitate to drop by.

Pouet and Binaries.

5
Projects / Bitmap-Font Maker
« on: December 22, 2009 »
As a friend of mine asked for a simple way to create bitmaps from true-type-fonts, I dug out an old tool of mine - maybe it's useful for someone else, too.

What it does is rendering each character into a bitmap and tries to place them all into one map.
It creates a list with information about
  x-position
  y-position,
  width,
  height,
  offset from base-column (this is useful for serif-fonts where characters partially overlap),
  offset from base-line
  actual width required by the character (that's where the next character starts)

An extreme example of a single character stored in the map looks like this:


You can specify font, size, bitmap, spacing, number of colours and color-encoding.
There are some additional options like creating a set of required characters from the actual text and exporting image-data as ready to include source-code.

A simple heuristic tries to avoid worst-case scenarios when assembling the different character-bitmaps into a single map - but it's yet far from optimal or even clever.

Download here (3.1mb due to Qt).

Feature requests are welcome.

A very simple example how to use this with OpenGL is attached below.

Have fun.

6
General chat / Swatch MTV Playground ?
« on: July 28, 2009 »
Just saw a commercial for this on TV - looks kinda interesting.

7
Challenges & Competitions / [MAGNIFICATION] Cells
« on: July 24, 2009 »
So here's a small entry to the magnification challenge.
What you see is a growing set of cells.
They jostle, divide and do a little bit of pogo-dancing when the beat starts.
You can also move 'em using your mouse.
This time there are no fancy shaders involved, you just need something OpenGLish capable of multi-texturing.

Sadly a lot of ideas had to be left undone as I was a bit low on time :(
Hope you have some fun with anyways.

Music, again, by Dune aka Brothomstates and one texture was done by Acryl.
Uses MiniFMOD to play XM.

How it works:
The cell structure is obtained by constructing a Voronoi diagram from a set of points.
For those interested in the technique I've attached an early version I used for debugging.
Here you can see the cell points (black; you can move them with your mouse),
the delaunay triangulation (green),
the triangles' circum-circles (red),
the voronoi-cells (blue) whose edge-points are equal with the circles' centers.

8
So moderator magic moved my post from here to a whole new topic...

As stated in the title it's just a copy of Clyde's source to compile in Visual Studio (2005 or newer).
Might be interesting for blitz-users who want to peek into c++.

9
Here's a little entry to the challenge.
It's basically just a short camera-path around an object, but every pixel shows a different "time" of the animation.
The time-index of each pixel is determined by a simple 2d-plasma which makes the model appear to bend forth and back.
Enjoy.

Stuff used:
The 3D-Model was taken from here,
fixed up and prelightened in 3ds max,
specular environment map by Paul Debevec,
diffuse convolution created with hdr shop,
normal-map retouched with Photoshop.

For those not equipped with a shader 2.0 card, here is a short video.

10
General chat / Tools that handle jpeg2000
« on: January 27, 2009 »
Hello everyone,

I'm increasingly using high dynamic range images which can eat up serious amounts of filesize.
Jpeg2000 (eg. implemented with jasper) can store those quite well (at 16bit per channel which is usually enough for me), but it can be tricky to figure out a reasonable compression-level; certain artefacts are noticable at different exposure-levels and it becomes a stupid process of try&error&tryagain.
So what I'm looking for is some tool that can save jpeg2000, show a preview of the compressed image and lets me change the exposure of the preview.
Unfortunately I haven't found anything usable yet, although that should be a common requirement nowadays.
There are some commercial plugins for photoshop (from luratech and leadtek), but I wasn't really planing to pay for such a simple tool.
Any tip is welcome.

11
Challenges & Competitions / [LED] Cubes (ps3.0)
« on: December 19, 2008 »
Here's my entry to the challenge.
Put together in a hurry and many things are left to do; as usual.
I took a different approach and tried to visualice the led itself (ended up being some kind of glass-cube, though).
To conform with the rules, i used a 2x2 matrix ;D
Hope you like it.

Requires shader model 3.0; a video can be found here or watch a stream on vimeo.

Uses OpenGL, MiniFmod, Jasper and music from Dune/Orange.

12
General coding questions / screen aspect ratio
« on: October 21, 2008 »
Hi everybody,

I'm looking for a reliable way to get the display's *actual* aspect-ratio.
At the moment I expect the pixels to be square and pick the (nearest) corresponding ratio from the desktop-resolution.
So, for example, a 1280x720-display is very likely to be 16:9 - but it's not always true:
My old CRT running at 1280x1024 would result in 5:4 but actually is 4:3.
Another flat-screen runs 1920x1080 (16:9) but is 16:10.
And there are probably even worse examples around.
However, there should be a way to get this information without user-interaction...?


13
General chat / linking signature banners
« on: September 16, 2008 »
Thought it would be a good idea if a click on a challange-banner takes you to the corresponding thread.
In your Forum profile Information, add something like this in your signature:
Code: [Select]
[url=linkToYourThread] [img]http://linkToYourSignatureImage[/img] [/url]Cheers.

14
Hi pals,

I fiddled a bit with FreeBasic today and converted my entry from the reduced resolution challenge (original C++ source can be found here).
There's nothing very special about it, but maybe someone want's to have a look...
I didn't touch basic for almost 20 years, so please don't mind if there are (and there most probably are) some mayor mistakes included ;)

15
Freebasic / What editor are you using?
« on: September 03, 2008 »
Since quite a lot of you seem to be working with FreeBasic, I also wanted to have a look at it.
For a start I tried FBIde, but, ehm, seriously no.
So, is there anything cool?

16
So, this is the source code of my entry to the reduced-resolution-challenge (including visual studio project).
I cleaned the source up a bit, simplified some things and added some comments.
Still this is a bit hacked & messy here and there and is not meant as a tutorial.
You're expected to have at least some idea what C/C++ and OpenGL are. But even if you're a complete beginner it might be fun to turn on some of the parameters.
Music is not included for clarity (the original version used minifmod to play an xm-file and the tune can be found here).

If you don't understand some details please feel free to ask here.

Have fun!


17
Projects / soft shadows
« on: August 21, 2008 »
Hey everyone,
made some tries with direct3d lately but have some doubts of the compatibility, so I would really appreciate if some of you could give it a try (might require vc redist).

I use a 32bit-float (single component) cube-map render target and I'm not sure if those are commonly supported.
The pixel-program should compile on shader-model 2, but if it doesn't please post the error-message from the console window.
If it does anything strange, please run the CapsViewer, use "file"->"print whole tree to file" and attach the resulting "dxview.log".

The white box is the light source (and its' approximated area) - not a bug ;)

Many thanks in advance!


- Added some more debug-infos (see console window)
- DirectX-Update (including d3dx9_xy.dlls) can be found here.

18
Challenges & Competitions / [REDUCED RES] Wire
« on: August 04, 2008 »
After I found so many great entries were already posted to this month' challenge-installment, I somehow felt like showing what I've got so far. It's not yet where I want it to be and I'll post some updates later on. It'll probably give some ideas and maybe it's interessting to see the progress, too.

After reading this...
Quote
You may change your colour pallette throughout the demo as long as you don't display more than 4 at once
...I figured it would be easy to alternate two (or more) different palettes from frame to frame, thus making two different colours at the same pixel-position appear as a new, different colour.
At a decent refresh rate of 100hz I thought this would work pretty well, yielding 4^2 colours. However, practice showed it's not that easy: LCDs don't handle much more than 60hz and don't blur pixels as nicely as CRTs did.
Flipping a pixel's colour between very different colours just results in heavy flickering, so I reduced the theory to a linear 8 colour-gradient with one frame showing the even colours of the gradient, the the next frame showing the odd colours, thus flipping a pixel's colour between two adjacent colours of the 8-colour palette to reduce the flickering.
See picture 1: gradient reduced to colours 1 3 5 7 (upper), reduced to colours 0 2 4 6 (middle), resulting gradient of alternating both (lower).
This still showed lots of flickering on larger single-coloured areas - so I figured I just wouldn't use single-coloured areas and go for wireframes!

So what I do here is drawing a wireframe-grid using anti-aliased lines with some wave-animation (the classic interference thing). Rendering happens in 8bit greyscale internally (see picture 2) and get's dithered (to reduce colour-banding) to 4 of 8 colours every frame using a 4x4 bayer-matrix. bayer has a less "noisy" layout than floyd-steinberg which works somewhat better with such big pixels. The matrix is then 2x2-transposed every frame to hide the dither-layout.

Now 8 colours aren't particularly much, so I chose the darkest colour not to be black and reduced contrast. Originally I planned a palette that gave a green-monitor's feeling, but that turned out to be a bad choice as the human eye is most sensitive on green. So I went for something amber-like instead.

Since the lighting produces some dark areas (larger single-coloured areas, see above) I chose the same darkest colour in both 4-colour-palettes to reduce the flickering here (didn't hurt much).

For the screenshot (picture 3) I blended two adjacent frames 50:50 to simulate the effect.
You can stop the executable at any time (eg by clicking the window-bar) and count the colours: there are four :)

Here is some pseudo-code for the bayer-dither:
Code: [Select]
void dither(unsigned int *dst, unsigned char *src, unsigned int *pal, int xres, int yres)
{
   // standard bayer dithering matrix:
   char bayer[16]=
   { 1, 9, 3,11,
    13, 5,15, 7,
     4,12, 2,10,
    16, 8,14, 6 };

   for (int y=0;y<yres;y++)
   {
      // select the corresponding line of the dither-matrix
      char *matrix= bayer + ((y & 3)<<2);
      for (int x=0;x<xres;x++)
      {
          unsigned char value= *src++ >> 2;  // no need for the lowest two bits (0..255 -> 0..63)
          unsigned char col= value >> 4; // upper two bits define colour (0..3)
          unsigned char sub= value & 0xf; // lower four bits are "sub-precision" for matrix-compare
          if (sub >= matrix[x & 3]) // use either "col" or "col+1"
            col++;
          // to avoid an overflow-check here you can simply set pal[4]=pal[3] initially.
          *dst++= pal[col]; // store actual colour
      }
   }
}

the c++ source is available here and the freebasic source here.

And here is a youtube link:
[youtube]0WU5yczRQ_o[/youtube]

19
General coding questions / Generating a cube
« on: May 05, 2008 »
Okay, it sounds *really* obvious, but I'm looking for a clever way to make it small.

Nothing special on the cube - 8 vertices, 6 sides, 12 edges:


Generating the vertices is trivial.
Looping through all vertex-indices i [0..7], we get the x,y,z-coordinates in [0..1] with:
Code: [Select]
x= (i+1)>>1&1;
y= i >> 1 & 1;
z= i >> 2 & 1;
(Swapping 2/3 and 6/7 simplifies x to "i & 1", but keeping them clockwise gives ready-to-use quad-order).

Now to the interessting part - extracting the 12 edges.
Each edge is defined by two vertex-indices:
0-1, 1-2, 2-3, 3-0, 4-5, 5-6, 6-7, 7-4, 0-4, 1-5, 2-6, 3-7
Since each index [0..7] requires only 3 bits, we could simply store these, eg each pair in 1 byte (using 4bits each for readability) - resulting in 12 bytes of storage.

Looping through all edges e we can look up the edge-indices from the table:
Code: [Select]
char edges[12]= {0x01,0x12,0x23,0x30,0x45,0x56,0x67,0x74, 0x04,0x15,0x26,0x37};

v1= edges[e] >> 4 & 0xf;
v2= edges[e] & 0xf;

But looking at the upper nibble of each byte (012345670123) we certainly won't store that, but get v1 from e:
Code: [Select]
v1= e & 7;
All that's left are 12 3bit values (=36bit; how unhandy).
So all we need is a function to get v2 from e:
Code: [Select]
input:  0123 4567 89AB
output: 1230 5674 4567

Obviously the function should be smaller than space (+extraction) needed to store the table...
Ideas anyone? :)


20
Hi everybody,

here's an effect inspired by monkey, a winamp-plugin by Ryan Geiss.

Unlike the original, I wanted to give it a more "realistic" look with smoother surface, proper texturing and a more organic touch.
I already wanted to try this for years, but never really found time until yesterday.
The implementation was pretty straight forward, I did the geometry-generation (including parameter tweaking) yesterday evening and - 1st of may is holiday here :) - a *very* simple texture-generator with gui today.

So what it does is twirling a set of intersecting pipes into a volume (effectively a 64x64x128 grid) and generating the iso-surface using a marching cubes algorithm.
The shading is done by simple vertex-coloring using some kind of local ambient-occlusion approach - since I got the volume-grid anyway, I simply look for potential occluders in the vertex' surrounding.
Texturing is done using one simple generated 2D texture which is mapped from all three canonical axes and blended over at the cross-sections - which works pretty well as long as the texture has rather low contrast.
Since this is done at per-pixel-level it requires ps 2.0 to run (actually it *would* work with ps 1.1 but glsl doesn't really support those).
The texture itself is generated from a set of differently coloured and blended plasmaclouds (and looks like this).
When I have some spare time again, I will definetly try to improve it, as it still looks somewhat too ... generated.
But since this will probably not happen before the end of the challenge, I'm already posting it now.

I didn't go for much size-optimizing here, but then again it isn't actually big either.
At the moment the source is probably way too messy to be of any use, but if anyone is interested in details, I'm willingly telling.

Enjoy.


If, for whatever reason, it won't run on your machine, here is a video, too.
Also attached a shot of the current texture (downsampled, "actual size" is 2048x2048).

Pages: [1]