Forum

Blend4Web Usage

14 October 2015 22:21 #4394
Hi Roman,

Thanks for the example.
The JSON file is now working, but the resolution is very low, everything is blurry, how can i boost the resolution?
in addition all the objects are misplaced and the scale is different, although it's looking great in blender.

I have attached my blender file along with the texture files, can you please tell me what i am doing wrong, please note that the scene is imported from 3dmax as .obj and textures are re-applied.

Regarding the image modification, the Canvas example is perfect, and for image modification i can make a simple web application using java with a simple GUI, that modifies the images in the background.


Thanks & Regards,
Dany
15 October 2015 10:38 #4403
Hello.

This behavior is a shortcoming of export between two different 3D-editors. You shouldn't use 3dmax features in your file, if you want to export it to Blender. Also you shouldn't use procedural modifiers of objects.
The B4W supports only uniform scale. You should apply scale to all objects, that have non-uniform scale (ctrl + a in Blender).
I've changed camera depth of field property, and applied scale to some objects.
3dMusuem.html
Interactive 3D Museum.zip
Blend4Web developer
15 October 2015 21:01 #4418
Thanks Roman, it looks amazing, i will try to work on the rest of the scale.

Thanks again,
Dany
16 October 2015 09:50 #4430
Also, please, take a look at the texture image mapping.

You can read about it in our doc.

Also take a look at the material settings.
Blend4Web developer
19 October 2015 17:41 #4486
Hi Roman,

This is John, I work with Dany on the same project. Thanks for your help so far, really appreciated :)

Referring to your last comments about the texture. The walls are one big box object that have the same texture and it is set to Repeat under "Image Mapping". In fact, all textures images mapping for the Floor and Marble Border are set to repeat (see repeat.jpg).

When we run the exported JSON file in the Viewer, we get some part of the Walls, Floor and Marble Border texture rendering properly and some parts not. (see 3DMuseum-JSON.jpg). When we render the image by pressing F12, all textures load properly (see 3DMuseum-Blender-Render.jpg).

Is there any extra setting we need to adjust to get the texture rendering properly for web?

Thanks for your help in advance.
John
19 October 2015 18:57 #4489
Ответ на сообщение пользователя John
Hi Roman,

This is John, I work with Dany on the same project. Thanks for your help so far, really appreciated :)

Referring to your last comments about the texture. The walls are one big box object that have the same texture and it is set to Repeat under "Image Mapping". In fact, all textures images mapping for the Floor and Marble Border are set to repeat (see repeat.jpg).

When we run the exported JSON file in the Viewer, we get some part of the Walls, Floor and Marble Border texture rendering properly and some parts not. (see 3DMuseum-JSON.jpg). When we render the image by pressing F12, all textures load properly (see 3DMuseum-Blender-Render.jpg).

Is there any extra setting we need to adjust to get the texture rendering properly for web?

Thanks for your help in advance.
John
Hello and welcome to the forum John!

I suppose, you use textures which have dimensions not equal to power of 2 (4, 8 ,16, 64, 128, 256 etc). We call such textures NPOT. WebGL doesn't support tiling for this type of images. So you need to modify them to be POT.
This is an old problem and we are happy to say that it was recently solved by us and the a fix will be included into the 15.10 release later this month
Blend4Web developer
19 October 2015 21:45 #4493
Thanks for your reply Evgeny,

I guess we can wait till end of the month for the 15.10 release.

In the meantime, can you link to a resource that explains how to convert textures from NPOT to POT or how to use POT textures?

Thanks,
John
20 October 2015 02:44 #4494
POT means Power of Two dimensions. NPOT is Not Power of Two.
To convert an image that has dimensions that are NPOT, use your favorite image editor to re-size it.
For example an image the was 500 X 500 would be NPOT, you could change the dimensions to 512 X 512 and it would be POT.
The power of two numbers can be found by starting with 2 and doubling it. 2, 4, 8, 16, 32, 64, 128, 512, 1028 etc.
So an image that was 512 X 1028 would be good.
~Will
Blend4Web Videos
https://www.youtube.com/channel/UCp6x8JP7oCiiTjbJorPPMsQ/videos
20 October 2015 08:58 #4496
Thanks Will, that was really helpful.
John
21 October 2015 10:43 #4514
Hi,

When applying the canvas texture sometimes the image is repeated in tiles, 4 times on the canvas, even though the resolution of the image is big enough.
Can you tell me please if i'm missing some configuration, basically i followed the following example: https://www.blend4web.com/doc/en/textures.html#index-12

Attached is a snapshot of the result.

Thanks & Regards,
Dany
 
Please register or log in to leave a reply.