Jump to content
  • Advertisement

Archived

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

Clouds3000

Putting Particle engine into 3D envionment

This topic is 6481 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

the latest tutorial I have read is the particle engine tutorial of which is very cool so I altered it to my own needs (I will write my own but I feel the best way to learn this kinda thing is to take the tutorial and mess with it till you understand it). I took out alot of the keyboard interaction and speeds/colors etc cause all I want is red particles floating up making a fire effect. But, when I made it so I could scroll around the particles you can see that they are only 2D polygons. Now, with abit of thought you could design it so that all the particles rotated to face you (probly) but when I want to put it into a 3D world (where walking forward requires sin/cos relating to the turn angle) I can''t think how to implement this. Does anyone have any ideas ? Thanks

Share this post


Link to post
Share on other sites
Advertisement
That''s the same I''m trying to do. That''s also the same problem I''m having

I guess you''d have to somehow make the particles rotate and translate so they get on screen like the rest, but also an additional ModelView matrix that ''undoes'' the rotation by the Projection matrix... Geddit?

I''m working on it now. If I find a fix, I''ll mail you. If you do, please mail me...

Bye!

Share this post


Link to post
Share on other sites
Its a deal. I tried working it out, but with a different object. I placed a bitmap, mapped onto a 2D QUAD but obviously when I walk around it, it appears like a piece of paper. My idea was to use trigonometry but I had too many variables. I could calculate the distance between the bitmap, my original position, and the distance between my original position and my new position. But i needed the third side to use the cosine rule to get the angle. This probably makes no sense but I''m crud at explaining. THere is probably an easier way.

When you play 3D games, often you will see a 2D light source object that always faces the screen, so there must be some way to do it.

Share this post


Link to post
Share on other sites
You might want to check out on ''billboarding''. It basically rotates someing so that it faces the camera.

Share this post


Link to post
Share on other sites
Well a Bill Board is simple if your using Direct3D you can just us Point Sprites There part of the Direct3D Intorface and run really fast..

but if your useing OpenGL you need to rotate the Vertects by The invers of the camera Rot on all 3 Planes..
hehe
i would but some code up but i dont have any (I use Direct3D)




-VBLimits
Sorry about the Spelling..
www.VBLimits.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!