Post not yet marked as solved
Post marked as unsolved with 0 replies, 235 views
Hi! I'm working on a project with SCNKit and Model I/O. I'm trying to create a LightProbe in Model I/O and load into SCNKit for rendering. But the following code always fail. It's quite simple and straight forward, but doesn't work as expected. Please any tell me if I have any misunderstanding on the API?let lightProbe = MDLLightProbe(reflectiveTexture: matterportSkyboxSample, irradianceTexture: MDLTexture.irradianceTextureCube(with: matterportSkyboxSample!, name: "", dimensions: vector2(128, 128)))
lightProbe.lightType = .probe
lightProbe.generateSphericalHarmonics(fromIrradiance: 2)
bunnyNode.light = SCNLight(mdlLight: lightProbe)I have checked that the lightProbe object has correct spherical harmonics value, but when I create a SCNLight object on it, the created object always has empty spherical harmonics data.