Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Modding

Reply
 
Thread Tools
Old 22-11-24, 18:33   #581
Khali
Member
 
Joined: Jun 2003
Posts: 44
Default

I figured it out. I had goofed and accidentally regenerated the mipmaps when exporting the DDS. All is working now, thanks!
Khali is offline   Reply With Quote
Old 22-11-24, 19:54   #582
Khali
Member
 
Joined: Jun 2003
Posts: 44
Default

Okay, I've tried everything now. It works correctly, but I can not for the life of me figure out how to determine which parts of the mesh are effected. I did discover that as far as roughness is concerned with Gloss:
0 = Most gloss
1 = No gloss at all

I thought I understood this as, black = transparent and white = solid when creating the texture and exporting to DDS, but it appears modification of the texture doesn't seem to matter. That or I'm doing something wrong when exporting to TGA, but everything looks as it should in Nvidia Texture Tools.

In game, it does work on the mesh, but not where I expect it to be. It seems to have just randomly chose a specific set of faces for some reason.

[edit]
I think I got it backwards. I believe black is full transparency and white is solid colors.

I've determined that the transparency is a combonation of mesh and texture, but I can't figure out how to make the Blender mesh transparent. It doesn't look like an issue with weights...

[edit2]
I'm now seeing that the mesh in Blender actually isn't effected by lights either, but Blender is so unintuitive I can't figure out how to control this. lol

Last edited by Khali; 22-11-24 at 20:10.
Khali is offline   Reply With Quote
Old 22-11-24, 22:35   #583
Khali
Member
 
Joined: Jun 2003
Posts: 44
Default

It doesn't look like I can edit my post now for some reason. I did solve my problem, I just came to add:

Unknown14: I haven't found this on an object yet, but this one is affected by texture alpha. It will allow white alpha to pass, black alpha will be completely black totally uneffected by the lighting engine. I assume this would be for objects we want clearly lit and wanted static control over the lighting colors, but not have them effected by the engine. Adjusting parameters doesn't seem to produce any results.

Unknown18: I found this on the Iris inside Lara's home in the secret room. I tested this one out and it appears to ignore the alpha channel completely as far as I can tell, but lighting is always 100%. Or high gamma or something. In the Iris' case it makes the center piece always appear bright so it's glowing. Testing it on other meshes results in a bright object that isn't effected by level lighting. Adjusting parameters doesn't seem to produce any results.
This is also used for later transparent items in TR3. Same deal, just uses _B for transparency.

Now onto the important part. Somehow, during manipulating a bunch of settings I managed to get one load where I had the Midas touch chroming effect. I was super excited because I thought I had found a hidden parameter in the gloss effect, but now it's gone and I can't get it to come back. So annoying.

Last edited by Khali; 22-11-24 at 23:06.
Khali is offline   Reply With Quote
Old 23-11-24, 06:42   #584
MuruCoder
Member
 
MuruCoder's Avatar
 
Joined: Jan 2018
Posts: 1,419
Default

We have a HEAD_MIDAS.TRM file, did you try examining how its shaders are setup? It might give some clues.
MuruCoder is offline   Reply With Quote
Old 23-11-24, 08:25   #585
Khali
Member
 
Joined: Jun 2003
Posts: 44
Default

Yeah, I did have a look at this. I know for sure if the normals are broken in anyway it will cause that effect, but I can't see them triggering it this way.

The HEAD_MIDAS.trm doesn't have any shader attached to it, which is weird considering it has it's own head mesh for it. There's also a video on YouTube of someone using Midas' touch deaths to show what it looks like with every single costume. Interesting because it shows the catsuit has bleed because of the gloss opacity. Anyway, I believe there's some sort of sorcery going on within the actual engine of the game that's doing the texture change.

I've tried looking at other gold objects and such but I can't find that weird gold/chrome/mirror effect like the midas touch anywhere.

I also discovered Unknown12 in the Shiva mesh, another mystery because the texture it refers to is some weird smokey looking texture. I need to boot the game at some point and kill one because I believe that it's just for the death effect, but there's no selectable mesh as far as I can tell, so I'm like why even have this texture in here? Perhaps there's some effects mesh that gets spawned and this texture is just copied to it. Who knows?

Unknown12 didn't appear to do anything unique otherwise, as far as I can tell.
Khali is offline   Reply With Quote
Old 25-11-24, 23:53   #586
kabal
Member
 
kabal's Avatar
 
Joined: Aug 2016
Posts: 87
Default

Does anyone know what I'm doing wrong? I tried replacing Lara's TR1 home outfit with a custom model. I renamed the bones and attached the model to the armature but it looks like this.
Attached Thumbnails
Click image for larger version

Name:	Tomb Raider I-III Remastered 25_11_2024 05_47_32 p. m..png
Views:	25
Size:	627.1 KB
ID:	8891  

Last edited by kabal; 25-11-24 at 23:54.
kabal is offline   Reply With Quote
Old 26-11-24, 08:51   #587
ObiHan Skywobi
Member
 
Joined: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by kabal View Post
Does anyone know what I'm doing wrong? I tried replacing Lara's TR1 home outfit with a custom model. I renamed the bones and attached the model to the armature but it looks like this.
Hm, hard to say. Too little info. Your bone weights are obviously corrupted (and your textures don't seem under control, but that's another story), I'd check these 3 things first:
- Do you have the right number of vertex groups in the right order(!)?
- Did you flip any of the bones / vertex weight groups by accident?
- Do you have additional vertex groups on the model?

The remaster character model doesn't actually need any bones in the Blender mesh, the skeleton is hard-coded in the game. All your mesh needs are the vertex weights, they'll determine which vertices are animated by which bone. The vertex groups aren't identified by name, but by index. That means if your groups are in the wrong order, it'll mess up your rigging.

If you have additional vertex groups, the mesh will export successfully, however, it will scramble the bone animations ingame. Maybe that's what's happening here.

If you're still stuck after checking these points, I'd suggest you import one of the OG models into Blender and start there. Try attaching / replacing individual parts and stay true to the original structure (weight groups!) and check your progress by launching the game frequently.
ObiHan Skywobi is offline   Reply With Quote
Old 26-11-24, 09:09   #588
ObiHan Skywobi
Member
 
Joined: Mar 2024
Posts: 32
Default

Quote:
Originally Posted by Khali View Post
Hey Muru, I'm coming back after a long while and working on something but I'm trying to add gloss to an object and I'm not sure I understand how it works.

I know that the shaders are working because I tested alpha transparency with success. It completely made the parts I want glossy to appear and the rest of the model transparent! Which is awesome, because this opens up my next mod idea!

With the alpha working, I know the gloss shader is being applied, I just can't seem to get it to actually work. What I'm trying to do is get the texture to be reflective, the end goal would be the shader for when Lara touches Midas' hand but I don't even know if we've made it that far so I'll settle for any simple fake reflection.
I'm curious, could you describe a bit more what you're trying to do? (Or maybe you have a few pages back, in which case I'd appreciate a pointer to it, I haven't been active here for several months...) - I've done some digging into the shader models, too. Are you trying to control glossiness with an alpha mask?

I've had several ideas on messing with the standard materials, ranging from adding a subtle specular reflection to Lara's skin, to flat out painting her golden like in that old Bond movie. I was sad to learn that the "roughness" in the shader doesn't actually control surface roughness, but should be more appropriately named "intensity". It seems to be controlling the Fresnel falloff of a reflection, but the reflection itself will always be sharp (it's always the same environment texture). The most annoying thing about the fresnel falloff is: even when you set the "roughness" really, really low, you'll get the faintest reflection on Lara's skin, but she'll still get a halo of white pixels around her edges that'll cause really bad aliasing. Can be reduced with AA filters smashed on top via Reshade, but it's not a "mainstream" solution and I like to keep my mods in OG quality and compatibility.

I found out by accident that it's possible to get 2 kinds of reflections on objects: either a fixed texture as specified in the shader, or, by exploiting a glitch in the export which will leave the reflection target empty, you'll get a "dynamic" reflection per level, as in: depending on the level you load, your glossy objects will reflect a different environment map for each level. This doesn't seem to be very balanced, though. Some levels have quite bright env maps which results in very inconsistent reflections on your mesh. I haven't spotted the effect anywhere in the original game, maybe it's an idea they tried, but ditched later.

Last but not least: the only way I found to get a material to look like polished metal (like the Midas gold) is to actually use a custom, very bright and contrast-rich env map. Once you go down that rabbit hole, you can control the roughness of the reflection by blurring the env map. Problem with that is, of course: as with everything else, we'll inevitably run into glitches when we start to add new texture files. I've had some success though with using the guns' texture as a reflection map on itself. That way, I don't add a new texture, but I still get reflections on the guns which resemble their own colours. I've done the same to the metal buckles on Lara's backpack and her belt to add some subtle detail / variation.

Another thing to keep in mind is to not overdo the reflection intensity: the reflections will not dim down in dark areas of the level, they'll always appear with the same intensity. This may cause your model to really pop out unnaturally in dark areas of any map. Especially when you mix glossy and matte materials (e.g. backpack) this can break the visual integrity.

I'd really like to continue the exchange on that, I don't think we're getting the maximum out of the graphics just yet when it comes to materials. Let me know your thoughts and findings!

Cheers!

Last edited by ObiHan Skywobi; 26-11-24 at 09:17.
ObiHan Skywobi is offline   Reply With Quote
Old 26-11-24, 16:52   #589
kabal
Member
 
kabal's Avatar
 
Joined: Aug 2016
Posts: 87
Default

Quote:
Originally Posted by ObiHan Skywobi View Post
Hm, hard to say. Too little info. Your bone weights are obviously corrupted (and your textures don't seem under control, but that's another story), I'd check these 3 things first:
- Do you have the right number of vertex groups in the right order(!)?
- Did you flip any of the bones / vertex weight groups by accident?
- Do you have additional vertex groups on the model?

The remaster character model doesn't actually need any bones in the Blender mesh, the skeleton is hard-coded in the game. All your mesh needs are the vertex weights, they'll determine which vertices are animated by which bone. The vertex groups aren't identified by name, but by index. That means if your groups are in the wrong order, it'll mess up your rigging.

If you have additional vertex groups, the mesh will export successfully, however, it will scramble the bone animations ingame. Maybe that's what's happening here.

If you're still stuck after checking these points, I'd suggest you import one of the OG models into Blender and start there. Try attaching / replacing individual parts and stay true to the original structure (weight groups!) and check your progress by launching the game frequently.
Arranging the vertex groups in the original order worked. Thanks

Last edited by kabal; 26-11-24 at 16:53.
kabal is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.