Forum

Blend4Web Usage

29 September 2015 16:08 #4127
Hi,

I'm new to Blend4Web or Blender.
I had a requirement to create a scene, for example a room, in which i have multiple photos on the walls, like a gallery. i did it using 3dMax.

Now the requirement has changed they want to modify the images on the final rendered animation.
So that's why i'm planning to move to Blend4Web.
Can i use Blend4Web to send Request throw the API to modify images on the existing animation?
Can i upload images and send it as a Stream to the server in order to modify an image?

Thanks & Regards,
Dany


29 September 2015 16:54 #4129
Hello and welcome to the forum!

I had a requirement to create a scene, for example a room, in which i have multiple photos on the walls

Take a look at this tread, please. In it our user has created the room with photos on the walls.

Can i use Blend4Web to send Request throw the API to modify images on the existing animation?
Yes, you can do it by using a canvas texture. Here is the example.


Can i upload images and send it as a Stream to the server in order to modify an image?

You can conver the image to base64 encoded string and send it to a server.
Blend4Web developer
29 September 2015 21:29 #4139
Hi Roman,

Thanks for the reply.
I'll check it and get back to you in case i need help.

Regards,
Dany
01 October 2015 18:03 #4180
Hi Roman,

Sorry for bothering you, but i need to make sure that i got your point.

i checked the existing demo in the first article you sent me:
link

My question is: once the demo is exported to html, can i dynamically modify the images on the final Render ( for example the image on the wall in the above demo)?
Not only with predefined images, can i use the API, to do web service calls in order to modify a Texture ?
If yes can you please point me in the right direction with a little tutorial or example.

Cause if yes i will take the decision to move to Blender, if not i need to find another solution.

Thanks in advance,
Dany


02 October 2015 10:00 #4192
Hi.

My question is: once the demo is exported to html, can i dynamically modify the images on the final Render ( for example the image on the wall in the above demo)?

No, you can not. HTML-export creates finished file. You should use the .json-export for your purpose.


Not only with predefined images, can i use the API, to do web service calls in order to modify a Texture ?
If yes can you please point me in the right direction with a little tutorial or example.

The example will be in a while
Blend4Web developer
02 October 2015 13:51 #4195
Thanks Roman, waiting for your example.
05 October 2015 10:29 #4219
Hi.
Sorry for waiting.
Here is the example.
It uses base64 encoded images. You can get new image from server and draw it in the textures in your application.

Blend4Web developer
05 October 2015 16:24 #4234
Hi Roman,

I have an issue working with the JSON file, after exporting it.
i exported the sample cube, the one created by default when you open Blender.

i followed the example provided in the Blend4Web.User Manual, in the "For Application Developers" section.
But no luck, i keep getting a blank web page, although it works when i export it to html, i can see the cube.

Attached is snapshot of the directory where i created the html file, along with the blend file, and the html.
I'm using: Blender 2.78 with b4w sdk version: 15.09


Thanks for your help.

Kind Regards,
Dany
05 October 2015 17:20 #4235

But no luck, i keep getting a blank web page, although it works when i export it to html, i can see the cube.

You need to set up your browser for loading local resources. Also you can use local server from SDK. You can read about it in doc: https://www.blend4web.com/doc/en/developers.html#browser-for-local-loading
Blend4Web developer
05 October 2015 17:23 #4236
Also, please, take a look at this article. It's about a simple application creation.
Blend4Web developer
 
Please register or log in to leave a reply.