Loading lights from multiple scenes
28 July 2017 10:58
I'm working on a 3d app that is split between multiple scenes. I have a single master scene that contains common objects like the camera object, and several environment scenes that each contain their own lights. In my app I'm loading the master scene with scenes.load() first, and then loading one of the environment scenes. The trouble I'm having is that the b4w runtime isn't loading the lights from any scenes loaded after the initial scene. Is it possible to load the lights from my environment scenes?
28 July 2017 11:48
If you have a look at the Cartoon Interior example project in your SDK, it loads a number of items dynamically. These have lights. The blend files can be found in blend4web_sdk/blender/tutorials/cartoon_interior/
*Edit*
After doing some checking, these loaded lights don't seem to effect the scene.
*Edit*
After doing some checking, these loaded lights don't seem to effect the scene.
28 July 2017 14:25
Actually, lamps cannot be loaded dynamically. The only solution is to have them all in the initial scene and turn on/off at a proper time by using the set_light_energy or hide_object/show_object methods.
28 July 2017 17:56
Good to know Ivan, thanks.
Pedwards, if you want to try what Ivan suggested, here is a post about hiding and showing lights using logic nodes with examples you can download.
Pedwards, if you want to try what Ivan suggested, here is a post about hiding and showing lights using logic nodes with examples you can download.
20 August 2017 17:15
Hi,
I'm new to B4W.
When I'm using
from
while
is being called after scene has finished loaded:
the
seems to work fine but when I'm trying to use it after the scene has finished loading
doesn't work.
Can anyone please help me with this one?
I'm new to B4W.
When I'm using
set_light_energy
preloader_callback
while
preloader_callback
m_data.load(file, loaded_callback, preloader_callback, false);
the
set_light_energy
set_light_energy
Can anyone please help me with this one?
20 August 2017 17:30
Hi Ranbuch,
In order to debug code, I need to see the complete project. Or you can make a small demo project that has the same issue. Use the "Export Project" function in your project manager to export a project zip file that I can then import.
In order to debug code, I need to see the complete project. Or you can make a small demo project that has the same issue. Use the "Export Project" function in your project manager to export a project zip file that I can then import.
21 August 2017 06:38
21 August 2017 07:40
What is your ultimate goal? Maybe if I knew what you planned to do, I could suggest something.
Here is an example of a light being turned on and off.
Here is an example of a light being turned on and off.
22 August 2017 06:27
I need to allow the top Window alter the light energy of the scene within the iframe.
I can alter the scene with a function that I've wrote with
but unable to do the same with a button click or a
event from the top Window.
Thank you for your help.
I can alter the scene with a function that I've wrote with
setTimeout
postMessage
- It's the same function
The
this
window
apply
set_light_energy
Thank you for your help.