Forum

Help needed for texture mapping

07 January 2016 13:15
Hi everyone, recently I'm trying to export my building models by blend4web for authoring on web. The model contains both repeating tile textures as well as UV texture for building name, and everything is fine using original Blender render engine, as the image shown below:



However, I have no luck when trying to export it. Only stripes are shown, and the words on the UV image are not being rendered.

Exported scene

I know that only generated coordinates with flat projection is supported at this moment, but I can't find any workarounds. On the other hand, I have no clue on what's wrong with the UV material and texture. Attached are the .blend file and related texture images. Any help is appreciated, thanks in advance.
08 January 2016 10:35
I've just figured out that the material for UV texture contains another Musgrave texture, which is currently not supported by Blend4web, the UV texture being rendered normally when the Musgrave texture is being disabled, but I still can't find a good workaround for making the tile texture being rendered just like the way that cube projection does.
08 January 2016 15:56
I don't completely understand your issue, but one thing I noticed is that your UV map had not been specified in your Texture settings. It seems this isn't the only problem though, because it still isn't rendering, even after I selected your UV map.
09 January 2016 10:28
Thanks for your help. I've solved the problem of UV mapping. I used an old method of assigning UV to material by enabling the "Face Texture" option, instead of adding UV image as a texture slot. On the other hand, I found that for those materials with UV Map, I need to remove all the unsupported texture types attached to make it works. The only problem now is that I'm still finding a workaround to emulate cube projection for the repeating brick wall textures. I've attached the modified .blend here.

BTW, since version 15.11, it seems that the web player ignores the scale transformation factor of the camera, so the location of those objects parented to the camera will get wrong. I have to reset the scene after upgrading.
13 January 2016 12:22
BTW, since version 15.11, it seems that the web player ignores the scale transformation factor of the camera, so the location of those objects parented to the camera will get wrong. I have to reset the scene after upgrading.

Hi, kychung! Thanks for the report. We've reproduced this bug and will investigate it.

I know that only generated coordinates with flat projection is supported at this moment, but I can't find any workarounds.

The only problem now is that I'm still finding a workaround to emulate cube projection for the repeating brick wall textures.

What coordinates did you try in Blender? And can this effect be achieved by using UV coordinates?
17 January 2016 20:13
Ответ на сообщение пользователя Ivan Lyubovnikov
Hi, kychung! Thanks for the report. We've reproduced this bug and will investigate it.

What coordinates did you try in Blender? And can this effect be achieved by using UV coordinates?

Thanks for your reply. When I'm making the 3D models of buildings with brick walls, I would set texture projection to be "cube". If I can only use "generated" coordinates with "flat" projection, only one face will be rendered properly. In this case using UV instead of repeating texture is not a good idea. I would like to know if there is any other method to produce the same result as using "cube" projection, thanks again for your effort in improving blend4web. I've attached an image for your reference.

21 January 2016 15:20
UV can be repeated, too, if I understood you correctly.
Tell us please little more detailed, why you don't want to use UV coordinates?
21 January 2016 17:25

Ответ на сообщение пользователя Pavel Kotov
UV can be repeated, too, if I understood you correctly.
Tell us please little more detailed, why you don't want to use UV coordinates?

If I use UV coordinates, I need to unwrap and map the mesh in UV Editor, and I need to map again if I edited the mesh.
21 January 2016 19:09
Yes, sadly, UVs are the most stable type of mapping at the end. Still pretty fragile.

There are some ways to do it with tricky methods, if you want, I can show you examples. But those are not that optimized, and I recommend using UV coordinates anyway.
27 January 2016 19:22
Thanks for your reply, then I would use UV coordinates in this moment. I hope other types of projection (say Cube and Cylinder) would be implemented in future releases, thanks for your effort in making blend4web better and better
 
Please register or log in to leave a reply.