• 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

How would I retrieve the 'inner surface' of an arbitrary mesh?

2 posts in this topic

In my project I am working on a 'subset' of cloth simulation in which I attempt to fit one mesh over another. My solution involves deforming a 'physical mesh' based on depth fields and using it to control the deformation of the complex, detailed mesh.

I have seen impressive mesh optimization methods, but I don't want to optimize the mesh so much as extract part of it. What I want is a way to approximate the 'inside surface' of a mesh, since in the 'real world' this is what would interact physically with mesh being deformed with.

Take the images below; the second mesh contains no overlapping polygons - the lapels, shoulder straps and buttons are gone - it is a [i]single surface[/i] consisting of the points closest to the character.


(Checking for and removing overlapping polygons would be one way I suppose, but how to decide which are the 'outer' and which are the 'inner' bearing in mind the normals of the semantically inside polys won't necessarily emanate from the geometric centre of the mesh)

Does anyone know of an existing implementation that does something like this?

Share this post

Link to post
Share on other sites
I wonder if you could clarify your example? Is anything you've illustrated above the detailed mesh? This may not help find a solution, but it might.

Usually the meshes to be displayed are modeled optimally by an artist. The pieces to be removed as you described...there might be some automation but probably in practice it is done with the aid of a 3D modeling package, then compiled/preprocessed/exported from the modeling package into game- or simulation-ready media. So, therefore, one possibility is to have a human in the loop. I guess that's what you did above? I can imagine doing something where you do something like:

1) Draw all the meshes as shaded using additive blending...where there are overlapping meshes the image will appear brighter
2) 3D modeling human-in-the-loop user clicks one of the bright spots where it is clear there are overlapping meshes
3) Code ray traces through meshes until it hits the underlying character mesh. Sort the ray trace selection results and tag all meshes *except* the one closest to the character mesh as "delete me!". Perhaps color these differently and redraw just to visually indicate action by the user.
4) Repeat until all bright areas are handled.
5) Hit a button to delete all meshes tagged "delete me!"

So, human in the loop but reasonably straightforward to do. Full automation is going to be pretty challenging, but you might be able to imagine using the above process as a starting point. Next step could be to build some automation to tag the bright areas but keep a human-in-the-loop to validate or "undo" the automated tagging before deleting the meshes.


Share this post

Link to post
Share on other sites
[size=3]Hi Graham,[/size]

[size=3]First, sorry for the late reply, I am starting to wonder if I am completely misunderstanding the "Follow This Topic" button![/size]

[size=3]To clarify, the first image is the 'detailed mesh' the second is the 'physical mesh'. The 'physical mesh' is literally the detailed mesh with overlapping polygons removed (and in this example, it was manual). This may require some explanation:[/size]

[size=3]In my project, I am working on automatic mesh deformation whereby my algorithm fits one mesh over another. To do this, I reduce the target mesh to a simplified 'physical mesh' and check for collisions with a 'face cloud'. The 'face cloud' consists of the baked faces of every mesh making up the model(s) that the target mesh should deform to fit. (The target mesh when done will completely encompass the face cloud.)[/size]

[size=3]For each point in the 'physical mesh', I project a ray and test for intersections with the face cloud, find the furthest one away then transform that control point to this position.[/size]

[size=3]Before this is done, I 'skin' my detailed mesh to the 'physical mesh' - for each point in the detailed mesh (regardless of position/normal etc) I find the closest four points in the 'physical mesh', then weight the point to each of them (where the weight is the proportion of each points distance, to the sum of the distances); the result is, when the 'physical mesh' is deformed, each point in the 'detailed mesh' is deformed linearly with it.[/size]

[size=3]The purpose of this is to preserve features such as overlapping edges, buttons, etc because with these, the normals of each point cannot be relied upon to determine which side of the surface the point exists on, hence the need for a control mesh. [/size]
[size=3]What I am attempting to create in the 'physical mesh' is simply a single surface where all the points' normals accurately describe that surface.[/size]

[size=3]So far, I do this by using the skinning data to calculate a 'roaming' centre of mass for each point, which is the average position of the point + all others that share the same bones. Any point whose normal is contrary to (Point Position - Centre Of Mass for that Point), is culled. (But is still deformed correctly because it is skinned to the surrounding points which are not deformed)[/size]

[size=3]This whole setup is designed for user generated content, hence why I can't do what normal sensible people do and just have artists build a collision mesh in Max, it is also why I cannot make any assumptions about the target mesh*.[/size]

[size=3]*Well, I can make some assumptions, for 1. I can assume it is skinned, and that the mesh it is deforming to fit is also skinned. Since I started using the skinning data the peformance (quality of results) has increased dramatically.[/size]

[size=3]For more complex meshes though I still need a better solution, as it won't cull two points that sit very close, one outside the collision mesh, one inside (and hence when deformed the features are crushed as only one pulls its skinned verts out). [/size]

[size=3]Your idea for ray tracing to find overlapping polys sounds very promising, I will look into this, Thanks![/size]


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