GPGPU (OpenCL) rendering for Fusion 360

GPGPU (OpenCL) rendering for Fusion 360

O.Tan
Advisor Advisor
6,502 Views
20 Replies
Message 1 of 21

GPGPU (OpenCL) rendering for Fusion 360

O.Tan
Advisor
Advisor

Hi,

 

rendering.png

 

So just did some rendering and pretty much confirmed that right now F360 only makes use of CPU during rendering. Though this is not forcing F360 team to implement OpenCL rendering, but I'm curious why is it till today, very few renderers make use of the GPU as well?

 

I know Octane uses CUDA, V-Ray uses OpenCL and they're some more GPU based renderer, but we're near 2015 and the number of GPGPU based renderer is really low. So what seem to be the reason why developers are not making use of OpenCL (preferred as it's non tied to Nvidia cards only) or CUDA? 

 

I've used softwares like FinalCutProX and CaptureOnePro 8 which makes use of OpenCL and the speed improvements is really noticeable. 

 

Just a general discussion.

 



Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

6,503 Views
20 Replies
Replies (20)
Message 2 of 21

O.Tan
Advisor
Advisor

Also, from this thread http://forums.autodesk.com/t5/sketching-sculpting-modeling-and/f360-graphic-performance-could-be-imp... we know that F360 viewport uses GPU, but I wonder if the effects is calculated by the CPU? And if it is, could OpenCL help improve the calculation speed?

 

Cause my AMD system monitor seem to say so, as when I rotate the model, my GPU only uses 30% whereas my CPU is showing a 90% usage on all cores. 



Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

0 Likes
Message 3 of 21

chengyun.yang
Alumni
Alumni

Hi O.Tan,

 

The General Purpose GPU(GPGPU) is a very interesting topic. Traditionally, when one 3D renderer uses the GPU to do the rendering acceleration, it does so through the 3D graphics API(DirectX or OpenGL), which is specifically designed for the graphics rendering acceleration and is well supported by OS and GPU drivers. At the moment, Fusion is also mainly using this way to access the GPU for its graphics rendering. However, as you indicated, the modern GPU has becoming much more powerful(especially its highly parallel float point computing capability) and people have begun to use it to do some high performance computing(HPC) and other general purpose non-graphics computing. To facilitate the general purpose programming on these GPUs, different GPU vendors have developed different APIs for their own GPU hardware(For example, for nVidia, its API model is CUDA) and soon one common GPGPU API(OpenCL) was initiated and developed by Apple and is now supported by both nVidia and AMD as a standard way to access GPU for the general purpose computing. As you said, we have been seeing quite some softwares which use the GPGPU API to boost its performance. Typically these softwares take advantage of GPGPU to do some highly parallel computing. For example, some Autodesk simulation softwares are doing the simulation computation using GPGPU API and as mentioned in your post, VRay is using it to acclelerate its ray tracing computation. But as far as I know, it is still not very common that these GPGPU APIs like OpenCL are used a lot for the 3D graphics hardware rendering. For 3D graphics rendering, the 3D API is still the main stream. 

 

In the meantime, for the traditional 3D graphics APIs(DirectX and OpenGL), some enhancements have also been made in them in the past several years for the 3D applications to take advantage of GPU capability better. One example is both DirectX and OpenGL have now supported a new "compute" shader, in which the application can do something beyond the realistic rendering, like NURBS evaluation or line stylization. 

 

On Fusion side, we do have some plans to try to push the GPU usage to the next level. As I said in another thread, Fusion is looking into how to do the tessellation on GPU to improve the performance of faceting. Since this improvement involves some close collaboration with the modeling kernel team, this improvement will take time and may not be ready in the short term. Ultimately this will greatly improve the graphics rendering performance in Fusion. 

 

Thanks

Chengyun

0 Likes
Message 4 of 21

cekuhnen
Mentor
Mentor
I since years do not use the CPU for rendering anymore because of the slow performance it offers. Any decent 400 $ gaming card outperforms a modern CPU easily. The only problem sofar was VRAM.

And I could see in Fusion with highly complex models there maybe be a problem, but I just ordered my new card which has 4 GB VRam so I do not assume I will see any problems.

openCL as great as it sounds to me sofar was a major let down. AMDs drivers are horrible. And NVIDIA with CUDA delivered a performance unmatched by anybody else.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 5 of 21

O.Tan
Advisor
Advisor
Thanks for the response, but I'm curious, is the graphic effects in F360 (ambient, wireframe and etc) is it calculated via the GPU or CPU? Cause I noticed when I rotate the model, my CPU spiked up tremendously but not my GPU.


Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

0 Likes
Message 6 of 21

cekuhnen
Mentor
Mentor
from a previous discussion I know this:

CPU is used to obviously mesh the cad data
GPU takes care of the shading

so maybe the meshing or UI is what makes your CPU spike.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 7 of 21

chengyun.yang
Alumni
Alumni

Yes. That is right. The mesh data is still generated on CPU side. The shading is done in GPU.

 

Typically the rendering performance is determined by:

 

(1). How fast can an app prepare the graphics data and send the data and the draw calls to GPU?

(2). How fast can GPU handle these draw calls? 

 

For a small and middle size model, usually (1) is not a problem and (2) could be a problem for the low end graphics cards. But for a complex model with thousands of bodies, (1) could be a big problem. Because of this reason, one of the most important performance optimization strategies is to try to cache the graphics data as much as possible in GPU to avoid the data transferring cost from CPU to GPU. However, as you can see, this will place a big burden on the GPU video memory. 

 

Another important performance optimization strategy for large model is to try to consolidate the small objects into a bigger one so instead of issueing 10 draws for 10 small objects, we just issue one draw for one bigger object. This strategy is very useful for a Viewer only app since once the data is consolidated, it is always intact and can be easily cached in GPU video memory. But this could be a problem for a modeling app because the data can be changed by various modeling commands, which makes the cost to do the consolidation is high. 

 

The rendering of visual effects involves both CPU and GPU. For example, to render the ground shadow, we need to render the shadow map first in one pass and then render the scene in the second pass with the shadow map. In both passes, we need to traverse the scene to collect the graphics data on CPU and send to GPU. 

0 Likes
Message 8 of 21

O.Tan
Advisor
Advisor
Forgive me if Im wrong but is it possible to do the calculation of some of the effects in the GPU with OpenCL? So doesnt need to wait for the CPU to send the data.

Cause if we're talking about improving Mac Performance, it's likely Apple will continue to use Iris or Iris Pro GPU in future MacBookPros and tests has shown that Iris Pro GPU seems to beat all other mobile GPUs when it comes to OpenCL related usage. And Apple has shown how much powerful the FCPX on the Late-2013 MacPros (which lead another suspicion on my side that Apple will not use Nvidia cards in the foreseeable future until Nvidia improves their card performance when it comes to OpenCL)


Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

0 Likes
Message 9 of 21

cekuhnen
Mentor
Mentor
I think there are other reasons why they jump between AMD and NVIDIA.
While the design team talked about openCL when they promoted the MacPro
and I think it is true that the AMD cards can be better in this area, drivers were
always a major problem.

I followed the usage of openCL in 3D rendering since years and the current state
is still crippled. I hardly know any engine that makes best use of it - mainly because
of the bad AMD/ATI drivers. And the performance you can get currently with openCL
is weak compared to CUDA.

I think it will take a lot of years before openCL for our area really will take off.
sadly ...

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 10 of 21

TrippyLighting
Consultant
Consultant
Quite honestly I really don't care if F360 rendering is ever going to use the GPU. I'd be much more interested in using external Render engines.
It makes no sense whatsoever to divert developing resources on an area that others have years of research experience and expertise ahead. It would make much more sense to provide a stable and flexible API to support the integration of external render engines, such as Octane, Indigo, Maxwell, Fry Render etc.
As can be seen in that list, I prefer unbiased render engines and my personal choice is Indigo Renderer.

In order to produce any decent rendering, particularlyy with more free form surfaces good UV mapping tools are needed. Otherwise one would again have to go through the painful exercise of exporting some mesh, retopo and then UV map it using yet another application, Blender in my case.

I don't think we'll get anything like the render below out of the F360 internal render engine anytime soon
http://www.arroway-textures.com/en/gallery/rocking-chair-david-haig
Modeled in Blender and rendered with Indigo Renderer.
However, as described above the real pain is having to go back and forth between applications.
The idea for this lamp was initially created in Blender and then rendered in Indigo as well:
https://trippylighting.files.wordpress.com/2014/09/endor_star-00003.jpeg
However, as I don't just render these things but actually make them I am currently redesigning it in F360 by importing the meshes from Blender for the Optics and the white diffuse reflectors. Then in order to verify that the optics and th overall design still create the desired light pattern according to the original idea in Blender I export back from F360 ( I used Geomagic design for previous designs) into Blender and re-render.
It would be of tremendous benefit if I could render that directly from F360. I seriously doubt that I ever can perform this lighting simulation useing the F360 internal renderer.

EESignature

Message 11 of 21

cekuhnen
Mentor
Mentor
I think an internal render engine will help those who hardly do any rendering. While I personally do not like Keyshot and such because they are overpriced toys for convenience in my opinion with a crippled tool set - they still help those who hardly do renderings do somewhat acceptable renderings.

However like you said I also really am disappointed that Fusion till yet has no serous OBJ export. Exporting design via STL is unacceptable.

Currently I export designs as STEP and then obj NGON mesh in MOI for my render engine.
This works but Fusion should offer this natively and is besides Alias the only other software I use that really lacks in mesh exports for rendering.

But also general design TS should export OBJ and not stl. As great TS is, it is just too slow for what I do and other applications just out perform Fusion in the sculpting workflow. And that is ok, because what I can do in Blender or Modo I can bring into TS for finale assembly. But when I start in TS I should be able to export work to a different poly modeler and fix things there and bring it back into TS.

Recently I worked with an interior design student to sculpt a teddy bear and TS tool sets were so limiting we just did it in Blender 10 times faster.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

Message 12 of 21

schneik-adsk
Community Manager
Community Manager

The original question was asking about using GPU languages to accelerate rendering.

Unfortunately many rendering engines are not written to work well with GPUs.  Blender Cycles. Octane and others show that writing dedicated renders for Cuda or OpenCL can provide nice results.  We would have to write two new render's that support these different languages (opencl and cuda) since card vendors can not standardize on one. Plus there are separate graphics pipelines. One is realtime graphics viewport that is used for everyday modeling this uses DirectX and OpenGL depending on platform. Realtime effects like antialiasing and ambient occlusion plus screen resolution effect the performance of realtime graphics.  Then there are scanline, raytrace/pathrace renderers used to generate high quality photo real renderings. This discussion is bouncing between these two topics.

 

The discussion is further complicated because, for some, the quality of realtime graphics is nearing photo real and many pathtracer renders can allow interactive zoom and rotate by dropping the render preview resolution down so that the image is pixelated but provides enough preview to know how the camera is moving.  so these separate pipelines are overlapping for customers needs.

 

 

Things are even more complicated because GPUs can be used for more than graphics. GPUs are being used to calculate math functions like meshing, and simulation. The difficulty is for any GPU baed computing we need to completely rewrite these algorithms. This is also not simple because different generations fo cards are capable of different GPU calculations. Not all cards can do double precision calculations common in CAD design apps. In the end our team has to focus on technologies that provide the best horizontal benefits. To date, dedicating people to opencl or cuda development has not made much sense because we would only be providing the benefit for a subset of users. I wish it was different.

 

The best advice I have to improve relatime interactive graphics performance is the following in priority order:

 

for Windows:

Get the latest driver for your card

On older hardware switch to GirectX 9 in user preferences

 

For Mac's

Run the latest OS X and all its updates

For cards that have older OS X and multiple graphics cards ensure that your graphcs are set to performance mode ( found in power settings)

Be mindful of retina resolutions ( I use SwitchresX to run at non HDPI resolutions) when running any CAD on my Macbook Pro 13 with Iris graphics.

 

Next try each of these options one by one until you get a performance you like

Disable Ambient occlusion and object shadows

Disable antialiasing

Disable the numbers in the layout grid

Disable the floor plane/shadow and reflection

Turn off the layout grid

Run with visible edges off

In preferences, graphics settings ensure you are using the better performance transparency setting

In preferences try setting minimum graphics frame rate to 0 or 99 and decide which works better for your card

Set all selection styles to simple

 

Special note.  Surface models have a big impact on performance. This is something we are working on.  There is a "Special" effect applied to surfaces where the front side (normal) of a surface draws with its material and the back side of the surfaces draws in a mustard yellow. For imported designs with hundreds of surfaces this effect gets very expensive and can cause graphics to bog down a lot.  Hiding surface bodies in the short term will help.  We will be providing a means to disable this special effect to help.

 

 

 

 

 

 

 

Kevin Schneider
Message 13 of 21

cekuhnen
Mentor
Mentor
I think you make some good points and here is my only as an educator and designer.

The build in engine in fusion for 3d realtime rendering is sufficient for the concept development.

The finals render engine is for me useful to make only concept renderings not useful for high end renderings.

While octane users only GPU. Cycles Thea and such have a material system that runs on both CPU and GPU

I think you overlooked somewhat what is possible and where the tend goes to.

Sure many are happy with keyshot I and my design friemda are not. For us it is a toy.


This is why I personally am disappointed that obj export so often was ignored. It is a basic tool to have.

I am not sure if fusion should offer an engine as powerful as what I use. I can see specifically for those who do not so.Mich remdering fusion being enough. I like doing the realtime screen shots and call that enough for the design step.

If you want to push fusion that I really have to ignore keyahot as it is also a slow system. Finale renderings are slow there. The industry might be slow to adapt because they are often very conservative so this for fusion would be a good opportunity to male use of the current refresh research papers as others do.

I think this with a better obj output would provide a better and productive platform.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 14 of 21

cekuhnen
Mentor
Mentor
In general I am very happy with the openGL 3d viewport rendering. Specular bump and such effects work really well.

The raytrace engine however feels very basic.

The interface had bugs
The ui is odd and to nested to access all the functions
I miss materials like fully transparent or emission
The scene design tools are very basic
I cannot let my own hdri file
I cannot save camera positions
I canmot add lights
Nor can I change the camera lens

So I assume that currently the render tool is simply the very basic version of the render system.

I know this is tangent to the original topic but I think for you guys this adds a good understanding of where we come from.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 15 of 21

chengyun.yang
Alumni
Alumni

The current render workspace is a simple one and we are working on some improvements for it. In the short term, we will add some new camera settings like focal len and depth of field. Some new translucent materials and new emissive materials are also being added. In the long term, there could be some big UI improvement in Render workspace which will provide a brand new user experienece. Stay tuned. 

0 Likes
Message 16 of 21

O.Tan
Advisor
Advisor
whoa, just got back from a weekend holiday and surprised to see many great responses.

I'm with cekuhnen where I do believe there's a need to have an OBJ export for F360, mainly for those seasoned render users who prefers to use an external render and thanks for educating why Keyshot isn't that good as what they make it sound like (though it seems the whole CAD industry is moving towards embracing Keyshot).

To me, if OpenCL will speed up the render speed for F360, I'll say why not as it'll help the users to generate passable render quickly and probably a few different versions/looks/views as it's much faster to render now then before, though I'm perfectly aware it's not easy as it sounds, but I'm just speaking my mind here. And I'm not sure why there's a need to write both OpenCL and CUDA since Nvidia cards do support OpenCL, just a bit lacking at the moment and that it's Nvidia who's choosing to make CUDA a closed platform, so my guess is, eventually either Nvidia will open the CUDA platform or OpenCL will be the more popular choice. Apple is deeply invested in OpenCL, and in some ways, AMD and Intel as well.

And to those who replied, thanks for commenting as it gives some insight and knowledge.


Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

0 Likes
Message 17 of 21

cekuhnen
Mentor
Mentor
My only concern is that I read quite often that when mixing CPU and GPU that by how fast GPUs for math are now the CPU in openCL will block the speed. Pure GPU openCL would be faster.

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 18 of 21

O.Tan
Advisor
Advisor
I'm not sure if you've read it, but one of my posts actually wonder the possibility of CPU graphic effects to be calculated in the GPU instead of the CPU (my guess is that is what OpenCL can be used for?)


Omar Tan
Malaysia
Mac Pro (Late 2013) | 3.7 GHz Quad-Core Intel Xeon E5 | 12GB 1.8 GHz DDR3 ECC | Dual 2GB AMD FirePro D300
MacBook Pro 15" (Late 2016) | 2.6 GHz Quad-Core Intel Core i7 | 16GB 2.1 GHz LPDDR3 | 4GB AMD RadeonPro 460
macOS Sierra, Windows 10

0 Likes
Message 19 of 21

cekuhnen
Mentor
Mentor
not sure if I understand what you mean

Claas Kuhnen

Faculty Industrial Design – Wayne State Universit

Chair Interior Design – Wayne State University

Owner studioKuhnen – product : interface : design

0 Likes
Message 20 of 21

chengyun.yang
Alumni
Alumni

Hi O.Tan,

 

Fusion has already been using GPU to accelerate the calculation and display of graphics viewport effects(e.g., ambient occlusion, ground shadow), through the 3D graphics API(DirectX or OpenGL). I guess it might be possible that we use OpenCL to further optimize it but that means that we will need to re-design our algorithms, as our current implementation is designed around the 3D graphics API OpenGL and DirectX, not OpenCL. And as mentioned previously, typically OpenCL is used for other general purpose high performance computing and in my knowledge it is still not very common to use it for the purpose of accelerating the graphics display. 

 

Thanks

Chengyun

Autodesk Fusion Team

0 Likes