Putting Particle engine into 3D envionment
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
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!
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!
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.
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.
You might want to check out on ''billboarding''. It basically rotates someing so that it faces the camera.
is this a general programming topic? Is it in any of the Nehe tutorials ro could I find it in a search engine?
Thanks
Thanks
Hey Clouds3000, check this:
http://nate.scuzzy.net/docs/billboard.html
http://nate.scuzzy.net/docs/billboard.html
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement