Decal uv channel

Started by lauris47, May 05, 2021, 07:07:32 AM

Previous topic - Next topic

lauris47

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

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

Thanks. That actually answers the part that I wanted to hear - currently not possible, dependent on Valve.


wallworm

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.

lauris47

Hi, some maps rely a lot on details, hence I tried to do this again. I couldn't

When I import whole map, secondary channel UVs are squeezed into one corner,
and when I import separately via Model Importer Wall Worm "Import MDL", it only has one channel.

In either case second channel is destroyed.

Any update on this?

wallworm

You can export that channel, but it's not currently imported.

lauris47

Is it possible for you to do the update on WallWorm plugin?
I know you are probably busy with Autodesk and stuff.

There are probably other ways I can try to get this channel out, but it would be most comfortable via WallWorm.
I tried MilkShape, MESA for Maya, also Valve's Model Viewer . No luck. I will try HammUEr for Unreal now. There is also some Blender method, that I am not familiar with yet.

wallworm

It's on my list. I'll try to find time to do this.

lauris47

That would be great, thank you!

Joris Ceoen

Quote from: lauris47 on May 30, 2022, 03:26:15 AM
Is it possible for you to do the update on WallWorm plugin?
I know you are probably busy with Autodesk and stuff.

There are probably other ways I can try to get this channel out, but it would be most comfortable via WallWorm.
I tried MilkShape, MESA for Maya, also Valve's Model Viewer . No luck. I will try HammUEr for Unreal now. There is also some Blender method, that I am not familiar with yet.
I know it's been a while since you replied, but do I understand it correctly that you are still trying to get the original second UV-channel from official Valve models? I'm really not sure if it's possible. You could actually do an update that allows this, Shawn?

wallworm

Yes, it's something I can add. It's just time. I am one of world's top MAXScript people, but not the best C++ people. The WW plugin for MDL Loading is all C++. It's now been a few years since I did any serious looking into that code. So it would take some time. I very much intend to add Morph, Animation and 2nd UV support ... but whether I will actually get to find the time for that is another issue. I've toyed with hiring someone to help update some of the C++ plugins, but finding someone knowledgeable about Source engine coding and also Max SDK is hard--and those I know are too busy right now to take up any side gigs.

lauris47

I just started doing c++, it is so complex and broad in comparison to c# (which I was doing work with, the last 7 years).

lauris47

#12
Hey, did you have time looking into this?
I saw Wall Worm 5.1.41 was released, the update log is not yet updated.

Edit: Just found out you have Discord channel, the update log is there.


SMF spam blocked by CleanTalk