论坛

由用户创建的信息 LoicNorgeot
12 January 2018 17:30
Anyway, dynamic geometry API is one of the most important targets for our engine. And we are going to significantly improve the engine in this area
Good to know!

Thank you for the input on this topic, "case closed" for me!
11 January 2018 20:34
Hello Alexander, and thank you very much for your fast answer!

Disclaimer: By saying that I was not happy, I was of course saying that I was sad, not unhappy with blend4web of course!

By exponentialy I meant "drastically" (even is a factor of 3 or 4 on vertex attributes is still not a factor 100, but starts to impact quite a bit loading times and memory usage on large meshes), but thank you for the precision though.

For my application, a pure flat shading is exactly what I am looking for as the objects do not necessarily have additional normal information. Judging by your answer, I deduce that there is no "straightforward" way to obtain a flat shading with dynamic geometry, and will therefore stick to triangle separation for the time being.

However, if the other ways to implement this feature work quite the same and won't significantly improve the performances, I'm perfectly fine with this approach .

IMHO, I think that this functionnality could mainly be useful for model viewers or equivalent apps, which should not require normal editing I guess, and would therefore vote for an additional parameter in the override_geometry method… My 2 cents .

Thank you anyway for your help!
10 January 2018 20:33
Hello Blend4Web guys, and thumbs up for the good work with blend4web!

context
I am prototyping an online model viewer for 3D meshes in an exotic format (which is used in my university for running simulations, and based on which the lab I work in has developed a few codes).

To do so, I just have created a blender scene with my desired render options, and load the user object on runtime by parsing the user file and overriding an existing cube (set to flat shading) geometry (using IBOs and VBOs, which are the natural structure for our 3D file format).

So far so good…

problem
However, the meshes I load that way are automatically "smoothed", although I don't provide any normal buffer, and I would like to be able to have a flat shading by default in my app (mechanical pieces, performance reasons, ease of coding…).

how I deal with it
I manage to do so with creating new IBO and VBO by extracting the 3 vertices for every triangle of my mesh, computing the triangle normal, and storing the same computed normal for each vertex of every face.
This low level approach is quite tedious, and some apps I may develop could use other vertex information (simulation results which might be 3d vectors for instance…).

The scene object which geometry is overridden is a simple cube, which is set to flat shading before the export.
I saw in an other post (june 2016) that this seems to be the classic method for shapekeys.

why I am not happy
Although this method works, it makes the code way more complicated, the memory usage exponentially increases, and the computing time (which is a trouble here, since the objects used for numerical simulation can be quite heavy - 100k+ faces - as they often are unstructured triangular meshes) at the same time…

help needed!
After this long explanation (probably for nothing), here comes my question:
Is there a way to use the override_geometry method with indexed IBOs and corresponding VBOs, and still benefit from a flat shading? (playing on the "smooth_normals" parameter does not fix the problem)

Thank you in advance for any help!
26 August 2016 12:51
Thanks Kirill for your fast answer, and good to know that this is a known behavior!

I shall test the new version in the coming days, and will sure let you know if something goes wrong.

Thanks again!
24 August 2016 02:49
Hello everyone.

First of all, thanks to the team of blend4web, I am just starting to discover your amazing job but it might become a great way for me to showcase different 3d works on the web…

This "bug report" might be irrelevant in some way, but it seems that Cm browser on Android (Samsung a5 2016 at least) does not support correctly blend4web. The scenes are loading fine, but there is a huge flickering when viewing even simple scenes. It seems like I was using an active stereo rendering with the frames switching between left and right, although no such option is specified in my blend file…

Is this a bug known of someone, or might someone confirm me the behavior on their own device (not really sure about webgl support on this browser though…).

Thanks for any opinion or answer on the matter!

Regards,
Loïc.