• 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
taxfromdk

Modelling drag on a mesh analytically - Am I using a right approach

1 post in this topic

Hi Guys,

 

I am trying to model viscous friction like seen in Karl Sims work on underwater virtual creatures. 

 

https://www.youtube.com/watch?v=JBgG_VSP7f8

 

I am therefore trying to model the drag forces of viscous drag on a mesh (with a rigidbody).

 

I can write an expression for the forces for a single point, and I have been using that in a simplified model, where I just have modelled the effect on a single triangle by using the triangles center and multiplied by its area. I model the drag from a triangle like this: 

 

F_drag = -Dot(normal, point_velocity)*normal*some_constant

 

I have then applied the result on a rigidbody, by applying a position force onto my rigidbody. (I am using Unity3D by the way)

 

This works somewhat but I would like to do it a bit more detailed, so I have been attempting to integrate the expression over the surface of the individual triangles that make up the mesh. This presents me with two problems.

 

1) The first problem is that I can not just apply the result as a force on the rigidbody. Instead I think I need to write the expression as an effect on the velocity and angular velocity of the rigidbody directly. This has proven harder for me as it has forced me to look into how a force is transferred into these two values..I am currently working on this problem and I think I can make it work.

 

 

2) The second problem is that the expression I come up with turn very ugly when I integrate it. The way I integrate the expression is by expressing the force in the local space of the triangle and split the triangle in two triangles with a 90 degree angle. In this way I can write a double integral for each side of the triangle.

 

The problem this presents me with is that the expression contains a square root as the distance to the point has an effect on the resulting force. This makes the expression explode.

 

I am worried that I am approaching this in a wrong way and I am therefore on the lookoit for references for different approaches to solving the problem.

 

Currently im splitting the expression up solving it for the individual components. I wonder if there is a way to write in vector form and solve it in vector form, so it is not 6 isolated equations.

 

I assume this must have been done before by others more skilled than me, and I am therefore on the lookout for references to similar work.

 

Kind regards

 

Jesper Taxbøl

 

 

0

Share this post


Link to post
Share on other sites

F_drag = -Dot(normal, point_velocity)*normal*some_constant

That is the equation for pressure force, not viscous drag. That is, viscous drag is a tangential force, not a normal force as you have it. E.g., there is no viscous drag on an object perpendicular to the velocity, only pressure force.

 

Unless you want a highly complicated calculation, you're going to have to make some assumptions regarding the environment around the object. E.g., whether the velocity is in the turbulent region of flow for the fluid, whether the surface is close to another surface, etc.

 

Very generally speaking, for an object with a velocity in the turbulent region of flow for the fluid it's immersed in, the tangential force is proportional to the area, the tangential velocity of the fluid across that area, and the square of that velocity. I saw "very generally" because it depends on the shape of the object, not just a position on the object's surface. In most cases, there are areas of laminar flow (lower friction) and turbulent flow (higher friction).

 

For simulation purposes, you may want to start out with something like:

 

F = n * V2 * A

 

where:

 

F is the tangential force in the direction of V

n is a coefficient of viscous friction

V is the tangential velocity of the fluid across the surface

A is the area of the surface

 

I'm not familiar with Unity's physics engine but it sounds like it provides you the means to calculate the total force and torque on the body, through force-at-a-point.

 

For the above force, the result on the object's center-of-gravity is the force F and a torque proportional to F times the distance of the triangle from the CG. That is, it may provide you with the sum of the forces that will effect the object's velocity, and the sum of the torques that will effect the object's angular velocity. If not, you can sum the forces and torques yourself.

Edited by Buckeye
1

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