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

Archived

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

no way

Tetrahedralization and a major bummer

5 posts in this topic

I just had a major disappointment. Heres what i had in mind : Mesh consisting of triangles can be verified to form a "solid" polyhedra ( concave, no gaps no holes ) if -every edge is shared by exactly two triangles -none of triangles are intersecting Now for physics calculations ( mass , centre of mass ) i thought that im going to decompose such meshes into tetrahedrae, and calculate each one of them separately, then just take a sum of them. After couple of hours searching for algorithms on tetrahedralization ( basically triangularization in 3d ) i ran across this page http://www.cs.mcgill.ca/~kitching/cs507/intro.html I''ll need to find some other method of finding mass of arbitrary polyhedrae. Its basically integrating over a volume, the math involved gives me creeps already. Any pointers ?
0

Share this post


Link to post
Share on other sites
If your polyhedron is convex, you can choose a point in the middle. Then the polyhedron is made up of several pyramids - one for each face. If you first break the faces into triangles to start with, you have (irregular) tetrahedra.
Then volume = Area * height / 6 (measure height perpendicular to plane of face)
CoM is on the line between the middle of the triangle, a quarter of the way from the base to the point. That''s unless you''re playing with variation in density.
I guess these were the things you had worked out already.
This won''t always work if it''s concave, however. They may need to be specified as a number of polyhedra joined together.

0

Share this post


Link to post
Share on other sites
Minor terminology correction: the singular of polyhedra is polyhedron not polyhedrae (according to my dictionary, which I checked!)

Your approach to sum the properties of individual tetrahedrons isn''t quite correct. For mass it will work, but for center-of-mass and inertias you''d have to then treat each individual polyhedron as a new point object, located at its local center of mass and carrying inertia properties. Then integrate over the point objects to calculate the global center of mass and inertias using the parallel axis theorem. This is not difficult, just more work than a simple summation.

Try this paper:

Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties," journal of graphics tools, volume 1, number 2, 1996,

available in postscript form here:

http://www.cs.berkeley.edu/~mirtich/publications.html

And the accompanying (public domain!) source code:

http://www.acm.org/jgt/papers/Mirtich96/source.tar

That may do the trick! This code should give you the mass *and* inertias of arbitrary polyhedra, and I don''t believe you''ll even need to split it into individual polyhedrons!

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
0

Share this post


Link to post
Share on other sites
great thanks guys.
[If your polyhedron is convex, you can ]
yeah thats the problem, they arent convex, but your idea with choosing the point in the middle is quite good. It wont work in this case though. Basically what i have is bunch of construction parts ( like lego or something ) that can be fitted together for modeling more complex machinery ( submarine fighter ships, primarily )

[For mass it will work, but for center-of-mass and inertias ]
For center of mass, its weighted average , is it not ? eg. cm_x = sum( cm_1_x * mass_1 , cm_2_x * mass_2 etc ) where cm_n and mass_n are center of mass and mass of each separate tetrahedron ?
For inertia i was simply planning to use inertia tensor calculated on bounding box of the whole model. Might not be accurate but works , at least for starters

[Brian Mirtich, "Fast and Accurate Computation of Polyhedral Mass Properties,"]
yeah i found this one too and tested the code, it works quite well. But im unable to read the paper itself, PStill wont convert it to PDF properly, and i have no other means of reading postsript files under Win98 Id like to understand the concept they are using, instead of just taking the code.

Edited by - no way on September 28, 2001 2:35:22 PM

Edited by - no way on September 28, 2001 2:36:20 PM
0

Share this post


Link to post
Share on other sites
For center of mass, take your sum and divide by total mass and your golden:

  
cm_x = sum( cm_1_x * mass_1 , cm_2_x * mass_2 etc )/sum(mass_1, mass_2, etc)


Yes, just that one extra step. Inertias are a bit different, since the shift to global center of mass depends on the square of distance from the object center of mass.

Of course your approach to compute inertias from the bounding box will work. I would recommend that you use an oriented bounding box if you can, one that best fits the *shape* of the object(s). Since your objects are lego-like, you shouldn''t have any problem!

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
0

Share this post


Link to post
Share on other sites
http://amp.ece.cmu.edu/Publication/Cha/icip01_Cha.pdf

Thats really what i was looking for. Good and easy-to-understand explanations inside.
0

Share this post


Link to post
Share on other sites