Durandal
01-03-2004, 03:44 AM
Hi. I appreciate that quite a lot of discussion about 'pixel shaders' has been made on this forum, and the related register combiners, but I have a more specific question to ask.
It's more a case of "is this possible" and "what shall I look into in more detail to do this".
Ok, I posted a different question a few weeks back in case this looks familiar. It looks a bit complicated, but it isn't really...
For part of my final year Computer Science project I need to simulate the firing of electrons (from electron guns situated around the screen) onto a spinning screen. I thought I could do this by perhaps using something similar to ray casting, but it would have to be from multiple sources other than the viewpoint, and instead of querying the object colour, it'll return the angle at which the screen is to the electron source.
For example, if the screen was flat to the source (at 90 degrees) it would return 0, but if the screen was end-on to the source, it would return 90.
Each pixel in the range area of the electron gun (regardless of the actual position on the screen - this is the complicated bit) will be tested and coloured varying shades of red depending on how high the angle is (assuming the electron send out hits the screen). Each pixel/voxel will be tested with each electron gun firing at the same location, and an average made for that pixel. It will then be coloured accordingly.
Now, to do all of this I'l need copious amounts of maths http://www.opengl.org/discussion_boards/ubb/frown.gif, but I'm thinking I'll need to look into Ray Casting and Pixel Shading/Register Combiners. Do you think that what I'd like to do is possible? Do you think these methods are the best way of implementing this? If so, do you know of any really good "Idiot's Guide"-type tutorials for them?
Thanks for your help.
It's more a case of "is this possible" and "what shall I look into in more detail to do this".
Ok, I posted a different question a few weeks back in case this looks familiar. It looks a bit complicated, but it isn't really...
For part of my final year Computer Science project I need to simulate the firing of electrons (from electron guns situated around the screen) onto a spinning screen. I thought I could do this by perhaps using something similar to ray casting, but it would have to be from multiple sources other than the viewpoint, and instead of querying the object colour, it'll return the angle at which the screen is to the electron source.
For example, if the screen was flat to the source (at 90 degrees) it would return 0, but if the screen was end-on to the source, it would return 90.
Each pixel in the range area of the electron gun (regardless of the actual position on the screen - this is the complicated bit) will be tested and coloured varying shades of red depending on how high the angle is (assuming the electron send out hits the screen). Each pixel/voxel will be tested with each electron gun firing at the same location, and an average made for that pixel. It will then be coloured accordingly.
Now, to do all of this I'l need copious amounts of maths http://www.opengl.org/discussion_boards/ubb/frown.gif, but I'm thinking I'll need to look into Ray Casting and Pixel Shading/Register Combiners. Do you think that what I'd like to do is possible? Do you think these methods are the best way of implementing this? If so, do you know of any really good "Idiot's Guide"-type tutorials for them?
Thanks for your help.