Forum

Animated camera stuck to the center

28 December 2015 01:35
Hello to all!
This is my first post. Please forgive my English

After spending 200 hours in one month (really tired - no programming skills)
on Blender Render, Cycles and Game,
I discovered a week ago B4W , hoping to upload my scene to html format on my website,
so users can watch and interact with it.

The problem:
There is an animated camera (static mode) following a path and targeting to a moving empty
(camera constraints: follow path, damped track)
Although the animation plays pretty well in viewport,
on export (.json and html) the camera is stuck to the center,
although the animation is being played.

I've read a topic with a possible solution: https://www.blend4web.com/en/forums/topic/99/?page=1
but I cannot figure it out and I don't know if this is the only problem.

I would appreciate your help.
Thank you
28 December 2015 06:20
I think the reason your Camera isn't animating in Blend4Web is that B4W doesn't support Curve objects. Curve objects with a fill get converted to Mesh objects on export and Curve objects without fills get discarded. This may be a limitation of WebGL, I'm not sure. But even if you give it a fill, your camera can't follow along a mesh. This is why there are Logic Editor nodes for controlling Camera movement, so try using those instead. I'll be curious to know how it works out for you, so please share your results.
28 December 2015 10:23
Thank you so much for your help, Mentalist.
Didn't know that…
I' ll try Logic Editor nodes and I'll post the html
28 December 2015 10:27

There is an animated camera (static mode) following a path and targeting to a moving empty
(camera constraints: follow path, damped track)
Although the animation plays pretty well in viewport,
on export (.json and html) the camera is stuck to the center,
although the animation is being played.
You need to bake your camera animation to Action using Blender Animation baker. Then set Apply Default animation on camera settings. Check this topic.
Blend4web and that kind of thing.
28 December 2015 13:53
Thank you Mikhail!
At first, choosing pose, got a message "nothing to bake".
Then I selected object and it worked!
But the camera's location in viewport changed.
It's not any more at the beginning of the curve.
Anyway, it works in html, so I am satisfied.

Another problem is that the house is not positioned to the
ground, as in viewport and there are flickering edges.
How can I fix them?

28 December 2015 14:45

first, choosing pose, got a message "nothing to bake".
Yes, because in the example there was an armature animation, but you have an object animation, so it need different setup.
But the camera's location in viewport changed.
Yes, because you have a constrain animation and action animation on one object at same time. To see correct baked animation turn off the constrains you have on object, to see the constrains influence remove baked action from the object and return object's location and rotation to zero.
Blend4web and that kind of thing.
28 December 2015 15:43
Thank you so much!
 
Please register or log in to leave a reply.