Jump to content
  • Advertisement
Sign in to follow this  
phi

adding image to verlet physics

This topic is 4349 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

Hi Ive managed to get my verlet physics working. However, I'm not sure how to attach images to the particles and constraints. For example, a square is made up of four particles and 6 constraints. I can draw the particles and constraints, but how do I use an image instead? At the moment, I can't get the image to rotate with the "mesh" because techincally it's not connected in any form to the mesh. Any ideas? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Well, assuming you're using direct3d or opengl, the easiest way would be to simply draw a textured quad using the particles to define the vertices of the primitive.

Share this post


Link to post
Share on other sites
If there were to be a lot of quads on screen at once, would there be a huge slowdown? It is, however, a 2D game so only one side will be textured, but I'm not sure how fast it is.
Thanks for the help.

Share this post


Link to post
Share on other sites
Quote:
Original post by phi
If there were to be a lot of quads on screen at once, would there be a huge slowdown? It is, however, a 2D game so only one side will be textured, but I'm not sure how fast it is.
Thanks for the help.


Both Direct3D and OpenGL use hardware acceleration, which makes rendering uber-fast; if a modern 3D game can render complex scenery consisting of thousands of polygons, you can certainly afford to render as many quads as you want. Even older computers shouldn't have any problems with reasonably large amounts of quads. That said, its still a good idea to implement some kind of culling; don't draw quads that aren't on the screen.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by phi
Hi
Ive managed to get my verlet physics working. However, I'm not sure how to attach images to the particles and constraints. For example, a square is made up of four particles and 6 constraints. I can draw the particles and constraints, but how do I use an image instead? At the moment, I can't get the image to rotate with the "mesh" because techincally it's not connected in any form to the mesh. Any ideas?
Thanks


I think you mean't 'Jakobsen' physics. Verlet is just an integration method, it is not limited to just that one method involving the particles and constraints, etc.

Share this post


Link to post
Share on other sites
Indeed I meant Jakobsens physics. However, I have run into a problem. I am using blitzmax but I cannot seem to create quads. Does anyone know how to create quads in bmax?
Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!