First Person Walk-thru

16 October 2014 10:07
Is it possible to use Blend4web for a walk-thru, as I am able with Three.js as seen here What I would like is to create the scene with the instruments and non-interactive animated players, and have the viewer be able to walk around like a ghost. The issue with 3js is getting animated models into this particular scene. If Sea3d file format had a Blender export, I could use that. However, it does not exist, and I am just learning about Blend4Web. So, am I able to set up a scene with all the instruments, plus 11 animated characters, plus an audio track, and give the viewer the freedom to walk around the set?
16 October 2014 11:23
Hi trepaning and welcome to the Blend4Web forum!

You can definitely implement all the functionality you need by using Blend4Web. We also have a decent audio engine so you can place not just a single audio track but a whole bunch of positional sound sources near every instrument right in Blender and export all the composition at one click.

Just take a look at our game tutorials, also you may find some useful coding examples in our app.js addon.
16 October 2014 20:03
I got to looking at the game creation tutorials after I made this thread, and I see the possibilities for certain. Is there a way, once a scene has been created with a bunch of audio sources and animated characters, to have the engine wait until all is loaded before it begins playing so the audio and animations would be in sync? That may be a question I figure out as I mess with B4W later this month, but if the answer is readily available, lay it on me, thanks.
16 October 2014 21:28
Yes, to do that load the scene with the "wait_complete_loading" param of the "data.load()" function set to true. For more info check our API doc here.
17 October 2014 00:59
Thanks for the info. Just because I am at work and cannot look around for info, if you have a link to transparency materials info, that'd be great. If you go to the link in the 1st post of this thread, you see the glasses are semi-transparent. I am wondering the process to make that so in B4W, thanks.
17 October 2014 09:24
17 October 2014 11:04
I was just reading that, thanks. Here is what I have done so far 24 megs, so click with that in mind. Skeletal works. Vertex animation (the head) is funky. The head should be mouthing a 53 frame lip sync. If you look closely, the mouth does move, but seems to be only 1 frame or something. Settings say 53 frames are baked. A different test of stretching a vertex out from the cheek over ten frames did work better, but it played back way too fast. And final thing is I have not figured out how to make texture 2-sided, so viewer can't see through the wheelbarrow bass' bottom when looking through an F hole, as an example. Thanks for the work on B4W, very interesting so far with fast results.
17 October 2014 11:08
Hey, just moved to the center of the bending pillar and had weirdness happen while using IE11. Caused all kinds of flipping to occur and my view ended upside down. Happened a few times.
17 October 2014 12:03

There is some issues with a baked animation, maybe incompatible keyframes or so. Need some more info, e.g blend file.
Two sided: disable Backface Culling property on material (docs).
IE11 is not fully WebGL-compatible yet, we are working on it but you know microsoft .
17 October 2014 20:47
Okay, so backface culling is set while in Blender Game. I have been doing everything in Blender render.

Firefox had the same flip about thing happen when moving through the center of the pillar, a test I did because I know how fun it can be to use IE.

I can get .blend files available later, but will run a couple simpler tests for vertex animations first when i get home. If they don't work, I'll post a .blend.

FYI, the head is animated with many shape keys driven by audio. Is it better to export that animation to a PC2 and reapply it to the mesh as a single Mesh Cache? That could be the issue, thinking about it at this moment.
Please register or log in to leave a reply.