Page 1 of 1

Decal on vehicle

Posted: Tue Jan 01, 2019 5:14 pm
by Hodo33
Is the engine capable of rendering a decal on a vehicle? If so how can I do that. Have tried but they don't seem to want to render on a dynamic object

Re: Decal on vehicle

Posted: Tue Jan 01, 2019 6:46 pm
by marauder2k9
for the time being i don't think so, the decal wouldn't stay on an object that moves anyway but there was a few forums floating around that specified and talked about ways of adding decals that stay on objects that move though im not sure where it is if i find it ill link it to you.

There are a number of different methods for adding decals to objects that could be implemented into torque though, one that i thought would be best would be decals that actually modify and apply to the texture of the object this way u don't have to actually worry about the engine having to keep track of the position of the decal in real time

Re: Decal on vehicle

Posted: Wed Jan 02, 2019 3:45 pm
by Hodo33
Thanks for the reply. I was thinking of adding a transparent layer to the material if I could see the U,V layout. Just wanted a sign on the side of my helicopters...

Re: Decal on vehicle

Posted: Wed Jan 02, 2019 6:24 pm
by Duion
If you just want to add something to the texture, just paint it on the texture, it does not have to be a dynamic decal then.

Re: Decal on vehicle

Posted: Wed Jan 02, 2019 11:52 pm
by Happenstance
Easiest route is just painting the sign into the helicopter's texture, as Duion said. You could even have multiple versions of the helicopter texture (maybe one with the decal, one without) and switch between them using setSkinName().

Depending on the effect you're after, you might also look into using a light with a 'cookie' texture to project the decal.

Re: Decal on vehicle

Posted: Wed Jan 09, 2019 12:37 am
by Bloodknight
just to extend that idea, I believe there is support for multiple UVs, so you could have a generic texture and a different UV for logos etc.

Re: Decal on vehicle

Posted: Wed Jan 09, 2019 10:42 am
by Duion
You can also add the logo as a model onto the other model, that way it is even physically separated. Multiple UV maps work as well of course, there are 4 slots in Torque by default.