Author Topic: How to speed up gpu rendering 4-6x.  (Read 2848 times)

0 Members and 1 Guest are viewing this topic.

Offline wayneheim

How to speed up gpu rendering 4-6x.
« on: November 08, 2021, 06:21:55 pm »
So I have been working on this animation project and notice a couple things.
1. if you are experiencing keyshot resending the data to your GPU's with each frame you render, set Keyshot to render in the background. This will prevent most of this reloading.

2. even doing this, Keyshot is only using about 35% loading/usage on any of my cards. But in preview mode, all my cards register nearly 80+% usage.

3. Setting your Keyshot resolution to your output resolution and doing a screen capture, as long as you don't need transparency and such, and doing a screen capture produces much quicker results! Like a factor of 10.

So with the help of my son we put together a mouse/keyboard macro to automate the capture of the frames. Since Keyshot doesn't have a shortcut key for the "next frame" button, we had to capture the mouse click location.

We used an app called Autohotkey and got it to work.

^j::
MouseGetPos, xpos, ypos
numberOfFrames := 25
loop %numberOfFrames%
{
   Send {p}
   Sleep 500
   MouseClick, left, %xpos%, %ypos%
   waitTime := 8 * 1000
   Sleep waitTime
}
exitapp

Save the above as a .ahk file which is what Autokey uses.

Keyboard short cut is set to Control + J.
Set the number of frames for your animation
Sleep waittime is the amount of time you want your screen to redraw.

Once done, compile the script with the app by right clicking on the saved file. Then run the little exe that it makes. Once running, click on Keyshot window so that it is the active window on screen and hover your mouse over the "next frame" button on your timeline. Hit the control+j shortcut and Keyshot will start taking screen captures and advancing one frame at a time.

 This allows you to use almost full use of your gpu's when rendering now.

Hope this helps others.

Wayne
« Last Edit: December 15, 2021, 09:11:21 am by wayneheim »

Offline mafrieger

Re: How to speed up gpu rendering.
« Reply #1 on: November 09, 2021, 05:10:07 am »
Interesting! Many thanks for sharing this!

Did you write an issue report to KS? would expect to have this working highly efficient/best possible without such a workaround...

Would you mind giving some details on used environment?
- windows version
- Keyshot version
- GPU Type
- driver version
« Last Edit: November 09, 2021, 05:19:23 am by mafrieger »

Offline TGS808

Re: How to speed up gpu rendering.
« Reply #2 on: November 09, 2021, 05:18:39 am »

3. Setting your Keyshot resolution to your output resolution and doing a screen capture, as long as you don't need transparency and such, and doing a screen capture produces much quicker results!


If you’re using the KS screen capture feature (What would equate to the button in the bottom right corner of the UI) then you can have transparency. You can change that in the preferences.

Offline wayneheim

Re: How to speed up gpu rendering.
« Reply #3 on: November 09, 2021, 07:54:02 am »
Mafrieger,

I'm using Windows 10 Pro and the most up to date version of 10.2 Keyshot. I'm also using the latest Nvidia studio driver 472.39. I have a 3090 and a 2070 internal and an external 3080ti box attached via thunderbolt 3. Yes I have been talking with support at length about the issue... there are two issues.

1. Keyshot reloads data to cards with each frame sent. (Partial work around for this is sending file to render in background. This limits the bulk of the data sending to only the first frame sent) (Confirmed bug being worked on)

2. When rendering gpu, Keyshot only uses about 35% of any of the cards resources at any given time where as in preview mode, Keyshot will use over 80% of all gpu's in the system dramatically speeding up rendering. (Has not officially confirmed this as a bug yet)

Offline richardfunnell

Re: How to speed up gpu rendering.
« Reply #4 on: November 09, 2021, 08:28:19 am »
Thanks for sharing this, Wayne! That does look like a solid workaround.

But man, I'm completely floored that this needs to be a thing :/

Offline wayneheim

Re: How to speed up gpu rendering.
« Reply #5 on: November 09, 2021, 11:17:56 am »
Yes Richard but am super happy with the nearly 6x improvement that I'm seeing in render times after investing all these $$$ in GPU's. Hopefully they can get this fixed for 11. I would imagine it would make quite a few people giddy.
« Last Edit: November 09, 2021, 01:42:52 pm by wayneheim »

Offline DerekCicero

Re: How to speed up gpu rendering 4-6x.
« Reply #6 on: January 13, 2022, 04:35:25 pm »
Thanks for the report, Wayne!

It's been logged and reviewed. I will follow up directly on next steps.