Rigs-of-rods: T813 Material/texture issues

Created on 18 Feb 2019  路  6Comments  路  Source: RigsOfRods/rigs-of-rods

bug graphics

Most helpful comment

I found the issue: we're not using STRICT resource management. Specifically, we do Ogre::ResourceGroupManager::createResourceGroup(inGlobalPool=true). As a result, resource groups won't protect us against mesh/material name collisions between mods.

In this case, Dakar generates the managedmaterial placeholders (in RG1) and the Koloss picks them up, even if created in RG2. Upstream doesn't handle this, so I added it: https://github.com/only-a-ptr/rigs-of-rods/commit/1ad65317df4fefdcded523c1e2d43f2633fcfade - but without STRICT mode, it won't have any effect. In fact, right now OGRE doesn't even load Koloss's meshes in this case, it will pick up those from Dakar (same names).

All 6 comments

This started to happen when you modified the T813 Dakar. Could you paste your changes?

I converted most of the materials from t813.material to managedmaterials:

;new_material   effect   base_texture   damage_texture   specular_texture
t-813-mirror flexmesh_standard t813-black.dds t813-black.dds t813-white.dds
;MainColor/SOLID/TEX/t813wheel.tga mesh_standard t813wheel.dds t813-black2.dds
MainColor/SOLID/TEX/t813wheel.tga mesh_standard t813wheel.dds -
Crome/SOLID/TEX/t813.tga mesh_standard t813.dds t813-crome-spec.dds
Crome/SOLID/TEX/t813body-race.tga mesh_standard t813body-race.dds t813-crome-spec.dds
MainColor2/SOLID/TEX/t813body-race.tga flexmesh_standard t813body-race.dds t813body-race-dmg.dds t813body-race-spec.dds
MainColor/SOLID/TEX/t813body-race.tga flexmesh_standard t813body-race.dds t813body-race-dmg.dds t813-black2.dds
window/SOLID/TEX/t813window.tga flexmesh_transparent t813window.dds t813window-dmg.dds t813window-spec.dds
MainColor/SOLID/TEX/t813doors.tga flexmesh_standard t813doors.dds t813doors-dmg.dds t813-black.dds
Crome/SOLID/TEX/t813bumper.tga mesh_standard t813bumper.dds t813-crome-spec.dds
MainColor/SOLID/TEX/t813light_material_0.tga mesh_standard t813light_material_0.dds t813-black2.dds
MainColor/SOLID/TEX/t813.tga flexmesh_standard t813.dds t813-dmg.dds t813-black.dds
Black/SOLID/TEX/t813bumper.tga flexmesh_standard t813bumper.dds t813bumper-dmg.dds t813-black.dds
Crome/SOLID/TEX/t813light_material_0.tga mesh_standard t813light_material_0.dds t813-crome-spec.dds
set_managedmaterials_options 1
MainColor2/SOLID/TEX/t813seats-race.tga/TWOSIDE mesh_standard t813seats-race.dds t813body-race-spec.dds
set_managedmaterials_options 0
Crome/SOLID/TEX/t813doors.tga mesh_standard t813doors.dds t813-crome-spec.dds
MainColor/SOLID/TEX/t813bumper.tga flexmesh_standard t813bumper.dds t813bumper-dmg.dds t813-black.dds

The bright pink is a managedmaterial-placeholder. It means the managedmaterial was defined, but for some reason it could not be set up on the target mesh. Look for anything unusual in RoR.log

It doesn't happen with the stock mods linked above. I'll try to re-apply @CuriousMike56 's changes
UPDATE: Uhh!
image
RoR.log doesn't help. I'll add some diagnostic output.

I found the issue: we're not using STRICT resource management. Specifically, we do Ogre::ResourceGroupManager::createResourceGroup(inGlobalPool=true). As a result, resource groups won't protect us against mesh/material name collisions between mods.

In this case, Dakar generates the managedmaterial placeholders (in RG1) and the Koloss picks them up, even if created in RG2. Upstream doesn't handle this, so I added it: https://github.com/only-a-ptr/rigs-of-rods/commit/1ad65317df4fefdcded523c1e2d43f2633fcfade - but without STRICT mode, it won't have any effect. In fact, right now OGRE doesn't even load Koloss's meshes in this case, it will pick up those from Dakar (same names).

Was this page helpful?
0 / 5 - 0 ratings