Tutorial for applying materials and baked materials

30 December 2015 04:39 #6171

I am doing planet animations and am not clear on how to apply materials to objects in Blend4Web. I have been using Blender Cycles materials nodes almost exclusively from the start, but I'm having trouble getting the materials on in Blend4Web. Everything will look fine in the material and texture previews and in the viewport, but when I do a fast preview the material will not show up on the object.

In this post, there is a mention of using a geometry node and applying modifiers, but I'm not sure how to do that.

My projects are mostly being done in Windows because I am able to have the CUDA setting enabled to use
GPU rendering, which I was not able to get working in Linux. These problems could be related to Windows, so I am going to go back to Linux to see if I have better luck.

A detailed beginners tutorial on UV unwrapping a sphere, applying materials step by step, and also how to bake materials in Blenders Cycles and import them to Blend4Web would be very useful.

30 December 2015 09:49 #6172

I have tried applying the image as a material in the attached .blend file, but I'm still missing something. The exported HTML file
does not contain a material. This file was done in 64 bit Linux with Blender 2.75.

Also for some reason, my Linux version of Blender with Blend4web installed does not have a fast preview button at the bottom or on the right hand side in the render section.

If you can steer me in the right direction I would be most grateful.

30 December 2015 11:31 #6181

It is expected behavior actually. Currently Blend4web node system doesn't read internal structure of a material used inside material node. It only receives shading settings: Diffuse Shader, Specular Shader etc. Thus, we get white instead of textured surface. You need to recreate this texture in node structure itself.
I have attached a corrected file.

In the nearest future your setup will be supported as well.

Also for some reason, my Linux version of Blender with Blend4web installed does not have a fast preview button at the bottom or on the right hand side in the render section.
Were you able to Open SDK Index or Project Manager from Blender? Probably, development server was down for some reason. Does it work after restarting Blender?

Blend4Web developer
30 December 2015 19:57 #6190
Hi Evgeny,

Thank you for supplying the corrected blend file. I still get a blank sphere, but I think for a different reason.

The development server is shown as running, and restarting Blender does not change the appearance of the menu - there is still no fast preview button. I am able to open the SDK index, but Linux is using Konqueror browser to open it, even though Konqueror is not my default browser. When I export the blend file to HTML, it is also using Konqueror which in not WebGL capable.

Is there a place in Blend4web that I can change which browser is being used? This will probably fix the problem.

Also, can you tell me if you are able to get Linux set up to use the GPU for rendering? I have an NVidia card.

31 December 2015 01:24 #6192
Hi Evgeny,

I found a way to get Blender to use Firefox instead of Konqueror by creating a new profile, reinstalling Blender and Blend4web.

But I still get a blank sphere. If I open any other blend file and export to HTML it runs fine in Firefox, but not the file I was working on ( even the corrected one ) Is there something else I need to check? Does this file export properly on your end?

I have reattached it in case you need it.

31 December 2015 01:54 #6193
Hi Evgeny,

Sorry for the bother! I found the problem - the original "geometry" shader did not have "UV map" entered in the top field.

Works fine now. Thanks for your help.

Please register or log in to leave a reply.