TTriSurface hardware accelaration

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Thu Aug 03, 2023 9:22 am

Hello,

I'm trying to represent a real-time curving substrate in 3D.
My goal is to offload most of the heavy-lifting onto a GPU.
To do so, I have put together a TTriSurface in a TChart within a demo project you'll find attached.
The rendering speed of my demo application is improvable (maximum 20 FPS on my machine).

How can I ensure effective hardware acceleration ?

Below are some items that stood out to me :
- In VCLTee, the OpenGL module achieves my requirements, but it isn't supported in FMXTee.
- Enabling global Skia4Delphi usage, TChart canvases seem to default to GLCanvas (supposedly an OpenGL canvas). Nevertheless, it doesn't seem to use the GPU out of the box.
- The base TChart canvas (D2DCanvas) doesn't seem to offload 3D rendering onto the GPU.

Below is my configuration:
Software:
- Embarcadero Delphi 11.3 version 28.0.48361.3236.
- TeeChart FMX Pro with source : Build 2023.38.230607.
- Skia4Delphi version 5.0.0.

Hardware :
- Intel Iris Xe graphics GPU (vPro i7 laptop CPU)
- Nvidia T550 Laptop GPU


Thanks in advance for your help.

Have a nice day.

Regards,

Gabriel A. TAOUSSI
Attachments
ImprovableTriSurface.zip
(7.51 KiB) Downloaded 2322 times

Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Mon Aug 07, 2023 8:06 am

Greetings,

To demonstrate the performance I'm looking for, please find attached a project based on VCLTee I have assembled :
AcceptableTriSurface.zip
TriSurface with satisfying rendering speed and GPU usage
(7.5 KiB) Downloaded 2345 times

I believe FMXTee's Chart3D holds the answer to my question. It does seem to support hardware acceleration out of the box.
Unfortunately, within a Chart3D, trisurfaces don't render at all on my machine.
In the attachments, you'll find another project to illustrate this, here is its output on my machine :
TriSurfaceInChart3D.zip
Trisurface in Chart3D project attempt
(7.18 KiB) Downloaded 2342 times
Shy TriSurface.png
TriSurface won't render
Shy TriSurface.png (55.88 KiB) Viewed 60252 times

Any idea what I might be missing ?

Have a great day.

Regards,

Gabriel A. TAOUSSI

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TTriSurface hardware accelaration

Post by Yeray » Fri Aug 25, 2023 6:47 am

Hello Gabriel,

Sorry for the delayed reply here.

This is just to confirm only these environments use the GPU:
- VCL + OpenGL
- FMX + TChart3D

We are still experimenting with Skia canvas.
Gabriel, A. TAOUSSI wrote:
Mon Aug 07, 2023 8:06 am
Unfortunately, within a Chart3D, trisurfaces don't render at all on my machine.
We'll take a look at that.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Thu Oct 05, 2023 9:19 am

Hello Yeray,

Thank you for the reply. I have been busy on other fronts as well.

Have you been able to reproduce the TTriSurface absence of rendering within FMX Chart3D ?


In the meantime, I had to move forward with my back-end development, among others. To do this, I wrapped a VCLTee Chart3D in a DLL for temporary use with my FMX application.

As demonstrated with the attached project below, it turns out VCLTee's TTriSurface only performs well with no new sample values filled :
NotSoAcceptableTriSurface.zip
When TTriSurface values are modified, the rendering performance decreases cripplingly.
(95.34 KiB) Downloaded 1996 times

This prevented me from directly feeding my non-regular grid data. Instead, I had to interpolate my data to a regular grid and use a TSurface, removing TTriSurfaces altogether:

Sample result - Trim.gif
Costly temporary workaround: lacks the top-tier looks of a TTriSurface.
Sample result - Trim.gif (316.58 KiB) Viewed 43058 times

With my back-end validated, I have to admit the front-end is turning into a liability. This is because:
- I am using a VCL DLL
- The resulting 3D is far from crisp
- The cost of interpolating into a regular grid is unreasonable.

Do you think real-time TTriSurface plotting is doable with FMX TeeChart ?

Thanks for your help.

Have a great day.

Regards,

Gabriel A. TAOUSSI

Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Mon Oct 30, 2023 2:41 pm

Hello Yeray,
Yeray wrote:
Fri Aug 25, 2023 6:47 am
Gabriel, A. TAOUSSI wrote:
Mon Aug 07, 2023 8:06 am
Unfortunately, within a Chart3D, trisurfaces don't render at all on my machine.
We'll take a look at that.
Have you had time to look into this ?

Is there a real-time plotting implementation example with FMX TTriSurface usage ?

Best regards,

Gabriel, A. TAOUSSI

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TTriSurface hardware accelaration

Post by Yeray » Tue Oct 31, 2023 10:12 am

Hello,

We appreciate your patience and your willingness to work with us on this.
After investigating it, it pains us to admit that we haven't yet identified a clear-cut solution here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Thu Nov 02, 2023 9:42 am

Hello Yeray,

It's the least I can do for our developper community.
Thank you for your availability and your transparency.

To help prioritize and reproduce this issue, would you mind me filing a bug report ?

Best regards,

Gabriel, A. TAOUSSI

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TTriSurface hardware accelaration

Post by Yeray » Thu Nov 02, 2023 9:53 am

Hello,
Gabriel, A. TAOUSSI wrote:
Thu Nov 02, 2023 9:42 am
would you mind me filing a bug report ?
Of course, feel free to do so at bugzilla.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

David Berneda
Site Admin
Site Admin
Posts: 83
Joined: Wed Nov 12, 2003 5:00 am
Location: Girona, Catalonia
Contact:

Re: TTriSurface hardware accelaration

Post by David Berneda » Fri Nov 03, 2023 7:31 am


Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Fri Nov 03, 2023 2:50 pm

Hi David,

Thank you for your initiative and for your time.

As it touched two different subjects, this thread is a little convoluted.
The bug is about FMX TTriSurfaces not rendering within a chart3D. The relevant project is TriSurfaceInChart3D.zip :
TriSurfaceInChart3D.zip
(7.18 KiB) Downloaded 1727 times

Here’s a description and test plan for bug 2644 :
Description :
Within an FMX Chart3D, TTriSurface objects don't render.

Software configuration :
- Embarcadero Delphi 11.3 version 28.0.48361.3236.
- TeeChart FMX Pro with source : Build 2023.38.230607.
- Skia4Delphi version 5.0.0.

Hardware configuration :
- Intel Iris Xe graphics GPU (vPro i7 laptop CPU)
- Nvidia T550 Laptop GPUD

Test plan :
1 - Unzip, build and launch the project in 64-bit release mode.
2 - Click the upper left side "3D editor" button.
3 - Within the newly opened window, select the Series group in the left side treeview.
4 - Make sure Series1 is listed while TTriSurface doesn’t render in the Chart3D.

Can you please update bug 2644 ?
Please note that the TeeChart software version has been specified.
Please also note that this is not an enhancement, rather an anomaly resolution.

Thank you again for your help.

Regards,

Gabriel A. TAOUSSI

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TTriSurface hardware accelaration

Post by Yeray » Sat Nov 04, 2023 9:57 am

Hello Gabriel,

I've just added your comments and project to the ticket.
Thanks for the update.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Gabriel, A. TAOUSSI
Newbie
Newbie
Posts: 7
Joined: Thu Nov 03, 2022 12:00 am

Re: TTriSurface hardware accelaration

Post by Gabriel, A. TAOUSSI » Mon Nov 06, 2023 9:34 am

Hello Yeray,

Thank you for your patience.

Let me know if I can help with possible tests.

Have a great day.

Regards,

Gabriel, A. TAOUSSI

Post Reply