论坛

由用户创建的信息 Evgeny Rodygin
29 May 2015 11:06
Well, as you probably know, Blend4Web offers two types of export:
1) HTML, which, I assume, you have already been using.
2) JSON + bin which is used for more serious tasks where some customization or coding is required.
When you say application do you mean Blender?
Here I speak about a Browser application which uses exported JSON and Blend4Web engine. This approach allows reducing the size and performance requirements when LOW-quality is chosen.

The little spinet at the link will that convert my PNG/JPG to DDS or do I have to actually do something else?
As it is written in documentation, when you have prepared dds or min50 textures, you need to pass assets_dds_available: true and assets_min50_available: true, params to the application init() function.
If you are under Linux, you can convert textures using converter.py script. Under Mac some dependencies should be installed. Under Windows some third-party soft have to be used. For example, Nvidia Photoshop plugin.

Min50 textures could be received by just scaling your image to the factor of 0.5 from the original size in any graphics software.

Summarizing. As HTML-exporter is very limited in its possibilities, you need to use JSON-exporter and a bit of coding will be required for this task.
28 May 2015 11:42

Ответ на сообщение пользователя mcolinp
Just a head's up . . .

I am not sure what is causing it; but it seems if I leave the Blog Announcement for 15.05 open in Firefox; it crashes the browser. This happens even if the browser is running in the background. Not sure if it were the Glow demo that was embedded; but that would be my first guess . . .
Could you please describe your configuration? What OS and GPU do you use?

[EDIT]
I wasn't able to reproduce this neither on Linux, nor on Windows, nor on Mac with the latest Firefox. What is your Firefox version?
28 May 2015 10:39
Hi,

Currently, we have performance profiles which can be switched during application initialization. Based on this, application will choose whether to use high quality textures & postprocessing or not. You can read more about it in this section. So, when the low quality is chosen - the low-resolution textures are uploaded and less data is send to the user.

Is it appropriate for your needs?
27 May 2015 12:11
Ответ на сообщение пользователя Perrishnikov
Alright. I've managed to get a demo up and running using the .json export.

A few issues:
I can get the demo to run through the "canvas3d" div, but I haven't been able to resize or reposition the canvas in the webpage. So I tried using the webplayer, and I managed to use an iframe and resize and position it where I want it, but the problem here is that the camera flies around the scene as opposed to walking on the ground (worked as intended in the div).

What do I need to do to both scenarios to get them to operate as intended?

Thanks!
You can match the size of the canvas to its container by calling m_app.resize_to_container() function. The other option is to send the following parameter to the m_app.init() function:
m_app.init({
...
    autoresize: true,
...
});

Then you can set the proper size of the canvas container and the canvas will change its size.
For positioning the canvas you can use such html-properties as "margin-left, margin-top" etc. And don't forget to set position: relative in the canvas-container style.
22 May 2015 11:14
…there are a few frames before and after making the animation
It is not absolutely clear to me, which frames are you talking about. B4W baker generally creates an animation with the same length as the original animation. So, it is basing on its frames and if there are "extra frames" in original one, they will also be present in the baked one. Am I missing something?
21 May 2015 11:08
Ответ на сообщение пользователя trepaning
the annotations were not in that file, it was all about the hotlinks, which work perfectly fine as is prior to the recent update of B4W. Annotations were removed to isolate hotlink issues. Will test later but initial quick test of removing the lines suggested does not fix the issue of non-working hotlinks.
Ah. Yes. I forgot to mention that there is no colopicking enabled (which console also tells us about). You need to set Enable Object Selection option to "ON" in the dyn_load_pos scene settings.
21 May 2015 11:01
Ответ на сообщение пользователя Perrishnikov
I use the B4W export to HTML. I tried the JSON export to Viewer and was able to navigate the scene through flying.

I've played around with it some more, and I still cant get the keyboard controls to work in localhost with the default firstperson tutorial.
Well. HTML is not an option to use here. It even doesn't support physics. I'd recommend reading this tutorial for better understanding of what export options does Blend4Web offer.

The Firstperson example (and any other example) is kinda a standalone application and it have all the required files in its sub-directory: blend4web/deploy/tutorials/examples/firstperson. Thus, after updating the current scene, you need to reexport it to this folder, replacing existing first-person.json. Then, you can check the result by running example.html in your browser.
Don't forget to allow browser to open local resources: Link with description
20 May 2015 11:20
Ответ на сообщение пользователя Perrishnikov
Thanks. Your_text_here
I checked this scene. Everything works fine for me. There were definitely some more issues with your example. How do you perform export? Probably, you use "HTML Export" instead of typical "B4W export"?
20 May 2015 11:14

Ответ на сообщение пользователя trepaning
I emailed a minified version of the store, noting the hotlinks do not work, all was exported with recent release of B4W
Honestly, I was not able to find anything related to annotations in any attached blend-file.

[EDIT]
About hotlinks. You have placed a code which generates errors before the one which operates the hotlinks.
You need to remove lines like this:
var hr111MoleTraps = m_scenes.get_object_by_name("hr111MoleTraps");

from main_canvas_click function.
Btw. Console tells everything in this case.
19 May 2015 12:41
Could you please provide us with modified blend-file? We will be able to check what is the problem this way.