Skip to content

Conflict when two objects share the same .obj with two different .mtl files #644

@tnguyenh

Description

@tnguyenh

Describe the bug
This is more or less the opposit of issue #547 .

Declare two objects, with a different .mtl each:

obj_file carOtherParts <- obj_file("../includes/obj/vehicles/CarOtherParts.obj","../includes/obj/vehicles/CarOtherParts.mtl");
obj_file carOtherPartsBraking <- obj_file("../includes/obj/vehicles/CarOtherParts.obj","../includes/obj/vehicles/CarOtherPartsBraking.mtl");

The two objects have the same shape, but different colors and textures depending on the context. However, both appear the same, using the first .mtl.

To reproduce

Use the following .obj and .mtl with the code above. The rear lights should appear in very dark red for the first one, and green for the second one.
obj.zip

Expected behavior
This is what we should get: (braking/not braking)

Image

With the previous code you only get the first type of colors.

  • GAMA version: [2025.05.]

Metadata

Metadata

Labels

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions