Posts

Post not yet marked as solved
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.
Posted Last updated
.