Hey again,
I have a scene where the geometry uses vertex colour. I have attached the material for reference along with a screenshot of what the result looks like in AR. There are no issues when running in the browser if not using AR but when running in AR mode, the colour is lost from all objects using materials that use vertex colour data.
Any help is appreciated as always.
In the AR image, you can see that only the small parts of my scene that dont use vertex lighting (done for testing purposes) have the correct visual result, whilst the larger areas that use vertex lighting are just grey.
Version : 3.47.2-pre
iOS
Hello nostalgicbear,
The issue you’re facing with vertex colors appearing grey in AR mode could stem from several factors related to how the shaders and materials are processed in AR compared to the browser.
-
Shader Compatibility: Ensure that the shaders being used support vertex color properly in the AR context. Some shaders may need modifications to work correctly in WebXR.
-
Check Shader Attributes: Make sure that your vertex color attribute is properly defined and passed to the fragment shader. The vertex attributes must be set up correctly to utilize vertex colors.
-
Update to Latest Version: Since you’re using version 3.47.2-pre, consider updating to the latest version of Needle Engine. Version 3.48.3 has several bug fixes, including improvements for AR sessions that could resolve your issues (see the documentation).
-
Examine Material Export: Check how the materials are exported for use in AR. There may be a need to create custom export logic to support vertex color attributes.
-
Use of Extensions: Utilize the CustomMaterialExtension
to ensure your materials are correctly referencing their vertex color attributes when exported (see the documentation) (see the documentation).
If you provide your material shader code or details on how you’ve set up the materials, I can give more specific advice. Additionally, consider testing in a minimal project to isolate the issue further.
Feel free to ask if you need more guidance!
1 replies left - Get a PRO license for more AI replies.
thread_F6MF07bMmQHg3v3xvdCgx8rO
Reply to this message to continue the conversation
Which iOS version are you on?
We have some support for USDZ vertex colors on iOS 18+ and Needle Engine 3.50.0-beta. Objects that use vertex colors and ONLY use vertex colors (no maps, color etc.) will export as USD’s displayColor
there.
Note that on iOS < 18, Apple does not support vertex colors at all.
Ah thank you @hybridherbst I didnt realize that. Im on 17.5.1. Ill update to iOS 18 now.
@hybridherbst I’ve upgraded to iOS 18 and now Im getting very strange behaviour.
I am on iOS 18.2, and Needle 3.47.2-pre. Disgregarding the colour issue, should AR mode work with this combination of settings? Right now, when I enter AR mode, its as if my scene is stuck to my camera, so I cant actually move around, or do anything I was able to do before upgrading iOS version.
The colour still doesnt appear to be correct, though that is based off of the small part of the scene I can see at the moment.
Here is the result now Imgur: The magic of the Internet
This is a known regression in iOS 18.0 that Apple has unfortunately still not fixed (we’re in contact with Apple about it). It should not happen on iOS 18.2 as far as I’m aware. Which version are you on now?
Neede Engine 3.49.0+ contains a workaround for Apple’s bug so that this doesn’t happen anymore.
Ah okay thank you for that update. I am actually on iOS 18.2 and can confirm it is is happening. I’ll upgrade to the latest version of Needle and see if there are any issues then.
1 Like