Persisting materials and AR issues with layering materials

Background: I’m using opacity maps and multiple material displays, onto the same geometry, to allow users to apply colours to the pattern of a fabric material. I’ve attached a basic definition for reference. (478.7 KB)

This mostly works as expected but I’m encountering some issues:

  1. I encounter ghosts of materials past. When I initiate subsequent sessions, the prior material is displayed alongside the new one. I’ve come across this issue on both ShapeDiver (prior material clears if I edit in v2) and my viewer.
  2. My AR functionality has some bugs. The AR model lacks the custom colouring, as it appears to only display a single map for each geometry. Furthermore, the model is positioned on the user’s head.

If you visit you can see the AR issues and if you then click on the shop link and open the other chair, you’ll see the old material showing with the new one.

Thanks in advance for your help.


Following up on this.

For the moment, I’ve resolved the “ghost materials” issue by only having a single session and viewport at a time, then closing both between instances.

The AR issue is ongoing and I’d appreciate some feedback. I thought this could be related to my script updating geometry right before viewInAR() executes but removing this hasn’t changed the behaviour.

Please excuse the delay in getting back to you, holiday season. We will reply asap.

No problem.

I forgot that it’s August and I live in the wrong country.

Hello @winston,

Is this an issue that you can reproduce on our platform? If so, please provide detailed instructions to reproduce the issue. If this is an issue that only happens in your code, please provide a code example (as a CodeSandBox) that highlights the problem, so that we can debug it.

Furthermore, the link to test the AR issue doesn’t work for me.

Thank you.

Cheers, Michael

I’m currently quite busy, but once I have some free time, I’ll set up a sandbox.

I’ve noticed issues with “ghosts” on the ShapeDiver platform, when I’m uploading a definition and continuously adjusting and reuploading it. I do this to organize the input parameters (for my implementation) so a reuploaded definition is likely to have very similar inputs (direct text input, import bitmap) and displays (SD display) but with minor differences (name, stream filter added…). One file can be uploaded and reuploaded many times over several hours. Sometimes a texture or even some geometry can linger. This happens in v3 and if I edit the file in v2 the issue is resolved. Again, this pertains to file setups similar to the referenced definition, involving one or two sets of geometry with multiple displays to layer materials via opacity maps.

Sorry, I’ve been doing some updates and the earlier link is dead. You can see the AR issue here.

Thanks @MajorMeerkatThe3rd

Hello @winston

no worries, whenever you have the sandbox ready just let us know.

We will of course still investigate the issue you are describing and will let you know if we find something out about it.

Regarding your issue with AR, it seems like the scale of the model in AR seems to incorrect. The model seems to be quite large in AR and not in a realistic size. You can change the units that the model should have in AR via the AR setting.

Cheers, Michael

Thanks @MajorMeerkatThe3rd

True, I completely neglected to check the AR size setting. The geometry now loads correctly.

This still doesn’t address the issue of the material effect not rendering properly? I have several material displays layered on top of each other that use alphaMaps to create a colourable pattern. It looks like the alphaMap properties aren’t carried over in AR?

Hello @winston

great that this first issue is resolved already.

Can you send me a link to the model on the platform for me to reproduce this issue in AR? Or are you doing custom API changes to the model that cause these issues?

You can send that link to me privately if you don’t want to share it here in the forum.

Cheers, Michael

The issue exists on the ShapeDiver platform: link

Thank you for sending the link @winston.

We’ll get back to you!

Hello @winston!

I debugged your issue and the solution is to use the gltf 2.0 Display component and the gltf 2.0 Material component. In this case, the textures that are used have to be white with the pattern being in the alpha channel.

Here is the adjusted GH file where I show how this works for two maps: (37.1 KB)

And here are two of the maps that I adjusted for this work Flow (removed by user request)

With this workflow, everything is displayed as expected in AR. Let me know if you have any further questions.

Cheers, Michael

1 Like

Well done @MajorMeerkatThe3rd! This works and I prefer the workflow.

I’m seeing an odd shimmer effect on the AR object but I’m testing with older (5+ years) devices and suspect they might be the problem.

Also, could you please remove the image of my repeat from this thread?

Thanks again!

1 Like