Author Topic: 3d chladni volumes as textures  (Read 18710 times)

0 Members and 1 Guest are viewing this topic.

Offline Blitz Amateur

  • Atari ST
  • ***
  • Posts: 243
  • Karma: 13
    • View Profile
Re: 3d chladni volumes as textures
« Reply #20 on: October 06, 2006 »
As another alternative, I've got an ATI X800 PRO PCI-EX and it was about $150 (Not sure how that translates too pounds) And it's performed amazingly for me. It's got 256mb memory, and SM 2.0.

As far as games application, I can run F.E.A.R. at 1280x960 2xAA 16xAF all setting full except soft shadows, and it's a very playable speed. So, in my opinion, it's a good card :) (And if you don't know what F.E.A.R. is, google it.)

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #21 on: October 06, 2006 »
Yeah I agree with blitzamateur. I have x800 at work. Its slower at shaders than my x1600 PRO (a bit) but faster at *everything* else.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d chladni volumes as textures
« Reply #22 on: October 06, 2006 »
None of the matrix trilogy work on this computer, or that one .
My gfx card is a radeon X300 se.
It should support shaders 2.0 some stuff doesn't run here, not juts your code either.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #23 on: October 06, 2006 »
Well ok in this program I have a line:

if(...) discard;

which throws away the pixel if th condition is met. Technically this is shader model 3.0 as it is dynamic branching its just I never thought of a single line of code as being dynamic branching but of course it is. So I guess this demo really requires shader model 3.0. However that doesnt explain the matrix ones, but my best guess here is that to qualify as PS 2.0 model, you only had to be able to do 95 instructions (I assume assembler level) in the shader. PS 3.0 supports 65535. Probably my vertex shader is too big to fit into PS 2.0.

Probably.

But I dont know.



Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d chladni volumes as textures
« Reply #24 on: October 06, 2006 »
It seems to try and set the screen up because it changes the res but then it hangs really big time. I've had some excellent crashes out of it! :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #25 on: October 06, 2006 »
ooops, sorry about that...probably Jim is right the framework itself is a bit nasty...lets blame auld ;-)
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d chladni volumes as textures
« Reply #26 on: October 06, 2006 »
Ok!  ;D If he'd registered here I'd give him some bad Karma!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Tetra

  • DBF Aficionado
  • ******
  • Posts: 2532
  • Karma: 83
  • Pirate Monkey!
    • View Profile
Re: 3d chladni volumes as textures
« Reply #27 on: October 22, 2006 »
Looks great and very nicely visiualized too  8)
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #28 on: October 23, 2006 »
Thanks tetra. I think a good thing to do with it would be making the spheres look like they ar built out of metal so give it a  molten metal look.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: 3d chladni volumes as textures
« Reply #29 on: October 26, 2006 »
Just received my new gfx card / machine and watched your code. Looks fantastic and
it runs very smooth and fast ... well done !
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #30 on: October 26, 2006 »
Thanks Benny, what did you chose in the end for a gfx card?
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: 3d chladni volumes as textures
« Reply #31 on: October 26, 2006 »
Thanks Benny, what did you chose in the end for a gfx card?

I bought a complete new system. A friend of mine (a hardcore gamer) wanted to sell
his machine ... so I bought his whole system. It has an nVidea GeForce 6800
installed and so far I am really pleased with it.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline mind

  • Texture-San
  • DBF Aficionado
  • ******
  • Posts: 2324
  • Karma: 85
    • View Profile
    • boredom is a beatiful thing.
Re: 3d chladni volumes as textures
« Reply #32 on: November 02, 2006 »
Thanks again guys! If anyone gets interested in shaders and wants the code, anyone can ask of course but my feeling is that very few people here would use the code anyway. However, you are welcome if you want it, just ask.

Shockwave, *should* you be able to run this?...can you run any of the matrix trilogy? if so I'd like to make a few changes to the windowing code and try again with you. I'm worried it doesnt work for you. Also do you have nvdia or ati? What model? Maybe there are some problems with shader compatability. Sigh, things are getting complicated in the hardware world...I'd like to get it sorted so I know if my shader framework is solid or not.


actually, i have thought of a pretty interesting use for this, so if you dont mind i'd love to take a peek on your implementation of the code.. possibilites are endless :D

//Johnny
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #33 on: November 02, 2006 »
@mind: sure , check your PMs...
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: 3d chladni volumes as textures
« Reply #34 on: November 02, 2006 »
Today I was playing with that Chladni formula, and yes, you can make very nice textures shape with this one  :)


Check out the attached file below...
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: 3d chladni volumes as textures
« Reply #35 on: November 03, 2006 »
Thats very cool to see. I think we are beginning to see that 2d/3d chladni has a lot of potential in very few bytes for some very impressive procedural texturing. Is your texturing 2d or 3d rbraz?
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: 3d chladni volumes as textures
« Reply #36 on: November 03, 2006 »
For now It's just a 2D texture, next time, I will try the "circular plate" and merge two shape together for plasma like effect and  I will try the 3D version too   O0

Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: 3d chladni volumes as textures
« Reply #37 on: November 03, 2006 »
Okay, let me ask a dumb question. How do you translate the equations into pixel coordinates?

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: 3d chladni volumes as textures
« Reply #38 on: November 03, 2006 »
For 2D draw, I did this (c code):

Code: [Select]
for(y=0; y<256; y++)
{
for(x=0; x<256; x++)
{

//chladni effect
u = 192+x+( (cos(n * PI * x / L) * cos(m * PI * y / L)) - (cos(m * PI * x / L) * cos(n * PI * y / L)) );
v = 112+y;
WritePixelFast((int)u, (int)v, (color << 16) | (color << 8 ) | color);
}
}
Challenge Trophies Won:

Offline mind

  • Texture-San
  • DBF Aficionado
  • ******
  • Posts: 2324
  • Karma: 85
    • View Profile
    • boredom is a beatiful thing.
Re: 3d chladni volumes as textures
« Reply #39 on: November 03, 2006 »
Okay, let me ask a dumb question. How do you translate the equations into pixel coordinates?

well, since you have x and y coordinates inside the equation, simply put the equation inside your x/y loop, something like this:

Code: [Select]
for x = 0 to 255
for y = 0 to 255
  {
     x2 = ( cos( n*pi*x/L ) * cos( m*pi*y/L ) )*128;
     y2 = ( cos( m*pi*x/L ) * cos( n*pi*y/L ) )*128;
     color = x2-y2;
     if color<000 { color = 000};
     if color>255 { color = 255};
     pBuffer[x][y] = color;
  }

notice that i multiply the x2 and y2 by 128 to normalize from -1  1 to 0  255 for a more pleasant visual effect.. also, i split the equation up for simplicity and to make it easier to read.

problem i have for now is that i havent found a nice way to make it tile yet, as in the examples seen over at paul bourke´s..

hope that helped :)

//Johnny
« Last Edit: November 03, 2006 by mind »
Challenge Trophies Won: