Hello,
The experience I’m trying to do is an Xray vision of an object which is physically present in the room.
When I launch the AR experience with a iOS device that has LiDAR sensors (iPhone Pro and iPad Pro), the physical object is detected and the 3D objects are occluded by it, and the “Xray vision” is not available.
Do you know how to Disable the occlusion in Quicklook ?
I found this topic on stack overflow but I don’t know if it’s compatible with the Needle Engine
Cheers
Hi Corentin,
To disable AR object occlusion in QuickLook using Needle Engine, the key element lies in how the USDZ files are exported. Specifically, you need to configure the USDZExporter
settings to ensure that physics are not applied to the objects you want to render without occlusion.
From the documentation, you will want to ensure that the physics components are not included or export properties indicating that objects should behave as occluders. You can leverage the following components and strategies:
- Disable physics on objects you wish to appear without occlusion.
- Export to USDZ without attaching colliders that cause physical interactions.
- Utilize specific shaders or materials for objects you want to appear as transparent (like the occlusion materials).
For instance, you could modify the USDZExporter
code as follows to prevent occlusion:
const usdzExporter = new USDZExporter();
usdzExporter.objectToExport = myObject; // Assign your 3D object
usdzExporter.physics = false; // Disable physics export
// Optionally: set object materials to non-occluding materials if applicable
await usdzExporter.exportAndOpen(); // Launch the QuickLook experience
Check if your 3D objects have any physics components that could trigger occlusion, and ensure they’re disabled during export.
For your specific case (X-ray vision), consider using materials configured to allow for transparency or effects that don’t register occlusion.
For further clarification, ensure you’re familiar with the aspects covered in the Needle Engine resources and Apple’s documentation mentioned in the stack overflow you referenced.
If you need more insight into specific lines or components from the Needle Engine documentation, feel free to ask!
1 replies left - Get a PRO license for more AI replies.
thread_X7sbzxlgSWlVn0VkyZA7gUhG
Reply to this message to continue the conversation
1 Like