Lighting help for moving objects

31 December 2015 08:02

I am doing an animation with revolving planets and have two problems I have been unable to solve so far.

The first is that, even with the single lamp in the scene turned off, I am getting shadows on the planets that revolve with the planet material.

What I am trying to achieve is a low level emission for each planet, so that the whole planet is somewhat
visible, and the ability for the planets to cast and receive shadows from the Sun lamp in the scene. For some
reason I am not able to get shadows working the in view port.

This is very different from what I am used to in Cycles, and I haven't found a good tutorial or explanation in the manual that explains how the lighting in Blend4Web works in general. A step-by-step tutorial on applying a material to a sphere and then setting up all aspects of the lighting would be very valuable.

Do I need to be baking the materials? Do I need to do something with normals? Help!

I have included the blend file.

05 January 2016 12:44

Unfortunately I can't fully understand no reproduce the issue yet. Could you provide the source blend file?
05 January 2016 17:25
Hi Alexander,

The blend file is attached in the original post.

05 January 2016 17:58
The blend file is attached in the original post.
Unfortunately I don't see any. There is just one exported html file.
06 January 2016 06:57
Hi Alexander,

My apologies - I attached the wrong file. The blend file is now attached in the first post.

Also, attached in this post is another simplified scene with 2 spheres - 1 textured and 1 untextured.

The lighting in the untextured sphere is what I would expect, but how do I do a texture without it
rotating in a situation like this?

08 January 2016 13:53

I've seen your file. What kinds of shadows do you need? From one planet to another? Because there is no proper receiver there.
About the shading on the node material. I see that you're trying to recreate normal from the UV map. You need to do this only if you trying to do some very complicated effect. If not, just leave the normal unconnected so it'll be calculated automatically.

11 January 2016 17:24
Hi Alexander,

Oh, I see. I disconnected the normal control from the material node and now it works fine.

12 January 2016 07:25
Hi Alexander,

What would I need to change to have shadows from one planet to another?

12 January 2016 10:17

You just need to enable "Cast Shadows" and "Receive Shadows" options for each planet in Object properties
Blend4Web Team - developer
Please register or log in to leave a reply.