Форум

Сообщения, созданные пользователем rajawasimhusain
19 октября 2016 16:28
Nop, It doesn't help.
19 октября 2016 15:52
Hi,
Kindly check the attached zip packet for sample demo. I am trying to create a scene with orthographic camera with size 1280X800. I have used images of same size and found that when I render the scene image gets distorted.

FYI: I have applied scaling factor 8:5:1 to the plane (textured with background image) to make it fit to the screen size 1280X800.

After exporting .json file, you can run demo by
1) double click runServer.bat
2) double click run.html

with regards
Raja W. Husain
18 октября 2016 09:14
Hi,
I found that Blend4Web expects images to be square (preferably power of 2). In real scenario this is not possible say our device is of size 1280X800 then I have to make image for background of size 1280X1280 and same for other images, which will increase assets size and thus GPU load at run time.

Kindly suggest whether in future Blend4Web will support rectangular images.

with regards
Raja W. Husain
18 октября 2016 09:07
Hi,
OK, so for 3) Idea is that

1) We have few buttons in the scene (textured Plane with hit testable property enabled) e.g. button_1, button_2, button_3.

2) We have some object(s) in scene, say cube which will animate to different transformations (position, rotation and scale) for each button click.

3) When user click button_1 cube will transform from default transformations_def (position_def, rotation_def, scale_def) to transformations_1 (position_1, rotation_1, scale_1) with some duration say 1 second.

4) If User click button_2 then cube will transform from it's current transformations to transformations_2 (position_2, rotation_2, scale_2) with some duration say 1 second and so on.

5) Here if user click button_2 or button_3 while object is still animating then application won't respond. This is not desirable.
What I want is even if object is animating, application should respond to mouse click for button_2 and button_3 and stop current animation and start new animation i.e. transformation_current to transformation_2.

kindly suggest whether this scenario is possible with blend4web with minimal effort.

with regards
Raja W. Husain
18 октября 2016 08:49
Thanks a lot!!!
17 октября 2016 17:30
Hi,

1) I am trying to animate an object (cube, plane etc.) when user hit some objects in scene say some buttons.
To achieve that I created Logic editor and add "Transform Object" when user hit some button with duration "1" second. I observed that application doesn't respond to mouse click when this transformation is going on. Application respond only when duration of 1 second is over.

Kindly suggest whether this is normal behavior or not and how to bypass it. I want user should be able to hit as many buttons as possible whether transformation is going on or not.

2) I haven't used any timeline or animation to achieve this effect. Kindly suggest if I create timeline/animation and use it to animate object for any mouse touch then during animation will application be responsive.

3) I want to create some animation in such a way that if user hit some other button then current animation/transformation should immediately come to END and start new animation/transformation.

Kindly suggest whether it's possible with Logic editor?

with regards
Raja W. Husain
17 октября 2016 13:05
Hi,
Thanks for quick reply.

I am not sure whether I asked you the right question and I am bit confused as I read in blend4web manual document b4w_manual_en.pdf page 12 that Blend4Web support GLSL shader via scripting. On page 402 it's mentioned that support for GLSL 3.0 shaders is available for custom shader.

Or does it mean that GLSL shaders are used by Blend4Web engine internally and users are supposed to access them via Node Editor only.

with regards
Raja W. Husain
14 октября 2016 16:30
Hi,
Thank you very much for quick reply.

Sometimes we need to write custom shaders e.g. plasma shader or something else which can't be achieved using Node Editor all the times. I assume in Blend4Web there must be some ways especially via "scripting" to use custom hand written vertex/fragment shader.

Could you please explain how to apply custom shader to any object e.g. cube or plane via scripting as I could not find any example or tutorial for that.

I assume I need to use some APIs for that (set_material_params etc.) but not sure how to use them for fragment shader.

with regards
Raja W. Husain
14 октября 2016 15:31
Hi,
Kindly suggest how to write and apply custom OpenGLES shader (vertex, fragment) for any object e.g. cube or plane.

with regards
Raja W. Husain