Forum

User posts Mentalist
29 February 2016 09:24

HOWEVER – last issue? Error message when I click "Fast Preview (see below) AND I still don't get the Preview in Viewer option when I go to export.

Oh… THAT. I've run into that error before. It's absolutely annoying because you have to uninstall (by removing the add-on first), then re-install (yet again) the SDK.
And just to be sure, you should probably re-download it in case something inside has become corrupt. And before installing it again, check your add-ons folder to make sure nothing relating to Blend4Web is still lingering. But it is fixable.

I believe this happens when an update is done incorrectly. You can see my thread about it here, and another person's thread here. In both cases reinstalling fresh was the solution.

By the way, for future reference, when updating I think the best way is to follow these steps you can use Git to update Blend4Web, and this is probably the easiest way. Read Konstantin's second comment in this thread for details. If not using Git, you can do this:

1) Export any projects you want to keep. Close the Project Manager page when you're done.

2) Disable the Blend4Web add-on from Blender's Preferences. Save User Settings, and Quit Blender.

3) Move your old SDK folder to the Trash/Recycle Bin (no need to empty it just yet).

4) Move the new SDK version's .zip file to the location you want to keep it in, and unzip it.

5) Launch Blender, check that the file path for the scripts folder is correct. (It should be the root folder of the SDK.) Save User Settings, and Quit Blender.

6) Launch Blender again and enable the Blend4Web add-on. It should show the new version number. Save User Settings.

7) Switch to the Blend4Web Engine and test that the Fast Preview feature is working.

8) From Blender, launch the Project Manager again. Import your projects back in.

9) Empty your system's Trash/Recycle Bin (optional, of course). Might want to make sure your re-imported projects are working correctly first, just to be certain.
29 February 2016 05:44
1) Are you sure that is the new version of the SDK and not the old one?
Also, remember to relaunch Blender for it to take effect. What this part does is, it makes the B4W (SDK) add-on visible in Blender's add-ons list.

2) Is it possible you did a quick install of only the standalone add-on and not the SDK? (In other words, this)
If so, you need to uninstall the standalone add-on and install the SDK properly from the beginning.

(No need to apologize - I was confused the first time I did it too.)
29 February 2016 05:20
For the path to Scripts, choose this:
/Users/user/blend4web_sdk_free/

The file path may vary, depending on where you keep your SDK. But basically, point it to the SDK's root directory.
In older versions of Blend4Web the file path was different, and that's why you saw the "Deprecated path to scripts" error message.



Save User Settings and Quit Blender.

Relaunch Blender, go to your Add-Ons tab in Preferences, and enable the Blend4Web SDK.

If you expand Blend4Web's listing in the Add-Ons list, there is another file path to check. Set this to be the same file path as above. Save User Settings again.



For more details, see the Blend4Web Manual's section on Installing the SDK.
29 February 2016 04:08
I have made an environment texture and would like to create a night time version so as to gradually blend the two as time goes on. It may be a 10 or 20 minute process, but I would like the sky to get darker as day becomes night, and then lighter again as night becomes day. I am also considering a version with four textures: dawn, midday, dusk, night - but first I would like to know if it is possible to transition between even two environment textures.

If possible, I am thinking that if I could have a sky with alpha I might be able to layer a sun and clouds texture behind it and rotate that texture across the sky as time passes. But since it is my understanding that nodes are not supported for World materials in Blender Internal / Blend4Web, I don't know if it can be done.

Any advice is welcome. Thanks in advance!
25 February 2016 15:56
That's awesome, haha! "Just firing vectors in needed directions"…

I appreciate you explaining more about your technique. I'll probably have more questions as I experiment with this. For now I'll just say - thank you!
25 February 2016 13:43
Thank you, Pavel! This looks great! Exactly the effect I was going for.

How do you control it? In mine I used a color gradient to specify the direction of the flow, but yours doesn't use any textures. Is there a way to use a texture gradient to direct it (like a normal map - since you said it uses vector math)?

Thanks
25 February 2016 06:14
I've created a material that uses a texture of the color spectrum to push a glow around a torus cyclically.



View the HTML file

I thought this could be useful for creating animated electronics, panels, interfaces, and that sort of thing, without needing to rely on animated textures. I suppose it could be used for effects such as lightning or plasma as well.

One drawback is that my material relies on the Hue/Saturation node to do this, and that node is mentioned as having poor performance when animated. Performance seems acceptable on this one object I have now, but I have not tested it out in a large scene and I worry that it may use too much processing power to be practical.

One other issue I have observed is that the animation does not move at a steady constant pace. This may not be a problem for some types of objects, but it really depends on what is being textured, I think. I still don't know if this is because I need to prepare my color spectrum texture differently, or because of performance limitations of the Hue/Saturation node.

Here is the .blend file. Any feedback or suggestions for improving performance are welcome. Thanks.
24 February 2016 16:29
Thank you, Mikhail!
Your example is very helpful!

It appears that there was no need for me to rework the B4W_REFLECT node, as Blend4Web inserts its own Fresnel in upon compiling.
I did a test and cut the node connections inside, but I still got a a reflective monkey :-)
And since B4W already uses Schlick's approximation instead of Blender's Fresnel, I don't really need to tweak anything. Well, I learned something.
24 February 2016 12:10
Okay, I modded the B4W_REFLECT node to have a physically-based Fresnel curve. I "ported" a node setup from a PBR Cycles material I have into Blend4Web.



Here are two .blend files for comparison:

Original: cube_map_mirror_default_fresnel.packed.blend

Modified: cube_map_mirror_physical_fresnel.packed.blend

At first I thought there was a noticeable difference, but now that I am comparing them I'm thinking there may not be. Hmmm… It's possible I just did a lot of work for nothing, if the B4W_REFLECT node was already using phyically-based Fresnel. I will have to get some feedback from the B4W team, I think.

Well, I also need to figure out how to use this same curve to factor between max and min cube map reflection textures. I have an idea of what to try for this next step.

Also, I think textures need to be prepared/baked at the roughness matching the node's roughness value. Planning to experiment with this.

I still have no idea about what to do for Dynamic Reflection though, as it may not use nodes at all. Maybe there is a way to mix reflective and diffuse by layering textures.
24 February 2016 08:44
Hey, I was just revisiting this issue and I discovered that if you append the animated object into a new .blend it exports fine! So there is a workaround for now, even if it's a little bit inconvenient. I guess whatever datablock is causing the problem, it's not on the object itself. Maybe you knew this already, but I thought I should mention it in case it helps someone.