I have question about hot turn off limit of lights in the scene ?
I know it is possible with : material.maxSimultaneousLights = 16; but is it possible to make it with some other way ?
Because I have game environment made in blender, if I use standard material it delete all exported material from obj.babylon .
Hello! not sure to get your problem
Why not going through the list of your materials after having loaded the scene from blender and set the maxSimultaneousLights value?
Also, max lights is a custom property. On the 2.79 exporter it is in Mesh properties. In 2.80, it is in material properties.
As long as you are not using either shadows, or want dark areas in your scene, you can actually have the light(s) move around with the camera. If a mesh cannot be seen, it is going to be culled, so who cares if it is not being light on any given frame?
Here, you can actually set the max lights to however many lights are moving with the camera. Thought this might conserve resources, but not suer. One is usually fine. You cannot do this from the JSON / .babylon exporter, but if you created a point light:
const camlight = new BABYLON.PointLight("Lamp", BABYLON.Vector3.Zero(), scene);
scene.beforeCameraRender = function () {
var cam = (scene.activeCameras.length > 0) ? scene.activeCameras[0] : scene.activeCamera;
// move the light to match where the camera is
camlight.position = cam.position;
camlight.rotation = cam.rotation;
};
Well the maximum number of lights can be set in Blender before you export - but, as @JCPalmer says, it depends on which version of Blender you are using. Blender 2.79 or earlier in Mesh Properties.
Thanks for answers I tried to search on google : How to export obj with limitation of lights. But, I didnβt find anything. Maybe I used wrong words.
In blender 2.79, how can I find the limitations of lights and the Mesh Properties ? I donβt see that in blender. Maybe I need better diopters