PowerPreview: High Quality Nitrous Previews

34 votes
Version: 
0.71a - Beta 9
Date Updated: 
04/27/2017

This is an updated version of my PowerPreview script for Nitrous....
Here's a preview pic of the GUI and a high quality nitrous viewport showing the great quality you can achive with NitrousCool

PowerPreview for 3ds Max 2012+

Here is a link to the full screen snapshot done with PowerPreview, the timelimit was set to 90secs, but it would have been perfect quality wise already after 30-40 secs...

PowerPreview

The purpose of the script is to be able to create viewport previews in the highest Nitrous-rendering quality possible. Additionally the size of the preview is NOT limited to  the desktop/or 3ds Max window size. There is a hard limit at 6400*6400 currently, but that is set in the code to prevent people from killing their Max sessions by dialing insane numbers in the resolution spinners. I successfully created some 4800*2400 avis on my 512MB graphics card Laughing

See more details below...

DETAILS:

-------------------------------------------------------------------------------------------------------------------------------------------
 PowerPreview V0.71a Beta 9
-------------------------------------------------------------------------------------------------------------------------------------------
Power Preview :  High Quality Nitrous Preview  - !!! BETA RELEASE !!!
Created:  June  6, 2011
Modified: April 27, 2017
-------------------------------------------------------------------------------------------------------------------------------------------

LIMITS EXISTING UP TO THIS VERSION:

  • 3ds Max Limitation: 3ds Max has to be the foreground application, otherwise Nitrous will stop refining the viewport progressively. Because of this issue IT'S IMPORTANT TO DISABLE THE SCREENSAVER.
    Energy saving mode is okay, even if it is set to put the display to sleep...
  • 3ds Max Bug:  AVI files bigger than 1GB get corrupted, please file a bug report at Autodesk (fixed in Max 2013)
  • Pressing "Cancel" on 32 bit Max might crash 3ds Max, this is currently under investigation
  • Locked target file (eg. playing in an AVI Player) cause PowerPreview to report an "Internal Error"
  • Advanced Nitrous options ( eg. dynamic reflections) tend to fail from time to time on lower-end GPUs
  • Workarround: set timebudget high enough, press create preview/snapshot, look at output: if something's wrong, toggle any Nitrous option on&off. This will eventually bring Nitrous's output back to glitch free again,
    If everything looks okay, turn down the timebudget again and wait for the preview to be created

-------------------------------------------------------------------------------------------------------------------------------------------

HISTORY:

HISTORY

Version:  V0.71a - Beta 9 - PRERELEASE - 3ds Max 2018+ Compatibility Fix

  • added missing icon in installer package (3ds Max2018+) to prevent exception at launch causing incomplete UI

Version:  V0.71 - Beta 9 - PRERELEASE

  • Implemented progressive refinement while 3ds Max is not the active Application ( 3ds Max 2014+ only)
  • Object Selection is maintained during preview creation now (including stack selection).
    This allow previews with selected object features (like wireframe selected, modifier stack's "Show Endresult" etc...)
  • fixed world axis being visible in previews

 

Version:  V0.70b - Beta 8, ( 3ds Max 2014 related Update + Bugfixes )

  • fixed NitrousTweaker's Procedural Texturesize error
  • fixed Viewportmenu disappearing after using 3ds Max's internal "Make Preview" functionality
  • fixed various Maxscript compiler related errors in 3ds Max 2014 and above

Version:  V0.70 - Beta 8 - Internal PRERELEASE

  • Increased resolution limit again ti 6.4Kx6.4K. Beyond that, severe graphics driver crashes might occure
  • unintended bitmap scaling fixed, this caused subtle graphics artefacts, especially visible on wireframe previews
  • complete code restructuring and modularization (some of it still in progress)
  • implementation of various (still internal only) data structures for future project managment usage
  • Nitrous Settings Copy&Paste functionality ( between viewports )
  • Some UI reorganization
  • fixed viewport switching/resolution issues

Version:  V0.60 - Beta 6, ( 3ds Max 2013 related Update)

  • Increased resolution limit again ti 6.4Kx6.4K. Beyond that, severe graphics driver crashes might occure
  • unintended bitmap scaling fixed, this caused subtle graphics artefacts, especially visible on wireframe previews
  • implemented basic preview creation mode switching feature, choose between various methods,
    currently you can switch to the default 3ds Max's "Make Preview" mode and back only
  • Filename postfixing based on token expansion added. Added checkboxes for convenient use
    Known tokens are currently: "%scene", "%view", "%date", "%time","%begin","%end",
  • DOF/Boken shape/image handling added:  per viewport bokeh shape mechanism implemented
  • UI rearranged, introduced "Minimal UI" button
  • Checkbox to disable  "Progressive Refinement" added for fastest previews
  • Various additional fixes...

 Version:  V0.51a - Beta 5, DC20120216, HOTFIX

  • Fixed "visibility in undefined" error for people having the viewcube-plugin completly removed
  • Please note regarding the gamma fixes:
    due to a Max bug/Limitation, maxscript always uses an output gamma value of 1.0 when it saves a bitmap
    Thus when doing a "Preview", the current display gamma settings are applied to the written files,
    that means it' provides complete WYSIWYG ("What you see is what you get")
    Contrary to the "Preview" creation, when doing a "Viewport Snapshot" and using the framebuffer save button to save the bitmap, the current "output gamma" setting is applied to the written image

Version:  V0.51 - Beta 5, DC20120215

  • Fixed filename-frame numbering when writing to  image sequence
  • Fixed double gamma issues with snapshot mode when display gamma is enabled
  • Implemented ViewCube hiding ;-)
  • Implemented basic UI and options for upcoming nitrous features (3ds Max 2013 DOF,Bokeh)

Version:  V0.50c - Beta 4, DC20120104, HOTFIX

  • Fixed time jumping bug during simple snapshot creation
  • Implemented simple Nitrous glitch recovery mechanism (still experimental)

Version:  V0.50b - Beta 4, DC20111221, HOTFIX

  • Fixed stupid installer bug: install only executed when existing PowerPreview install was detected - D'oh!!!!!
  • Removed dummy D3D button in Direct 3D mode - D3D options still wait to be implemented....

 Version:  V0.50a - Beta 4, DC20111220

  • Complete GUI rework, now features flexible rollout support, minimizing etc...
  • Introduced Nitrous config rollout
  • Experimental Nitrous options ( eg dynamic reflection ), buggy but work most of the time
  • Introduced Viewport SnapShot feature, supporting the same resolutions and features like the preview creation tool
  • Implemented update check tool, simply press a button to know if you have the latest version installed
  • Implemented timerange configurability, fixed bugs in previous versions related to timeline changes in the scene
  • Implemented Object Category Filtering and rudimentary overlay options (WIP)
  • Cranked up limits ( timelimit to 90 secs, max. resolution to 5000 x 5000 )       

Version:  V0.46a - Beta 3, DC20111212

  • Implemented compatbility wiht German and French Max Versions
  • Further improved UI logic and behavior
  • Improved future and internal 3d Max version stability 

Version:  V0.45c - Beta 2, DC20111210, HOTFIX

  • Fixed crash-to-tdesktop bug after preview creation on 32bit 3ds Max Versions
  • Fixed bug which could cause 3ds Max dialogs and menus to close immediatly after preview generation
  • Improved parts of the UI and the viewport selection change dedection code ( still work in progress)

Version:  V0.45b - Beta 1, DC20111205

  • Fixed various UI related issues, which messed with the parameters on viewport selection
  • Reimplemented iteration-based limiting ( enabled by default, set to 2048 Nitrous refinement iterations)
  • Note: all parameters in Timebudget Group are tweakable on the fly while a preview is in progress..
  • Statustext reflects wether the last frame did hit the time based limit, or the iteration limit
  • Fixed framerange detections ( WIP ), parameters are updated when "Create Preview" is pressed
  • Script works now in Direct3D mode  too, but of course without progressive options

Version:  V0.40c - Initial Alpha Release, DC20110728

-------------------------------------------------------------------------------------------------------------------------------------------
AUTHOR:

-------------------------------------------------------------------------------------------------------------------------------------------

FUTURE PLANS:

  • Too many to list Cool

-------------------------------------------------------------------------------------------------------------------------------------------

INSTALLATION:

  • 3ds Max Version 2012 and up and viewport set to Nitrous recommended
  • Use automatic installer or copy the zip contents to your Max folders manually....
  • "Spacefrog Tools-PowerPreview.mcr" should go to your "usermacros/macroscripts" folder
  • "SF_PowerPreview.mse"  should go to your userscripts folder ( usually "[MaxRoot]\Scripts\" )
  • Assign keyboard-shortcut/button or menu to "PowerPreview: Enhanced Preview" in the "Spacefrog Tools" category

-------------------------------------------------------------------------------------------------------------------------------------------

USAGE:

  • Start the script using your prefered method and select the viewport you want to have a preview generated from...
  • The script detects when you select another viewport and adjusts its output resolution automatically,
  • To create "bigger than screen" previews use "Preview Scale Factor" - slider and/or resolution spinners
  • Set the output file and format. Due to a bug/limit in 3sd Max, number of codecs available on 64 bit is limited
  • Adjust the timebudget( ms) you want Nitrous to give per frame ( first slider ),
  • You can re-adjust the budgets during preview creation if you are not satisfied with the output quality
  • Nitrous options are currently "Live" too, meaning  changes in the options are directly applied to the output,

-------------------------------------------------------------------------------------------------------------------------------------------
NOTES:

  • Please do not share the script directly, simply guide people to this page or share the download link
  • There are bugs, quirks and shortcomings in the script of course
  • Thus feedback is welcome,  please post here or on the original threads i created on various boards
  • Of course i do not take responsibility if the script burns your GPU, toasts your hamster or turns you into a bunny
  • You have been warned!
  • Happy Previewing! Cool

-------------------------------------------------------------------------------------------------------------------------------------------

Version Requirement: 
Max 2012 and up, runs on versions Max 2010 and 2011, but without Nitrous of course

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vbn's picture

Thanks for this great script!

Thanks for this great script! I made some nice previews with it.

Do you take suggestions? I tried to render a camera sequence that started at negative frame numbers but it seems that it doesn't work well in that case. When I rendered such preview, the files had a very strange sequence numeration. Can this be fixed? Please check the attached screenshot. Loading this sequence in After Effects doesn't work. If I render from frame -200 to 200, the sequence should look like this:

camera_001_-0200
camera_001_-0199
camera_001_-0198
.....
camera_001_0000
camera_001_0001
camera_001_0002
.....
camera_001_0200 

not:

camera_001_0000
camera_001_0001
camera_001_-001
camera_001_0002
camera_001_-002
.....

AttachmentSize
powerpreview_sequence_strange_numeration.png 106.38 KB
spacefrog's picture

Hmm - i just tested this

Hmm - i just tested this version on Max 2016 and it worked as expected. Maybe your installation went wrong. How do you run the script and where is it located after installation ( the SF_PowerPreview.mse file ) ?

Talpo's picture

max 2016

Hi!
first of all: thanks for sharing this very useful tool!!

i'get a "--Compile error: Duplicate struct member name: CaptureViewportConfigDialog" error while launching the script on 3ds max 2016.

It's me or this version (0.70b_beta8) is not max 2016 compatible?

Tnx!

savannahcampbell's picture

Thanks for sharing, for this

Thanks for sharing, for this applicable resource. I never heard about this before, I just learned something new.Thank you for the script, it's awesome. Keep it up!

CHECK THIS OUT --> cheap soundcloud downloads

ebee's picture

Timebudget bug

Hi! Thank you for this great tool. A small problem.

The timebudget seems to work about on half of the frames. Ie. if the timebudget is 1 second, for half the frames powerview ends at ~1000ms, but very often it goes to ~2000ms or even ~4000ms.

Don't know if this problem was already addressed, I could't bring myself to page through all the comments.

I'm using english 3ds max 2014 sp3 with win7, and vray adv 2.40.03 if that makes any difference to viewport grabbing.

NinaNinja's picture

"if you get faulty

"if you get faulty reflections in the viewport, blame Nitrous and 3ds Max, not PowerPreview"
Good point, sorry. (No edit-function on these comments tho so can't change the title)

Your advice to restart max each time you hide and show stuff is also good.

spacefrog's picture

Your post's title is wrong

PowerPreview simply records the 3ds Max viewport contents. It is no renderer or similar, it simply allows you to take snapshots of the existing viewport contents.
I was not aware that Nitrous viewport shows reflections of hidden layers and objects, that's a new one for me too. It seems that the Nitrous shader cache is not getting rebuild when objects are hidden/unhidden. Maybe i'll find some way to enforce that in the future...
For the time being, after you hide objects, only saving and restarting Max will rebuild the shadercache and fix this problem.

So please, if you get faulty reflections in the viewport, blame Nitrous and 3ds Max, not PowerPreview. As stated in the readme , realtime reflection ( not Environment reflections which do work ) are really buggy in Nitrous by itself, that's the reason they are not exposed to the 3ds Max UI normaly, only via maxscript.

NinaNinja's picture

WARNING: this script hardly work yet!

I'll tell you how to "get it working", but it's only for fun test scenes but I'm afraid for any REAL use it's completely useless at currently buggy state.

Problem is it will include EVERYTHING in its reflection, hidden layers, hidden objects. Which makes the reflection look buggy but also SUPER slow if you have a lot of objects in hidden layers.

For test shots however what you need is just:
1) Arch Design material at default settings.
2) Views > Show Materials in viewport as > with maps (that's the key step that ppl forget)
3) Enable env and dyn refl.

xtravolution's picture

Getting reflections working

This may be a little off topic but I was wondering if I could get some help with getting reflections working in the viewport.

I have a simple scene with a box, sphere and plane. They each have a reflective material (raytrace in the reflective slot). I have also put an image in the environment background.

I have enabled relections from the environment. I have also written a little script...

vvsi = NitrousGraphicsManager.GetActiveViewportSetting()
vvsi.DynamicReflectionEnabled
vvsi.ReflectionEnabled

When run this gives a true result but I still get no reflections in the viewport.

Any chance you can help me out Josef?

psyphex2011's picture

thanks for your prompt reply.

thanks for your prompt reply.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.