• Welcome to Dark Bit Factory & Gravity.
 

3d chladni volumes as textures

Started by taj, October 03, 2006

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Blitz Amateur

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.)

taj

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:

Shockwave

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:

taj

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:

Shockwave

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:

taj

ooops, sorry about that...probably Jim is right the framework itself is a bit nasty...lets blame auld ;-)
Challenge Trophies Won:

Shockwave

Ok!  ;D If he'd registered here I'd give him some bad Karma!
Shockwave ^ Codigos
Challenge Trophies Won:

Tetra

Looks great and very nicely visiualized too  8)
Challenge Trophies Won:

taj

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:

benny!

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:

taj

Thanks Benny, what did you chose in the end for a gfx card?
Challenge Trophies Won:

benny!

Quote from: taj 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:

mind

Quote from: taj on October 04, 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:

taj

@mind: sure , check your PMs...
Challenge Trophies Won:

Rbz

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:

taj

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:

Rbz

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:

rdc

Okay, let me ask a dumb question. How do you translate the equations into pixel coordinates?

Rbz

For 2D draw, I did this (c code):

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:

mind

#39
Quote from: rdc on November 02, 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:


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
Challenge Trophies Won: