tags:

views:

150

answers:

4

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.

+1  A: 

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.

Reed Copsey
A: 

I need at least 15 characters and Ptex is only 4. But it is all you need to know.

fuzzy lollipop
A: 

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

Michael Daum
+3  A: 

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.

Goz
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 seperatelyThe 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.
Timothy Baldridge