You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before Mapbox v3 beta, I had implemented the building layer and additional models using the third party Threebox library; this enabled me to cast light from models and have it interact with surrounding buildings.
For example, in the image below you can see the white dot casting blue light onto the surrounding buildings.
I have since switched to v3 and have been able to import models with the recommended approaches (looks awesome - thanks!!!), but have been unable to implement any sort of lighting. I have attempted to add light sources to my .glb
but this has no evident effect on the output model layer in Mapbox. I have also tried to add additional lights utilizing the new lights API, to no avail.
I'm wondering if there is any recommended way to implement point light sources that interact with other layers (building / trees) or another raycasting sort of feature that achieves the same effect? Additionally, as can be seen in the image above, I am not able to get shadows between the model layer and tree layer to behave in the expected way when dealing with a opacity gradient in my source model (the tree shadow is cut off); I have changed the model-cast-shadows and model-recieve-shadows layer attributes, but this has no effect. I have also not been able to place the model layer above the tree layer as when I set the before? parameter in addLayer to 'trees' or 'trees\u001fbasemap', I recieve an error that this layer cannot be found, even when I can successfully query for it with betaMap.style.getLayer('trees\u001fbasemap').
Before Mapbox v3 beta, I had implemented the building layer and additional models using the third party Threebox library; this enabled me to cast light from models and have it interact with surrounding buildings.
For example, in the image below you can see the white dot casting blue light onto the surrounding buildings.
![image](https://cdn.statically.io/img/private-user-images.githubusercontent.com/7445957/276255188-daf54420-8664-43bb-a12c-f5fbd4453c11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0MTc0NDcsIm5iZiI6MTcyMTQxNzE0NywicGF0aCI6Ii83NDQ1OTU3LzI3NjI1NTE4OC1kYWY1NDQyMC04NjY0LTQzYmItYTEyYy1mNWZiZDQ0NTNjMTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTlUMTkyNTQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTY4OGYyY2VlMWJmM2ExZmQ1YzYwNjRkYjQ5ZDU5NjU0NzFiYmMwNjllZWY0YmMzMDM0NjQ1MjU3YzA1OTc4MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.p5g63Jj1Iy76y6-m3_ADC7fue-INFVyJwcdUG-nRqB8)
I have since switched to v3 and have been able to import models with the recommended approaches (looks awesome - thanks!!!), but have been unable to implement any sort of lighting. I have attempted to add light sources to my .glb
but this has no evident effect on the output model layer in Mapbox. I have also tried to add additional lights utilizing the new lights API, to no avail.
I'm wondering if there is any recommended way to implement point light sources that interact with other layers (building / trees) or another raycasting sort of feature that achieves the same effect? Additionally, as can be seen in the image above, I am not able to get shadows between the model layer and tree layer to behave in the expected way when dealing with a opacity gradient in my source model (the tree shadow is cut off); I have changed the
model-cast-shadows
andmodel-recieve-shadows
layer attributes, but this has no effect. I have also not been able to place the model layer above the tree layer as when I set thebefore?
parameter in addLayer to'trees'
or'trees\u001fbasemap'
, I recieve an error that this layer cannot be found, even when I can successfully query for it withbetaMap.style.getLayer('trees\u001fbasemap')
.Thanks for your help.
@mourner @astojilj
The text was updated successfully, but these errors were encountered: