Post

Replies

Boosts

Views

Created

Guidance on USDZ model sizes
I'm looking for documentation/guidance on USDZ and scene model sizes. My focus is on RealityKit-based apps. I found the 2018 WWDC presentation Integrating Apps and Content with AR Quick Look which mentions a rule of thumb for a USDZ model of: 100K polygons One set of 2048x2048 textures 10 seconds of animations Are these number still recommended in 2021? Are these numbers just for Quicklook, or do they apply to RealityKit-based apps too? If a RealityKit scene loads several USDZ models, should the cumulative number of polygons across all models be 100K, or is the 100K number on a per-model basis? The talk mentioned AR Quicklook will dynamically downsample textures for devices with less memory. Does RealityKit do this as well? If so, can I error on providing a larger texture (e.g., 4096 x 4096) and trust RealityKit to downsample as appropriate for me? (I am hoping there is some documentation covering questions like this)
1
0
2k
Nov ’21
usdzconvert and metersPerUnit
I've been creating USDA files manually and converting them to USDZ via Apple's usdzconvert tool (version 0.64). In the file I set unit size to be 1 meter metersPerUnit = 1.0 but the USDZ keeps the unit size at 1 cm. Apple's Reality Converter does process the metersPerUnit metadata, so that is a viable work-around for me. But sometimes I'd prefer the command-line tool. Is there an update to the usdzconvert tool? I couldn't find one.
0
0
882
Nov ’21
OcclusionMaterial filter?
RealityKit has a CollisionFilter to determine which entities can collide with which other ones. Perchance, is there something similar for OcclusionMaterial? In effect, I'd like to have the ability to have a model with an OcclusionMaterial "occlude this entity but not that entity".
0
0
541
Nov ’21
AR Quick Look additional controls?
I've recently added some USDZ files to a web page, and I can download and display them fine via AR Quick Look on an iPhone or iPad. I've noticed full occlusion is active in the AR view. Over time, the device appears to heat up and the frame rate drops. Are there any properties I can set in the <a rel="ar" ...> HTML tag to control things like occlusion or autofocus (i.e., turn them off)?
0
0
929
Nov ’21
polygon count vs. triangle count?
In a previous post I asked if 100,000 polygons is still the recommended size for USDZ Quick Look models on the web. (The answer is yes) But I realize my polygons are 4-sided but are not planar, so they have to be broken down into 2 triangles when rendered. Given that, should I shoot for 50,000 polygons (i.e., 100,000 triangles)? Or does the 100,000 polygon statistic already assume polygons will be subdivided into triangles? (The models are generated from digital terrain (GeoTIFF) data, not a 3D modeling tool)
2
0
2.4k
Nov ’21
Are RealityKit lights expensive?
I am finding some unexpected behavior with lights I've been adding to a RealityKit scene. For example, I created 14 PointLights, but only 8 appeared to be used to illuminate the scene. In another example, I created 7 PointLights and 7 SpotLights, and the frame rate dropped quite a bit. Are lights computationally expensive, causing some adaptive behavior by RealityKit? Should I be judicious in my use of lights for a scene? (Note: I set arView.environment.lighting.resource to a Skybox with a black image; my goal was to completely control the lighting. I don't know if that added to the computational load)
1
1
1.2k
Dec ’21
Reality Converter scale issue
I don't know if this is an issue with Apple's Reality Converter app or Blender (I'm using 3.0 on the Mac), but when I export a model as .obj and import it to Reality Converter, the scale is off by a factor of 100. That is, the following workflow creates tiny (1/100 scale) entities: Blender > [.obj] > Reality Converter > [USDZ] But this workflow is OK: Blender > [.glb] > Reality Converter > [USDZ] Two workarounds are: export as .glb/.gltf, when exporting .obj set the scale factor to 100 in Blender Is this a known issue, or am I doing something wrong? If it is an issue, should I file a bug report?
3
0
1.9k
Dec ’21
Reality Converter fails to convert FBX on M1 Mac
Does Apple have any documentation on using Reality Converter to convert FBX to USDZ on an M1 Max? I'm trying to convert an .fbx file to USDZ with Apple's Reality Converter on an M1 Mac (macOS 12.3 Beta), but everything I've tried so far has failed. When I try to convert .fbx files on my Intel-based iMac Pro, it succeeds. Following some advice on these forums, I tried to install all packages from Autodesk https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-0 FBX SDK 2020.0.1 Clang FBX Python SDK Mac FBX SDK 2020.0.1 Python Mac FBX Extensions SDK 2020.0.1 Mac Still no joy. I have a work around - I still have my Intel-based iMac. But I'd like to switch over to my M1 Mac for all my development. Any pointers? Note: I couldn't get the usdzconvert command line tool to work on my M1 Mac either. /usr/bin/python isn't there.
7
0
4.2k
Jan ’22
Setting lensPosition to focus at infinity
I am creating a fixed-focus camera app with the focus distance at infinity (or at least 30+ feet away). When I set lensPosition to 1.0, the images were blurry. Some tests letting autofocus do the job showed a lensPosition of about 0.808 for my wide and telephoto lenses and 0.84 for the ultra wide lens did the trick. (iPhone 13 Max) Will the lensPosition to focus at infinity vary between devices and lenses on that device? Is there a way to determine the appropriate lensPosition at run time?
1
0
876
May ’22
AnchorEntity from ARAnchor bug?
I am running into a strange bug where the exact same code compiles fine in one project but generates a compiler error in another project. In particular, I am trying to create an AnchorEnity from an ARAnchor. func addModelTo(anchor: ARAnchor) { let entityAnchor = AnchorEntity(anchor: anchor) ... } The compiler error message is not even consistent. Sometimes I get a single error message: Cannot convert value of type 'ARAnchor' to expected argument type 'AnchoringComponent.Target' Other times I get an error with two possible issues: No exact matches in call to initializer Candidate '() -> AnchorEntity' requires 0 arguments, but 1 was provided (RealityFoundation.AnchorEntity) Candidate expects value of type 'AnchoringComponent.Target' for parameter #1 (got '(anchor: ARAnchor)') I'm trying to track down why this sometimes causes an error and sometimes it does not. Any pointers?
1
0
1.7k
Nov ’22
State of the Union video on iOS or Apple TV
When I try to watch the WWDC22 "Platforms State of the Union" video on my Apple TV, iPhone, or iPad, using the Developer app, the video only shows a single frame every few seconds and there is no audio. The video plays fine on the Developer app on my Mac. Has anyone else had this problem? Is there a work around? (I've tried deleting the Developer app on my Apple TV and reinstalling it, but no joy).
1
0
830
Jan ’23
Multiple BodyTrackedEntities?
Can ARKit/RealityKit track multiple bodies for animation simultaneously? Reviewing Apple's CapturingBodyMotionIn3D sample code (for WWDC2019 session), there is no explicit linkage between the ARBodyAnchor and the loaded BodyTrackedEntity (e.g., the AnchorEntity used for the BodyTrackedEntity is not associated with the ARBodyAnchor). There seems to be some hidden linkage between the ARKit ARBodyAnchor and the RealityKit BodyTrackedEntity. Likewise, the ARFrame has a property for only a single ARBody2D (detectedBody). My interpretation is that only a single person can be tracked at a time. Is this correct?
1
0
1.2k
Jan ’23
Body tracking robot and Blender
Has anyone successfully imported Apple's (FBX) robot for Apple's CapturingBodyMotionIn3D demo into Blender exported it back out (GLTF or other format) converted it back to USDZ via Reality Converter and gotten it to work in Apple's demo app again? I have run into numerous problems, and each effort to fix a problem leads to new ones. For example, importing Apple's FBX robot has the bones pointing in funny directions (see attachment). When I try to correct this on import by aligning the bones, the robot in the Apple app looks like it went through Star Trek transporter accident - limbs at weird angles.
0
0
907
Jan ’23
Importing RoomPlan output into Blender
I'm sharing this in case someone else wants to use Apple's RoomPlan to create a model and import it into Blender. The problem: I could not successfully import a USDZ model from the RoomPlan app into Blender. (I went through the normal process of importing a USDZ file into Blender: change the file type from ".usdz" to ".zip"; unzipped the file; then tried to import the ".usda" file). No surfaces appeared. The solution: In Apple's source code from here, in the file RoomCaptureViewController.swift, I changed the line try finalResults?.export(to: destinationURL, exportOptions: .parametric) to try finalResults?.export(to: destinationURL, exportOptions: .mesh) recompiled, and went through the USDZ to USDA conversion process again. This time it worked. Apparently Blender cannot import parametric USDA models.
0
0
1.8k
Jan ’23
AnchorEntity a child of an Entity?
Reviewing Apple's AnchorEntity documentation, I see that an AnchorEntity can be a child of an Entity in the RealityKit hierarchy. Has it always been this way? In my memory, an AnchorEntity was always just the base element in a Scene. If this was a change by Apple at some point, has Apple given examples where making an AnchorEntity a child of an Entity lets you do cool things you couldn't do before?
1
0
876
Feb ’23