Comments (13)
@southrop Thanks; was able to repro, and I know what the issue is. This should solve @Leiong 's problem too.
In your point cloud prefab, change the "Scaling Mode" to "Hierarchy":
This is what I use to test, but for some reason the point cloud created from the XR menu produces one with Scaling Mode set to "Local". I'll fix the generation util to use the correct setting.
from arfoundation-samples.
Hi Leiong,
Question 1: I want to scale the content rendered by ARSessionOrigin, arsessionOrigin.transform.localScale = Vector3.one * scaleValue, but it will affect the point cloud particle effects. It looks strange, is it something I missed?
Could you post a screen shot of the "strange" result?
Problem 2: Disable ARsession, then enable ARSession, the previous plane still appears and cannot be cleared. I need to implement enable AR, reset AR, close AR, how do I need to set it up;
Thanks for the code snippet. You should not set ARSubsystemManager.systemState
yourself (the setter should be private -- it's a mistake that it isn't). The correct way to reset the session is to Destroy
it and re-add it, though there are some known issues with this, particularly on ARKit. This will be fixed in the next preview release. I'm also going to add a method Reset
to the ARSession
to make this easier.
from arfoundation-samples.
Hi Timm,
Question 1: When I want to scale the content rendered by ARSessionOrigin, the position of the particle effect is wrong, and the size of the border changes. This is not the result I want.
Question 2:After the Cube is generated, is there a way to remove the particle effects and planes? This will not affect my observation of the object.
(Sorry, this is the text of Google Translate, I hope you can understand it......)
from arfoundation-samples.
Question 1: When I want to scale the content rendered by ARSessionOrigin, the position of the particle effect is wrong, and the size of the border changes. This is not the result I want.
Does your point cloud prefab have a non-zero position? It looks like an extra offset is being applied. The line renderer being affected by scale is currently expected. The outline is mostly for debugging purposes. You can simply remove the line renderer from your prefab if you don't want it.
Question 2:After the Cube is generated, is there a way to remove the particle effects and planes? This will not affect my observation of the object.
Yes. To disable plane detection and point cloud updates, you can disable their managers: ARPlaneManager
and ARPointCloudManager
, respectively. To remove existing planes/point cloud from the scene, you can disable or remove their GameObject
s. You can get all the planes with ARPlaneManager.GetAllPlanes
and the point cloud with ARPointCloudManager.pointCloud
from arfoundation-samples.
I was having a similar issue to this and scaling the point cloud prefab by the same scale as the ARSessionOrigin
resolved the issue for me.
from arfoundation-samples.
I was having a similar issue to this and scaling the point cloud prefab by the same scale as the ARSessionOrigin resolved the issue for me.
That sounds odd. What does your scene hierarchy look like? Does your point cloud prefab have an identity transform?
from arfoundation-samples.
Yes. To disable plane detection and point cloud updates, you can disable their managers: ARPlaneManager and ARPointCloudManager, respectively. To remove existing planes/point cloud from the scene, you can disable or remove their GameObjects. You can get all the planes with ARPlaneManager.GetAllPlanes and the point cloud with ARPointCloudManager.pointCloud
After the Cube is generated,remove existing planes/point cloud from the scene
But the planes/point cloud did not appear when ARSession.Reset();
Does your point cloud prefab have a non-zero position? It looks like an extra offset is being applied. The line renderer being affected by scale is currently expected. The outline is mostly for debugging purposes. You can simply remove the line renderer from your prefab if you don't want it.
the point cloud prefab have a non-zero position, but this problem will still appear,Is the method like this?
from arfoundation-samples.
That sounds odd. What does your scene hierarchy look like? Does your point cloud prefab have an identity transform?
My scene hierarchy looks like this. Aside from a few UI-related addition and a camera clipping plane tweak (to account for the 300 scale), it's identical to the sample.
I use the default point cloud prefab generated from the Right-Click menu entry, and it has a completely zero'd out transform with the exception of scale.
from arfoundation-samples.
@Leiong
Thanks for the screenshots! Very helpful.
But the planes/point cloud did not appear when ARSession.Reset();
Did you also re-enable the point cloud and plane managers? It looks like you disable them, then reset the ARSession
, but don't re-enable them. If those managers are disabled, then plane detection and point cloud updates are disabled.
the point cloud prefab have a non-zero position, but this problem will still appear
The image you posted is of the plane prefab. Can you double check the point cloud prefab?
Is the method like this?
That is the correct way to scale the ARSessionOrigin
, yes.
from arfoundation-samples.
@southrop Hmm. Could you share your project? Either here or send it to me at [email protected]
from arfoundation-samples.
@timm-unity I've sent you an email with a replication
from arfoundation-samples.
@timm-unity Brilliant, that resolves it!
While you're making changes to the generation util, perhaps it's worth mentioning that the default point cloud gameobject gets created with the name AR Default Point Cloud
with a space at the end. Not really a big issue but seems unintentional.
from arfoundation-samples.
Nice catch; will do!
from arfoundation-samples.
Related Issues (20)
- [Bug] Low FPS results in face tracking to stop working HOT 1
- How to create ARFoundation's ARAnchor from ARKit's ARAnchor? HOT 2
- 为什么我发布成安卓程序,菜单都是灰色,用不了呢a HOT 2
- Support of MultiPeer for the visionOS platform HOT 2
- ARFoundation how to serializes ARWorldMap information for the specified region ? HOT 1
- Persist ARAnchors in Unity for Hololens 2 application HOT 1
- Stop URP Post Processing from affecting AR Camera Feed Background HOT 1
- [Android][ARCore] Crash occurs when changing to the front camera after ImageTracking has been performed even once. HOT 4
- [Bug] Link to Adam Demo executable does not work HOT 1
- [ARFoundation 6.0 with Unity 2022.3.15f1] error CS0246: The type or namespace name 'IAnalytic' could not be found (are you missing a using directive or an assembly reference?) HOT 1
- [Bug] I don't Know what is the issue but the AR core is not able to detect the plane surface and also not able to place objects I am using IQOO Neo 6 and the android version is android 14
- CPU Image from ARFaceManager HOT 1
- Is Bounding Box Available in Quest Pro or only Quest 3? HOT 1
- Xcode error in main funtion [ufw runUIApplicationMainWithArgc: argc argv: argv];
- [Bug] HOT 2
- 3D scanning using meshing / cloud of points?
- How to add a XR referenceImagelibrary through a script HOT 2
- How to unload loaded ReferenceObjectLibrary in ARTrackedObjectManager from memory
- [Bug]ARTrackedImage trackedImagesChanged value error #VisionPro HOT 3
- [Bug] Raycasts flicker against ARMesh on Quest 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arfoundation-samples.