4.6 C
New York
Sunday, January 12, 2025

ios – 360 picture VisionOS Decision


Utilizing a 360 picture that I’ve taken with 72MP with a Insta360 X3 I want to add these photographs into my VisionPro and see them surrounding me fully as we anticipate of a 360 picture. I used to be in a position to do by performing the described HERE.
The issue is the standard. On my 2D window the picture seems with nice high quality.

I’ll nonetheless write down the code:

struct ImmersiveView: View {
    @Surroundings(AppModel.self) var appModel

    var physique: some View {
        RealityView { content material in
            content material.add(createImmersivePicture(imageName: appModel.activeSpace))
        }
    }

    /// Ref: https://www.createwithswift.com/
    func createImmersivePicture(imageName: String) -> Entity {
        let sphereRadius: Float = 1000
        let modelEntity = Entity()
        let texture = strive? TextureResource.load(named: imageName, choices: .init(semantic: .uncooked, compression: .none))
        var materials = UnlitMaterial()
        materials.coloration = .init(texture: .init(texture!))
        modelEntity.elements.set(
            ModelComponent(
                mesh: .generateSphere(
                    radius: sphereRadius
                ),
                supplies: [material]
            )
        )
        modelEntity.scale = .init(x: -1, y: 1, z: 1)
        modelEntity.rework.translation += SIMD3(0.0, 10.0, 0.0)
        return modelEntity
    }
}

For the reason that high quality is an issue. I considered decreasing the radius of the sphere or reducing the size. On each instances, nothing adjustments.
I’ve tried: modelEntity.scale = .init(x: -0.5, y: 0.5, z: 0.5)
And likewise let sphereRadius: Float = 2000, let sphereRadius: Float = 500, however nothing is modified.
I additionally get the warning:

IOSurface creation failed: e00002c2 parentID: 00000000 properties: {
    IOSurfaceAddress = 4651830624;
    IOSurfaceAllocSize = 35478941;
    IOSurfaceCacheMode = 0;
    IOSurfaceMapCacheAttribute = 1;
    IOSurfaceName = CMPhoto;
    IOSurfacePixelFormat = 1246774599;
}
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceCacheMode
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfacePixelFormat
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceMapCacheAttribute
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceAddress
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceAllocSize
IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceName

Is there something I can do to cut back the radius or simply to enhance the standard itself?

Display Pictures of the VisionPro display beneath. I do know right here it seems type a okay, however once we are utilizing the gadget, it will be higher to have a greater high quality.
enter image description here

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles