Lighting not baking to my scene? Using the Unity Tool Kit

The image on the left is my Unity Scene and the one on the right is the built Baybalon js, would anyone know why or how the textures not being lit? Even when I have a light in the scene?

pinging @MackeyK24

1 Like

Dunno what could be your issue. But if you package up you scene and test assets and send to me I will take a look at

1 Like

Yeah it’s really weird @MackeyK24 I realized that it’s the light settings (the intensity was too low) but now if you look at it, I’m not getting any shadows, the colors are off, and just generally doesn’t look like the Unity scene at all (Pictured left):

Is there something special that I have to do with the lighting settings? Even a default scene with a cube and default materials is not displaying correctly?

Send me the house scene. I will play with it :slight_smile:

1 Like

Thanks so much for the reply I really appreciate it I just don’t see what the house scene would be able to do, because even a default material and default scene is not showing up properly for me. (I figured out my original problem, being a custom material and not a standard)

Is there any resources or lighting resources that I could check out? Or could I pass you all of my properties for lighting and you could use that? Or do you actually need the Geo and material for the house?

Current light settings:

And Export settings:

And house Game object:

Okay getting closer with the Subtractive lighting mode in unity after reading the docs

Okay the shadows are working I just can’t get it to be vivid like in the Scene, any ideas guys?

Well if you send me the house, i wil play with it on BOTH my toolkit version to check out the “LIGHT EXPORT” flow. make sure everything is everything. My newer toolkit i am try to make things work OUT-OF-THE-BOX with all unity components and settings… So there is NO NEED for anything EXTRA you have t do to a scene using the new toolkit.

Send me the house so i have a scene and can see it glory in unity and play with to get the proper defaults to make it look as best i can out the box.

Doesn’t look proprietary or anything. Anyways… You wanna send me. I can take a better look at things.

1 Like

Thanks so much @MackeyK24 I sent you a PM :slight_smile:

I will play with house scene.

As for your other question… Dont change the Intensity on the UNITY LIGHTING PANEL… that changes for BOTH unity and export… You wanna fine tune the intensity for your Babylon Export… there is enough light in the unity scene… Anyways… Use a Default Scene Controller component a MASTER game object… I like to call mine Scene Controller… On the Default Scene Controller is a Ambient Light Scale slider… play withthat to get more ambient light in your out babylon scene…

There is also a light settings component… Put that on your actual light game object… you can scale the Intensity of Directional, Point and Spot lights to BRIGHTEN UP your scene…

Set Lighting Panel to SUBTRACTIVE and set your shadow making light (Probably Directional) to MIXED mode… that will bake all the Ambient Lighting and Shadows into the lightmap textures

As far as “ENTRY POINT” for your script… that the thing… the toolkit allows you to attach scripts to game objects… For global type functionality… Again… Create a babylon script component and attach to your MASTER game object with Default Scene Controller… I call Mine Scene Controller… This can hold MANY different global type scripts. Default Scene Controller awlays run as the first script… so that can be your ENTRY POINT… Note the toolkit supports Script Execution order… just look up script order in Unity… I use these rules when instantiating the script in the proper order.

But remember Default Scene Controller scripts get order index to -1 which makes them run first…

Hope that helps :slight_smile:

1 Like

Yo @i73

Zip up and send me the Unity project… not just the FBX… i wanna see and work the settings you have setup in the unity scene with the house… i wanna see the lights, and bake settings, etc…

You can zip the whole Unity project fold… or use the Unity package system to package up the scene with the required assets into a .unitypackage and send me that.

You can send to via PM again :slight_smile:

1 Like

Thanks so much @MackeyK24 I didn’t realize the scene controller also handled ambient light so I just bumped it up to 2 and there we go:


It’s perfect, thanks so much!

Now to ask about the entry point:

“the toolkit allows you to attach scripts to game objects” Okay I’m a little lost lets say I want to add a GameObject that OnMouseDown() will pop up GUI for selecting multiple choices of answers. Shouldn’t I code directly in the Babalon js API to get raycasting and UI to come up?