Page MenuHomeFeedback Tracker

setObjectMaterial does not load material textures
New, NormalPublic

Description

We have a severe problem where normal maps defined in a material are not loaded and showing when using setObjectMaterial. Tested in the editor. There is no error in the RPT, no problem logged anywhere. It just does not use/show the normal map in the material.

We have tried re-naming the material files from "material01.rvmat", "material02.rvmat" and "material03.rvmat" to "a.rvmat", "b.rvmat" and "c.rvmat" - without success.

We have tried re-naming the normal files from "normal01_nohq.paa", "normal02_nohq.paa" and "normal03_nohq.paa" to "normalone_nohq.paa", "normaltwo_nohq.paa" and "normalthree_nohq.paa" - without success.

We have tried inverting the axis of the normal maps - without success.

We have tried re-doing the normal maps via "_no" instead of "_nohq" - without success.

We have tried pre-loading the normal maps in CfgCoreData - without success.

We have tried adding a time delay between assigning the materials via setObjectMaterial to exclude racing conditions - without success.

We have tried copying the material into the Arma root folder and use that via setObjectMaterial - that works sometimes.

Please excuse if I miss some information. I have been struggling with this for 14 hours today.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Engine
Steps To Reproduce

Create a box model with one component and one section
Define a hiddenSelectionMaterial in the CfgVehicle config
Create three "super" materials
Create three normal maps, use on in a separate material
Spawn the vehicle in the editor and apply each material via setObjectMaterial

With a bit of luck the normal map shows on some of the objects, but not all of them. After re-starting Arma, it might only show it on one object. After another restart, it shows the normal map on none of them.

Additional Information

Event Timeline

ExileMod created this task.Jun 17 2016, 1:04 AM
Grim added a subscriber: Grim.Jun 17 2016, 1:10 AM

I have now created a new .p3d that has three boxes inside. Each box has one of these materials applied to it. When the game starts, I call this:

  • spawn

{
waitUntil {10 preloadObject "Exile_Preloader"};
systemChat "loaded";
};

If I create the three models after that, the normal textures are loaded. This proves that the materials, models or textures are not dysfunctional, but setObjectMaterial is.

I consider this a hack that can be used until the core issue is solved.