Holomark 2 Released!

The best would be to do a Raytraced viewcapturetoclipboard or viewcapturetofile to bypass wasting computing cycles for updating the viewport(s) - and it would automatically block until done. But if you don’t want that you could use for instance code I showed to @Jarek here Help - Cycles settings

specifically the following code snippet (for those who are lazy enough to not click through to the discussion):

import scriptcontext as sc
import Rhino

rtdm = sc.doc.Views.ActiveView.RealtimeDisplayMode

# try-except block is needed because a non-realtime displaymode
# will give an internal, non accessable wrapper class, and throw an
# exception
# for any other realtime implementation this should work - like ProRender
try:
	print(rtdm.IsCompleted())
	print(rtdm.Paused)
	print(rtdm.Locked)
        if rtdm.MaxPasses < 1500:
	    rtdm.MaxPasses = rtdm.MaxPasses + 10
        else:
            rtdm.MaxPasses = 100
	print(rtdm.LastRenderedPass())
except:
	print("Active view not a realtime display mode")

Setting sample count I think can be done through MaxPasses property.

The function call LastRenderedPass on the rtdm would yield you the last rendered pass - in case you want to do it in the viewport and pause after your 30 seconds of patience span.

I have here a regression.py that creates for me 960 tests, raytraces them all (with viewcapturetofile), capture a rendered version still, and remember the times for each and everyone of them.

I’ll dig up some more code later to see if it is of any use for you. But I think with what I’ve showed you here, and in the thread with @Jarek you may have already enough to get started.

1 Like