question

Fiona Kattenstroth avatar image
0 Likes"
Fiona Kattenstroth asked Phil BoBo commented

Problems with the webserver

I tried to use the webserver with the WebGL-mode for multiple things. Thereby some problems occured, which can be seen in the attached model.

1. 2D backgrounds laying in a plane are not displayed

2. The old conveyors aren't shown either

3. CAD layouts in .dwg or .dae format aren't displayed

4. The "Date and Time Display" in a dashboard cannot be displayed the right way

5. Eventhough the run time is selected as Date and Time, as soon as the model runs, the display switches to seconds. The same problem happens with the run speed. If I change it by code, the display won't switch, but the model recognizes the "new speed". This should be a display error.

6. Using a checkbox is critical, because the user cannot see the right state of the box. This should be a display error as well, because the model on the server acts the right way.

7. Moreover it appears that even hidden objects do have an impact on the performance, don't they?

8. Sometimes it's necessary to have text fields in the 3D-model, but they also harm the performance. Is there any way to include them without impairing the performance badly?

Hopefully some of you know the problems and can help. Thank you in advance

20201113_webserver test_2.fsm

FlexSim 20.2.2
flexsim 20.2.2webserverwebkit
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo commented

When streaming the 3D view using WebGL instead of video, the mesh data of the objects in your model is sent to the client device to be rendered in the browser. Depending on the model’s configuration, certain rendering techniques will either not work correctly in this manner or have serious performance considerations. When building a model to be used with WebGL Streaming, you should take care to optimize how it is configured to minimize the amount of data sent each update frame. If you can send mesh data once and then render it multiple times on the client-side, it will perform better than if you must keep re-sending a large amount of data each update.

When using the Mesh API, the last parameter when initializing a mesh is a set of flags. One of those flags (MESH_DYNAMIC_DRAW), signals a usage hint to the graphics card that the data store contents will be modified repeatedly and used many times. This hint enables the graphics driver to store that data in memory that is optimized for that kind of usage. When using WebGL Streaming with the WebServer, when this flag is used on a mesh, FlexSim will skip that mesh instead of streaming it to the client every frame. This optimization will cause certain meshes to simply not draw instead of making the system unusably slow.

1. The Visual Tool Plane display mode rebuilds its mesh every draw frame, dynamically setting its size and texture coordinates. Because it uses the MESH_DYNAMIC_DRAW flag, it does not stream using WebGL. To render a plane with WebGL, use the Imported Shape visual display mode with the included shape FlexSim\fs3d\General\Plane.3ds. Because Visual Tool Planes are used so commonly, perhaps we should update how it is rendered to not be so dynamic. I’ll add a case to the dev list.

2. The Legacy Conveyors are deprecated and no longer actively supported. They use old rendering techniques that rebuild their meshes every draw frame and are purposefully not streamed using WebGL.

3. The DWG renderer is a custom third-party renderer that controls its own view frustum and occlusion clipping planes using deprecated OpenGL functions. Consequently, DWG files do not work with WebGL Streaming. They also don’t work with a Core Profile OpenGL Context, stereoscopic 3D, VR, or RTX Mode.

4. The Date and Time Display looks like a bug. I’ll add a case to the dev list to look into this.

5. The display switching back to seconds also looks like a bug. I’ll add a case to the dev list.

As for programmatically changing the run speed on the server using FlexScript without explicitly updating that slider widget on the client browser, I’m not surprised that it doesn’t update. Unless something on that web page is querying the server to get the model runspeed and set the state of the slider, it isn’t going to update. I’m not sure whether the default page of the WebServer even tries to do that, but I’ll add a note to the dev list to look into it.

6. This checkbox appears to be linked correctly, so I’m not sure why its state isn’t updated by the dashboard. You can see the queries on the webserver output window that are used to update the dashboard data, so this is probably designed to work. I’ll add a case to the dev list to look into it.

7. That depends on what you mean by “hidden objects” and “performance.” The rendering pipeline is a complex system with many interacting variables. Depending on your configuration and where the system is being constrained, different things may be causing bottlenecks and performance issues. Without specifics, this question can’t be answered specifically one way or the other.

8. 3D Text is displayed with cached meshes for each character. If you are not modifying the text often, then those meshes should stream just fine and then be rendered fine on the client browser. If the text is constantly changing, then it will need to constantly re-stream that data, and adversely affect the performance. I wouldn’t suggest using dynamically changing 3D text with WebGL Streaming.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.