Lightmap runtime generation failed on ios?


I’m trying to use the lightmapped runtime generation feature and while it seem to work just fine on desktop, it fails for ios.

Any ideas? Do I need to do something special to get this working on mobile?
Tried safari & chrome, I have a recent iphone (iphone 12 (SE))


ios (its all dark)

Thanks for the support


could you please try to create a simplest scene you can with this for us to look at? Perhaps just a terrain mesh or something similar, with one lights … and keep adding things till it breaks. If you can repro it like this, please add mvaligursky as a user if that’s ok.

Any errors in the debug console? You can remote connect with desktop Safari to iOS Safari and see the console.

1 Like

also, what iOS version are you running? I tried running these two examples on iPhone XR v 15.0 and both work fine

1 Like

ok, those 2 works fine

No errors, but since the 2 examples are working just fine, I’ll triple check my stuff…

So I copied 3d world in a new scene and it works fine

Deleted the 3d world from my project and copy pasted the working one and it still not working. I’m confused.

So turns out that since im doing a markerbase ar project, all my 3d stuff is hidden until the marker is reckognised. Then it gets displayed.

I guess its because of that that lightmaps generation fails.

If I dont hide my 3d model, it works just as expected.

So is there a way to trigger that lightmap generation when I’m ready? I tried hidding my stuff in postinitialize instead of initialize without success.

Hello again,

Got it working by delaying the hidding of my 3D models.

But I noticed artefacts on my terrain, did a couple of tests but cant pinpoint what is going on.

Its changing based on the camera movement. Any ideas?

Ok its related to the baking of directional lights.

If I change the angle of the directional light, I will have smaller/bigger black spots.

Any ideas on what im doing wrong? thanks

For manual baking, see how the baked-lights-ao triggers baking when you change some settings in the scene, it runs:

app.lightmapper.bake(null, bakeType);

I’m not too sure about those black spots … Do those changes as you move around as you said? That is pretty strange. Any short video? Or they only change depending on the directional light direction … which could just need bias and normal bias adjustment on the light.

I’d probably capture a frame with SpectorJS (assuming this happens on desktop as well) to investigate. Or is this iOS only?