Plotting Pixels in D3D8
I''m currently making a game by using the ID3DXSprite interface in DirectX 8. How do you plot pixels? Is it possible to mingle the ID3DXSprite mode and still use DrawPrimitive?
Read the following topics on this forum:
And again 2D in DX8
DirectX 8 - using 2D and 3D??
Can you tell us why you are trying to plot pixels?
And again 2D in DX8
DirectX 8 - using 2D and 3D??
Can you tell us why you are trying to plot pixels?
Yeah. Well, I''m trying to create a game, an asteroids -type clone except with a million extra bells and whistles (i won''t reveal in depth and i''m trying to create additions to the bitmapped explosions - particle systems. so basically i just create a small vertex buffer with one vertex? cool! thanx a lot -
Cipher3d
-gamedev rules!
Cipher3d
-gamedev rules!
creating a vertex buffer with only one vertex is quite suboptimal. Unless of course you only have one vertex...
If I can restate your problem, it sounds like you want to have particle explosions with particles flying every which way. You probably also want them to be fairly random looking and nonrepetitive. If that's the case, consider the following:
Create a vertex buffer containing a random, very small cloud of points in 3D (I don't know, say 50ish points??) Now, on each frame, apply a scaling matrix to the point cloud to expand it. I haven't tried it, but this should give the effect of a burst of particles. But it's repetitive, so...
Each time there is a new explosion, apply a random rotation to the 3D cloud. If the points are random and the rotation is random, each explosion should look fairly unique. There may even be some value to slowly rotating the cloud during the rescaling to add extra motion.
Even if the exact details above don't work as you want them, this is probably a decent framework. If you really wanted to do something cool, you could use a vertex shader to explode along random, preset notmals and adjust the alpha of each particle so that they slow down and fade at the edges of the explosion.
Yes, yes, you're drawing 2D - by the time the 3D cloud is rendered, it is 2D, unless of course you have a DTI monitor...
Edited by - CrazedGenius on August 14, 2001 1:32:35 AM
If I can restate your problem, it sounds like you want to have particle explosions with particles flying every which way. You probably also want them to be fairly random looking and nonrepetitive. If that's the case, consider the following:
Create a vertex buffer containing a random, very small cloud of points in 3D (I don't know, say 50ish points??) Now, on each frame, apply a scaling matrix to the point cloud to expand it. I haven't tried it, but this should give the effect of a burst of particles. But it's repetitive, so...
Each time there is a new explosion, apply a random rotation to the 3D cloud. If the points are random and the rotation is random, each explosion should look fairly unique. There may even be some value to slowly rotating the cloud during the rescaling to add extra motion.
Even if the exact details above don't work as you want them, this is probably a decent framework. If you really wanted to do something cool, you could use a vertex shader to explode along random, preset notmals and adjust the alpha of each particle so that they slow down and fade at the edges of the explosion.
Yes, yes, you're drawing 2D - by the time the 3D cloud is rendered, it is 2D, unless of course you have a DTI monitor...
Edited by - CrazedGenius on August 14, 2001 1:32:35 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement