Archived

This topic is now archived and is closed to further replies.

Omega Point

vector fields in directx 8

Recommended Posts

Omega Point    122
Does anyone have experience working with vector field visualization effects in directX 8? The type of effect I''m talking about it what is used in older music visualization plugins like Acidspunk and Geiss. I''ve tried implementing this in directX 8 by using two lockable back buffers, but this causes unacceptable frame rate deduction. Mtranformation routine is of course not optimized, but I''m afriad locking the back buffer is just not going to work out. Another idea I had was using the GetFrontBuffer() function and using that as a source to be transformed onto a texture, but I haven''t written the code for this yet. Does DirectX 9 offer a better way to implement this, perhaps? Any help will be greatly appreciated.

Share this post


Link to post
Share on other sites
thedo    124
I havent seen those visualisations, but from the description you gave I would look into a vertex buffer rendering points. Make the VB dynamic and you''re laughing.

You can do this in DX8 or 9

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites
Omega Point    122
hmm I don''t know how a dynamic vertex buffer would do the trick. Let me explain exactly what I''m trying to do.

First I set up an array the same size as the screen, holding a floating point x and y coord. These coords are calculated from a vector field equation.

Then I loop through all the points in the destination back buffer ( buffer number 0 ) and replace the color with a color value I got from bilinearly filtering the color at the x,y position in the source buffer ( buffer number 1)....hope you followed that.

Effects that use the same 2d transformation for the whole screen I can do by playing with the vertex buffer ( such as rotozooming). But say if I wanted to do a more complicated effect that varies accross the screen ( such as having pixels closer to the center move faster than pixels further away), then I dont see how I could do it just by changing the vertex coords.

Thanks for the suggestion though, I''ll definatly look into it.

Share this post


Link to post
Share on other sites