Casting dynamic shadows on lightmapped objects

Hello everyone.
Is it possible to cast dynamic shadows on lightmapped objects?
For example, consider there is a plane that is lightmapped and a box that is rotating in its own axis. I want the real-time shadow of the box on that plane.
Now there are no shadows of that box but when I check cast lightmap shadow to true, the shadow appears but doesn’t change when the box rotates.

Project link: https://playcanvas.com/editor/scene/1064094
scene name: lightbake

Hi @maheshnaik

Check the following forum thread, it’s a bit old but the answers and insight it offers is quite right:

2 Likes

@Leonidas Thank you.
I have one more doubt. Does the engine read the UV1 channel at runtime? Because I have an FBX model, and when I make the lightmapped option to true it doesn’t show any errors but in pipeline it says UV1 unavailable. Even auto-unwrap doesn’t work.

Yeah, auto-unwrap isn’t currently working with glb models. For that you will have to use the legacy .json model format.

But if you provide the UV1 coordinates I think glb should work fine. Not sure if the asset reporting the coordinates missing affects this, do the lightmaps look ok when the app runs?

1 Like

Okay. I will try with the legacy .json format.
How to provide UV1 coordinates? Using blender or any other tool or is it possible in playcanvas editor?

It looks okay. If you can, please take a look at this demo project.
https://playcanvas.com/editor/scene/1067898

Thank you.

Using the .json legacy format for models will allow you to use the auto-unwrap button on the asset. So you can do that inside the PlayCanvas editor.

Otherwise Blender or any other modelling app can unwrap on the UV1 channel and include those coordinates on the exported FBX file.

@Leonidas Thank you. When I imported the model as .json, UV1 was already available.

1 Like