Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Physically realistic decals

Tags:

opengl

directx

3d

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.

like image 946
Timothy Baldridge Avatar asked Mar 02 '10 20:03

Timothy Baldridge


1 Answers

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.

like image 106
Goz Avatar answered Nov 30 '22 16:11

Goz