• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
alessio_pi_

mass spring mesh

5 posts in this topic

I would like represent my object as mass spring mesh to simulate soft body dynamics.

Mass represent  vertex while edge represent spring that connect two adjacent vertex.

I

I draw a this simple example to explain my problem.

 

https://plus.google.com/photos/107455303756077315255/albums/5979121850686148337/5979121849500531026?banner=pwa&pid=5979121849500531026&oid=107455303756077315255

 

 

I have four mass m1,m2,m3,m4 and know the values and their positions.

I know the stiffness coefficient kij and dumping coefficient cij of mesh springs where i and j are the vertex index.

 

In figure 1 the system is in the rest position.

In figure 2 after apply a force to m4 point the system change configuration,

 

The user move the m4 point from figure 1 to figure 2 position.

A force applied to m4 move the mass m4.

m1 mass rest in the same position again in figure 2 while mass m2 e m3 have a new position.

I would like calculate the new position of m2 and m3 mass after that user move the m4 mass.

I know the formula about Fi_int the internal force on the vertex i and the damping force Fi_ext on the vertex.

Please help me solve this problem.

 

 

 

 

 

0

Share this post


Link to post
Share on other sites

Couple questions:

 

1. Is figure 1 the initial condition? That is, are all the masses all and all the spring forces are zero?

 

I would like calculate the new position of m2 and m3 mass after that user move the m4 mass.

 

 

2. If you're only interested in calculating the final position of m4, you don't need to consider damping coefficients. Damping is only a function of velocity. When all the masses are at rest there is no damping. The mass positions will all be colinear (all in a line).

masses-springs.png

This is just a quick derivation, so double check the algebra!

 

The letter L represents the distance between two masses
and assumes each spring was at it's rest position before m4 was moved

and ALL k's and distances are > 0.

Forces on m2 must sum to 0 since masses are at rest:
k12 * L12 = k24 * L24, so
1) L12 / L24 = k24 / k12

Forces on m3:
k13 * L13 = k34 * L34
2) L13 / L34 = k34 / k13

Distances:
You know L14 from the final position of m4, so:

L12 + L24 = L14
L13 + L34 = L14

L12 = L14 - L24
1) becomes ( L14 - L24 ) / L24 = k24 / k12
or L14 / L24 - 1 = k24 / k12
L14 / L24 = k24 / k12 + 1
L24 = L14 / ( k24 / k12 + 1 ) [everything on the right is known]

Similarly for L13 / L14
 

Edited by Buckeye
0

Share this post


Link to post
Share on other sites

FYI: The answer I posted was just the implementation of the formulae in the image you posted, after an infinite amount of time.

 

The question you originally posted is greatly different from implementing the model described in the pdf! The model is for a dynamic situation, changing over time (between the start and end points,) and, using your original post as an example, would take into consideration contraints and other forces on m2 and m3, possibly from other masses not shown. In your posted example, when m4 is moved, m2 and m3 will oscillate, and continue to oscillate after m4 has come to rest. If they're free to move without other constraint, eventually the damping will "stop" m2 and m3, and they will come to rest as I described. If you're not interested in the behavior of m2 and m3 between the start and end of their movement, the method in the article may not be what you're looking for.

 

With regard to modeling the system described in the article, you may find someone (other than me) that will work with you on that. I would, however, suggest that you fully understand what you really want to do, and whether implementation of that model is the correct approach.

 

Whatever you decide, I hope it works for you.

Edited by Buckeye
0

Share this post


Link to post
Share on other sites

Hello,

 

I would like to help you implement a mass-spring-damper system, but as the above poster, I am a bit unsure what you want. Are you trying to implement an interactive simulation where the springs and masses move around in  real-time for the user to play with, or are you trying to impement a static, rigid system, where the masses move in an instant and then stand still until moved again?

 

Cheers,

Mike

0

Share this post


Link to post
Share on other sites

Thanks very much for reply. I would like implement the model describe in the article but I don't understand how to set up the model and how solve the equation. My idea was try to apply the model describe from the article on a mesh with few vertex and triangles, and my initial example was related to it.

If someone can help me to implement this model I appreciate.

 

Thanks to all.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0