Author Topic: [PROCEDURAL] Cave (ps 2.0)  (Read 23787 times)

0 Members and 1 Guest are viewing this topic.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
[PROCEDURAL] Cave (ps 2.0)
« on: May 01, 2008 »
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).
« Last Edit: May 15, 2008 by hellfire »
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #1 on: May 02, 2008 »
Wow! Thats amazingly awesome. Welldone dude :)
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #2 on: May 02, 2008 »
Yeah very impressive beautiful textures, this is an awesome entry hellfire

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2748
  • Karma: 492
    • View Profile
    • http://www.rbraz.com/
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #3 on: May 02, 2008 »
Really good one, well done  :cheers:
Challenge Trophies Won:

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #4 on: May 02, 2008 »
Jeepers!  Great entry, this is fantastic.  Very professional. 

I like the geometry the most, although the textures and shading are funky too. 

Excuse me while I go and look up marching cubes....
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #5 on: May 02, 2008 »
@hellfire:
wow! its fucking great and kicking ass! :goodpost:
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #6 on: May 02, 2008 »
Marching cubes algorithm is now free for public implementation. There was a time when it was protected.

GREAT Work!
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #7 on: May 02, 2008 »
Thanks for your appreciation!
At the moment it's a bit boring to look at, guess I should add some dynamic lighting or something...
I'm open to any ideas :)

A comprehensive article about marching cubes can be found here.
Patents aren't of much concern for uncommercial home-dev - at the end we're using mp3, too...
Challenge Trophies Won:

Offline Optimus

  • DBF Aficionado
  • ******
  • Posts: 2456
  • Karma: 128
    • View Profile
    • Optimouse Demo Site
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #8 on: May 02, 2008 »
Wow! Nice, very nice!!!
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17393
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #9 on: May 02, 2008 »
What can I say except it looks fabulous!
Thanks for entering the challenge and good luck with the voting, this will do well in the voting I think.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline mind

  • Texture-San
  • DBF Aficionado
  • ******
  • Posts: 2324
  • Karma: 85
    • View Profile
    • boredom is a beatiful thing.
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #10 on: May 02, 2008 »
damn, thats pretty damn funky :D good job

and speaking of beeing interested, i wouldnt mind taking a peek at your texture code.. those clouds look pretty nifty :)
« Last Edit: May 02, 2008 by mind »
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #11 on: May 02, 2008 »
Quote
i wouldnt mind taking a peek at your texture code..
Oh well, there's absolutely nothing special about that, except maybe that I'm working at 16bit-precision per channel, so I can mess with the levels without running into colour-banding.
The "cloud" is generated recursively:
starting from a flat (all 4 corners have equal colour) 0,0..512,512 image, a new point is created in the center which gets the average of the corner-colours plus/minus some randomness. The resulting four sub-images are then subdivided again until a 1x1 area is reached where the current colour is stored.
All the rest is just some histogram-equalization (of the simplest form), colouring and alpha-blending between layers.
Challenge Trophies Won:

Offline mind

  • Texture-San
  • DBF Aficionado
  • ******
  • Posts: 2324
  • Karma: 85
    • View Profile
    • boredom is a beatiful thing.
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #12 on: May 02, 2008 »
Quote
i wouldnt mind taking a peek at your texture code..
Oh well, there's absolutely nothing special about that, except maybe that I'm working at 16bit-precision per channel, so I can mess with the levels without running into colour-banding.
The "cloud" is generated recursively:
starting from a flat (all 4 corners have equal colour) 0,0..512,512 image, a new point is created in the center which gets the average of the corner-colours plus/minus some randomness. The resulting four sub-images are then subdivided again until a 1x1 area is reached where the current colour is stored.
All the rest is just some histogram-equalization (of the simplest form), colouring and alpha-blending between layers.


ohh a normal recursive subdivision plasma :) it looked very different from those plasmas, but i guess its the histogram levels and blending used :)
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #13 on: May 03, 2008 »
Very nice indeed!
Jim
Challenge Trophies Won:

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #14 on: May 03, 2008 »
Wow. That's just... Wow.  :cheers:
The Dr. is INsane!!!

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #15 on: May 03, 2008 »
Fantastic indeed! Maybe it just misses a starship and some aliens to blast! Never saw a shoot'em up usin this.....
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #16 on: May 05, 2008 »
Awesome effect. Runs very smooth here!
Well done, hellfire!!!

Keep us informed with any new version you produce!


@Stormbringer:
That would be indeed interesting to see a game like
this. Remember DESCENT ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #17 on: May 09, 2008 »
Since you asked, here's a different version ;D
Played a bit with light, color and texture - not exactly what I was looking for, but what the hell...
Now looks different every time you run it.
« Last Edit: May 09, 2008 by hellfire »
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2748
  • Karma: 492
    • View Profile
    • http://www.rbraz.com/
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #18 on: May 09, 2008 »
Should it look like this image ???
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: [PROCEDURAL] Cave (ps 2.0)
« Reply #19 on: May 09, 2008 »
Err, well... no!
But to be honest I somewhat like that, too :)
What card is that?

Challenge Trophies Won: