Jump to content

Lowering Mantra Load Time


Recommended Posts

The load time in Mantra has a lower bound averaging 5.4s.

 
Load Time: 1.37u 0.09s 5.40r
Render Time: 9.29u 0.64s 8.37r
 
2.97 (35.4%) Render Time
5.40 (64.5%) Load Time
 
(ignore the actual times, the importance is the bottleneck caused by load time)
 
The problem is the load time is not shared between frames, therefore rendering an animation for testing requires a very long time. At this rate a 2 min scene takes about 7 hours to render.
 
How can I lower the Mantra load time or share it among frames?
 
Unfortunately, I'm using apprentice (no IFD) and changing spatial structure makes no difference. Rendering with OpenGL is not an option.
Edited by ayidi
Link to comment
Share on other sites

Something sounds up with your computer: 

 

Simple box and point light to MPlay H14 on OsX. Default settings

 

Load Time: 1.20u 0.09s 0.19r

Render Time: 18.62u 2.11s 3.29r

Link to comment
Share on other sites

Something sounds up with your computer

 

Yes my computer is definitely an issue, but lets pretend the load time is the bottleneck.

 

The Render View panel does exactly what I want, it renders without re-loading the scene.

 

It seems that creating a script that saves a frame from the panel at every frame is a better option than John's solution.

Link to comment
Share on other sites

Try the attached  - the Preview options have been enabled on the MantraRop and drop the Load time a touch here from 0.19 to 0.14.  Hopefully it's has a greater impact.

 

 

Enabling the preview option in the Mantra ROP does not reuse the loaded geometry. At every frame a new mantra instance is created.

 

You can tell by looking at:

 

  reading geometry from stdin

/obj/box/box1 (6 primitives)

 

The Render View panel is using one mantra instance and doesn't reload the geometry. It would be nice to get this behavior.

Link to comment
Share on other sites

I had exactly same problem in H13 (cannot test it H14 yet). Ifd didn't helped. It took more time to process (load) the scene then render. IPR render on the other side was blazing fast.

There is little issue with IPR update between frame that doesn't work always correctly, sometimes there is too much change in geometry. But if the sequence is coherent it usually works without problem.

Please submit your issue as RFE (you can add pointer to mine: RFE #64474)

http://www.sidefx.com/index.php?option=com_content&task=view&id=768&Itemid=239

Thanks

 

 

 

 

The load time in Mantra has a lower bound averaging 5.4s.

 
Load Time: 1.37u 0.09s 5.40r
Render Time: 9.29u 0.64s 8.37r
 
2.97 (35.4%) Render Time
5.40 (64.5%) Load Time
 
(ignore the actual times, the importance is the bottleneck caused by load time)
 
The problem is the load time is not shared between frames, therefore rendering an animation for testing requires a very long time. At this rate a 2 min scene takes about 7 hours to render.
 
How can I lower the Mantra load time or share it among frames?

 

The load time is the bottleneck.

 

The Render View panel does exactly what I want, it renders without re-loading the scene.

 

It seems that creating a script that saves a frame from the panel at every frame is a better option than John's solution.

  • Like 1
Link to comment
Share on other sites

Please submit your issue as RFE (you can add pointer to mine: RFE #64474)

 

Submitted the RFE, hopefully we don't have to wait until 15 to save a frame range using the IPR.

 

Tried to hack my way around it and iterating through the pixels takes around 1.5 seconds (640 x 480).

for y in range(height):
    for x in range(width):
        rgba = self.panel.pixel("C", x, y)
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
307200    0.140    0.000    1.399    0.000 hou.py:45397(pixel)
Edited by ayidi
Link to comment
Share on other sites

 

Submitted the RFE, hopefully we don't have to wait until 15 to save a frame range using the IPR.

 

Tried to hack my way around it and iterating through the pixels takes around 1.5 seconds (640 x 480).

 

What specs are your machine?  Sounds like an upgrade will guarantee reduced load times.

 

A 2 min, 2880 frame, render should be  ~7min for load time on a dual 6 core @ 3.33.  (2880*0.14)=403/60=6.72

Link to comment
Share on other sites

What specs are your machine?  Sounds like an upgrade will guarantee reduced load times.

 

A 2 min, 2880 frame, render should be  ~7min for load time on a dual 6 core @ 3.33.  (2880*0.14)=403/60=6.72

 

Don't get hang up in the actually seconds, what matters is that the load times can be considerably big and affect the render time considerably. The numbers were from a machine running Mavericks and now with Yosemite the load time decreased to ~0.13s.

 

Even with a small scene the load time becomes considerably big.

 

I created a small script that uses IPR to save an animation. Using a small 320x180 resolution, I'm getting twice the speed or more. A small resolution is crucial since getting the pixels from the IPR is not efficient, at 320x180 takes about ~0.65s to read the pixels and save an image.

iprPane = hou.ui.findPaneTab('panetab4') # Render View
ipr = renderIPR.IPR(iprPane, 0.5)
renderIPR.profile(ipr.render)

# vs

mantra = hou.node('/out/mantra_ipr')
renderIPR.profile(mantra.render)

python2.7libs.zip

Link to comment
Share on other sites


Platform:                 darwin-x86_64-clang5.1-MacOSX10.9

Operating System: Mac OS X Version 10.10.1 (Build 14B25)

Number of Cores: 8

Processor: 2.2 GHz Intel Core i7

Physical Memory: 8.00 GB

Number of Screens: 1

Screen 0: 1680 x 1050 at 0,0

OpenGL Vendor: ATI Technologies Inc.

OpenGL Renderer: AMD Radeon HD 6750M OpenGL Engine

OpenGL Version: 4.1 ATI-1.28.29

OpenGL Shading Language: 4.10

Detected: ATI Consumer (Mac version)

Link to comment
Share on other sites

What's the nature of your scene? Is the load time slow because of shaders or geometry? Those timings look pretty atypical to me. Are they stable? eg. If you render out a sequence of 10 frames, are those times per frame the same every time? Recall that things can get faster once your OS has warm caches.

Link to comment
Share on other sites

10 Frames (320x180)

 

EcZlBdq.png

 

Render View (IPR)

 

2.0s per frame (timer) + ~0.6s getting pixels and saving

....

Load Time: 13.66u 1.05s 9.36r

Render Time: 17.39u 1.15s 9.98r

Load Time: 17.40u 1.16s 12.02r

Render Time: 21.12u 1.24s 12.64r

Load Time: 21.12u 1.25s 14.80r

Render Time: 24.77u 1.31s 15.37r

Load Time: 24.77u 1.31s 17.53r

Render Time: 28.36u 1.38s 18.09r

Load Time: 28.36u 1.38s 20.34r

Render Time: 31.98u 1.48s 20.95r

Load Time: 31.99u 1.48s 23.09r

Render Time: 35.72u 1.54s 23.68r

Load Time: 35.73u 1.54s 25.86r

Render Time: 39.42u 1.61s 26.45r

 

Total Time: 27.46s

 

Lez9tzk.png

 

Mantra

 

~7.6s per frame

 

Load Time: 3.64u 0.24s 2.51r

Render Time: 13.11u 1.46s 7.21r

Load Time: 3.63u 0.25s 2.95r

Render Time: 12.84u 1.74s 7.66r

Load Time: 3.45u 0.22s 2.98r

Render Time: 12.98u 1.31s 7.72r

Load Time: 3.49u 0.22s 2.98r

Render Time: 12.83u 1.42s 7.86r

Load Time: 3.99u 0.29s 2.94r

Render Time: 13.11u 1.34s 7.65r

Load Time: 4.06u 0.31s 3.06r

Render Time: 13.50u 1.53s 7.96r

Load Time: 3.49u 0.23s 2.97r

Render Time: 12.93u 1.50s 7.69r

Load Time: 3.68u 0.26s 3.02r

Render Time: 13.16u 1.39s 7.73r

Load Time: 3.68u 0.26s 2.96r

Render Time: 12.98u 1.36s 7.51r

Load Time: 4.20u 0.31s 2.95r

Render Time: 13.54u 1.63s 7.67r

 

Total Time: 91.18s

 

 

3.3x performance increase!

iprSave.zip

Link to comment
Share on other sites

Er, you're rendering a static frame sequence?

Let me rephrase that. I'm not saying that you can't get a speed up at all. Certainly for specific situations you can. I was more interested in the type of scene that you're actually trying to render that exhibited those skewed timings. Or have you only been trying on test play scenes?

Link to comment
Share on other sites

My goal was to speed up the render time in a static scene for testing purposes. Ex. debugging shaders, quick animation previews, lighting, etc. 

 

I really like the IPR viewer but it lacks a way to preview an animation. Something like a ram preview (AE) would be ideal.

 

Sorry, at the moment I've only done test play scenes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...