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

Need some suggestions about transforming a projected image

7 posts in this topic

Hello every body,
I have an image outline of lips (please find attached picture) that shows the projection on xy plane when aligned. Now from that projected image is it possible to get the straight look as shown in the bottom of figure? What information do I need to get the straight image at bottom from the aligned image at top.

Please provide me some suggestions.

Thanks in advance.
0

Share this post


Link to post
Share on other sites

You can represent 2D rotations as scaling, shearing and rotation.

 

But that would be a real problem to get right.

 

What are you trying to do? There are a lot of techniques that could be applied.

1

Share this post


Link to post
Share on other sites

Do you have the model itself, of just a flat two dimensional projected version of that mouth?

 

I will assume that you don't have the model here...

 

As Stainless is saying, it would be a problem to get right.  My initial intuition tells me to make some sort of software that traces the edge of the drawing plus adding a imaginary z coordinate to each "corner" of the mouth.  If you get this right, you would theoretically be able to rotate the object afterwards to get the representation you want.  Of course, things that are out of sight/obscured won't work, and it may distort the result a bit, but I can picture ways to do what you want, if I am guessing right in what you are asking.

 

What I am saying is to try to estimate somehow the coordinates in the projected state and reverse that somehow.  Basically what is missing is the Z coordinate and distortion due to perspective that you have to reverse.  I doubt the perspective has that much impact on such a small scale, however, but I have never experimented with these kinds of things before, just had a lot of thought experiments in my head.

 

I don't think you can do this 100% without any distortion, but I have a feeling you can still get good results.

1

Share this post


Link to post
Share on other sites
Hello,
Thank you both for the reply. I am trying to make the model look straight as the bottom of the figure. I have the coordinates in 2D. Is it possible to somehow compare the straight and aligned images to find the solution?

Thanks.
0

Share this post


Link to post
Share on other sites

If you only have the model for the projected version, and the model is a big complicated one, I don't think this will be an easy task.  Some part of the model that you will need for the straight facing one, will always be obscured or out of the view somehow.  That information does simply not exists, thus you have to recreate it somehow.  Algorithms for doing so is way more advanced than I can do, but I know there does exist algorithms that fill in the missing parts in a believable way.  I think Adobe showcased something a few years back, for instance.  Unless you are math savvy, I think this is a tough job, if your model is complicated.  It may be feasible if your model is simple, though.

 

If only you had some 3D representation...   But then you would probably not have asked the question here...

Edited by aregee
0

Share this post


Link to post
Share on other sites

At first i need to let you know that i am totally new to game developement and that English is not my first language, so it might be that 1. i misunderstood your question or 2. you do not understand my point because i am not able to express it properly in english.

 

As i have understood it, your problem has a mathematical nature: How can i determine the coordinates of original image with the information given by its projection.

 

My suggestion is based on two assumptions: 1. The projection results from a rotation around the y-axis and 2. you can to a certain extent estimate the original length of the mouth (the x-coordinate of the right "corner")

 

The projection of an object can often be described via affine transformations. These affine transformation can be compared to function, you enter a vector and this vector will, according to a specific law, be transformed into another one. Keep in mind that this is only an approximationthat depends on how wellthe original length can be guessed.

 

 

We consider the left corner of the mouth as fix in B(0/0/0), while the right corner is moved from A(x1/0/0) to A'(x2/0/z). Now we change our perspective and consider the scene from above, looking at the x/z-plane. The mouths appear as straight lines. Imagine a line that goes through the projected right corner  (A') and perpendicularly intersects the line of the original mouth. Then the angle of rotation is  cos-1 (x2/x1),the inverted cos of the length of the projection (which is given) divided by the original lenght (which you have to estimate). If this approximation delivers you a plausible angle of rotation, which, in combination with some further algebra (there is a general formula for rotations in affine transormations) will help you determine the exact coordinates.

 

Please excuse my sometimes confusing English and eventual mathematical inaccuracies. It is after midnight and i am extremely tired but this problem caught me and i hope that i could help you.

 

1

Share this post


Link to post
Share on other sites

BMU: I think you are spot on.  That is what I tried to communicate too in my previous post, and while this method will probably work on small scale objects, I don't think you can ever do this in reverse without any distortions (no matter the scale).

 

The reason I say it may work on small scale, is that the distortion you get, probably won't be that big, and you may be able to do some manual tweaking to get a good result, but on a more complex model, it may be a massive job to reconstruct a 3D model from a 2D one.  Remember that when you rotate an object (and apply perspective), you lose some information that is rotated outside of what you can see and even perhaps behind parts of the object too.  Take a nose as an example.  The nose sticks out.  When you rotate, the nose will cover part of the image.  Although not exactly the same, you lose information in kind of the same way you do with lossy compression.  You can't reverse the operation to get a perfect version of the original alignment, but you may be able to manually tweak the result afterwards somehow, but this will probably be a massive job on a large scale model.

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