How to speed up gpu rendering 4-6x.

Started by wayneheim, November 08, 2021, 06:21:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wayneheim

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

mafrieger

#1
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

TGS808

Quote from: wayneheim on November 08, 2021, 06:21:55 PM

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.

wayneheim

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)

richardfunnell

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 :/

wayneheim

#5
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.

DerekCicero

Thanks for the report, Wayne!

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