Physically realistic decals
Asked Answered
K

4

5

I'm in the process of developing a visualization engine for the company I work for. We create decals for the outside of aircraft. As such we would like to be able to visualize the our decals on the aircraft that we support.

So here's the problem: in real life, if I were applying the decals to the outside of an aircraft, I pay pick a anchor position (let's say in the center of the left side of the fuselage) and then work out from there, allowing the decal to wrap around the body of the aircraft as it sees fit. Now, of course, we are mapping a 2d decal "image" to a 3d surface so there will be some distortion as it wraps around the skin of the aircraft, but this is expected, and accounted for in the original design.

I'm stuck trying to reproduce this in 3d, however. I've tried the following methods:

UV Mapping - Unwrapping a model as complex as what we have is going to be extremely difficult and seems a bit overkill. The side of the aircraft is close to flat, so it seems that a simpler "decal projection" method would work better

Cube Mapping - This gets close, really really close, however, as the decal is wapping onto the faces on the side of the aircraft, at some point the faces on the top of the model will start mapping to the top of the cube map...and then we get shearing.....

Any ideas? What's the best way to go about this, I'm not set on OpenGL vs DirectX at this point so a answer from either would work fine.

Karlsbad answered 2/3, 2010 at 20:25 Comment(1)
Here is an excellent blog article about the concepts behind this: blog.wolfire.com/2009/06/how-to-project-decalsAlgernon
P
5

Maybe I'm missing something obvious .. but can't you just use projective texture mapping?.

Of course the drawback is the, potentially excessive, warping as the angle between your project and the surface normal approaches 90 degrees.

Beyond that why is UV unwrapping such a bad plan? Provided the texturing of the model is un warped it would be a pretty easy solution. Microsoft provides a very helpful tool for doing unwrapping here.

Ppm answered 2/3, 2010 at 23:2 Comment(1)
Actually that's pretty much what I ended up going with. In Blender I was able to prototype this and it works great. True there's some warping at the top of the model, but I'm going to texture each side of the model seperately The problem with UV unwrapping is that it's very hard to get it to accurately match the "real world" decals. When you place a decal on a model you don't take a knife and cut it up to match the seams of the UV unwrap...or at least you shouldn't. Anyway, it looks like the example above will work great.Karlsbad
W
1

I would recommend using a cylindrical texture map. Provided you're not trying to map across an edge (ie: onto the wing, etc), this should work very well. For a decal on the fuselage, this should work perfectly, and be very simple to implement.

Woodcraft answered 2/3, 2010 at 20:40 Comment(0)
H
1

What you want is a UV coordinates that match geodesic distances. A geodesic distance is basically the distance on the surface as opposed to euclidean distance which is the shortest distance between two points(going through the model if it needs to). A global solution to make a geodesic map is pretty complex. However, locally it may be easier...

Since you are applying a decal to a surface that is more or less flat or at least a bit curved without really cranes and notches, you could apply a simple solution. I am not sure if it will work properly, but you already thought of the solution yourself.

You could simply take a vertex in your mesh, and A* or march from that vertex to all the nearby vertex while counting the geodesic distance and calculating the UVs this way. It won't be completely accurate but it might be good enough in your case.

There are also more robust ways of doing this like a Flattening using Multi Dimensional Scaling. And if your surface's topology is more or less similar to a plane it will work very well.

http://en.wikipedia.org/wiki/Multidimensional_scaling

Herve answered 2/12, 2014 at 6:56 Comment(0)
G
0

I believe that the state of the art on this type of decal placement are Ryan Schmidt's ExpMap coordinates. A bit of mesh operations are involved, but they are by no means difficult to implement. Here's a link to the SIGGRAPH paper: http://www.unknownroad.com/publications/ExpMapSIGGRAPH06.pdf

Galenical answered 2/3, 2010 at 20:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.