Author Topic: Decal uv channel  (Read 607 times)

lauris47
  • Newbie
  • *
  • Posts: 47
  • Karma: 2
  • laurynaslubys.com
    • View Profile
Decal uv channel
« on: May 05, 2021, 07:07:32 am »
Hi, I am learning about decals and how they work in Source.
Is it correct that via Wall Worm decals are extracted to meshes and then this decal is applied to it? While in Source, decal is embeded on the model, using the second UV channel?

When importing the map of CSGO, I can see that some models have this second UV channel, but all UVs are squeezed to the bottom left corner. Was this intended, under-implementation or something else that I do not understand?

What about round objects, like Silo's in De_Nuke, they have decals on top. When decal is converted from UV space to mesh, there is no way to wrap around that decal around the silo.

I might got some info wrong, but I guess it is clear what I want to do - use second uv channel for decals.

Any input appreciated.
Thanks.

Joris Ceoen

  • Global Moderator
  • Full Member
  • *****
  • Posts: 233
  • Karma: 27
  • WallWorm Ambassador
    • View Profile
Re: Decal uv channel
« Reply #1 on: May 07, 2021, 04:39:25 pm »
Hey!

I'm not sure what your specific issue is, but CS:GO itself has a material parameter that allows any kind of texture (known as $decaltexture) to be displayed on top of the $basetexture through, as you mentioned, a second UV-channel. This will really only be displayed correctly in-game (and not even in hammer in some cases, making models look black in the editor but correct when you're in the map). As far as I can tell, in 3DS Max when you import the model from either an .smd or .mdl the information for that second UV-channel is lost. Currently there exists no fix for that and I believe it is Valve only who can add support for this. I even think it was already requested several times, but I don't know if they are willing to provide this support  :-\

If you need to recompile an existing Valve model (from any game, really, since the second UV-channel info gets lost regardless upon import), you will be required to reconstruct a second UV-channel and see for yourself how it displays in the viewport inside 3DS Max. What you see is then what you'll get if you export your materials correctly. To do this, however, you will need to tag the 'Export FBX' flag in the WWMT settings for your object, else the second UV-channel will simply not export.

More detailed answer to your question can be given by Shawn, but hopefully this somewhat answered a few of your concerns! 

lauris47
  • Newbie
  • *
  • Posts: 47
  • Karma: 2
  • laurynaslubys.com
    • View Profile
Re: Decal uv channel
« Reply #2 on: May 10, 2021, 08:07:12 am »
Thanks. That actually answers the part that I wanted to hear - currently not possible, dependent on Valve.


wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3678
  • Karma: 101
  • Behind me?
    • View Profile
Re: Decal uv channel
« Reply #3 on: September 20, 2021, 10:36:52 pm »
Sorry it took so long for me to actually reply. Lauris, it is possible to export the decals. You must use UV channel 2 the decals, and you must export the model using the FBX option in the WWMT floater UI.