MaxScript Release 0.66 Beta Source FOR MAX 3.x (05/23/2000)
Copyright (c) 1999-2000 by Borislav Petrov, Bobo's Rendert**ls.
QuickRegionRenderer (QRR) lets you do quick render previews
of single frames while tweaking material or object properties. It detects
the parameter changes and the changing region automatically and re-renders
only the portion of the screen that needs an update. You can think of it
as of a slower version of Maya's IPR. Other than IPR, QRR will find out
the area to be updated automagically.
HOW DOES IT WORK?
QRR is based on the same technique already
used in the ROCKR script for R2.5.
It creates WHEN handlers which trigger
region renderings when monitored properties change.
It compares the last image to the current
one and tries to detect the changed portions of the image.
Since the check is pixel-based, any changes
including raytraced reflections, shadows etc. will
be taken into account, not only simple
material changes on the object itself.
Version 0.66 BETA (5/23/2000)
Fixed an ugly bug preventing from updates when in Camera
View... Do I feel stupid! ;o)
Basically, one cannot perform a region rendering using MAXScript in a camera
view, just in a Perspective User view.In order to avoid the problem, Version
0.66 now switches to Perspective, renders and switches back to the camera.I
wonder how I missed this in more than a year of updates - it seems I tested
the script in Perspective mode all the time!...
Version 0.65 BETA (1/9/2000)
Redesigned the User Interface to include some new controls
Added Toggles for Materials, Sub-Anims and Parameters
monitoring in addition to the already existing [Transforms] toggle.
New default behaviour - when the user changes the viewport,
QRR will NOT ask about rerendering but simply not render. Going back to
the old viewport will enable QRR again. To enable the OLD behaviour with
the prompt, activate the new toggle [Switch Viewport].
Changed the way the selection is managed: When QRR is
started, the current selection will be monitored. If the user deselects
the objects, the old selection will be STORED and USED further. To set
a new selection, select some objects and press the new [>GET] button. To
reselect the currently active QRR objects in the scene, press the new [Select]
button. Trying to get an empty selection will NOT disable QRR.
To DISABLE QRR, press the [OFF] button. To enable again,
press [ON]. To close, press [OFF] and then the [X] window button in the
title bar of the floater.
To force an update of the QRR Frame Display, press the
[ON] button (even if it is already checked).
Fixed a bug in the LowRes code which prevented QRR from
using LowRes unless the LowRes Time Value was changed. Checking the button
will enable LowRes immediately now.
Version 0.6 BETA (9/5/99)
Implemented a new User Interface floater with some control
Scan Factor/LowRes Pixel lets you set the Change Detection
The same value is used for the Low Resolution pixel size in case LowRes
Rendering is enabled.
NOTE that changing this radio buttons state
will force a full frame update!
The "Allow Low-Resolution Update" checkbutton is unchecked
When active, it will enable Low-Res updates if a region rendering is triggered
earlier than the Low-Res Threshold value. If the next update occurs later
than the value, a normal region rendering is performed.
The Low-Res. Thresh. (sec) value works as described
above. Increase it to 30.0 to force Low-Res Updates.
"Allow Transformations" is unchecked by default. When
checked, changing transformations of an object (Move/Rotate/Scale) will
trigger a region update.
"Allow Raytracing" is unchecked by default. When checked,
the frame and changing regions will ignore any raytrace Materials and Maps
(the Enable Raytracing will be disabled during QRR renderings, but will
be enabled for regular MAX rendering),
When checked, the scene will update as usual. Since Raytracing tends to
be slow and QRR will respect the changes in reflections, too, you could
save lots of time by leaving this option disabled.
After rendering a region, the speed-up will be displayed
in brackets after the actual time in seconds.
The value shows how many times was the region rendering quicker than the
last full frame rendering.
After a full frame update there will be no value in brackets.
The position of the QRR floater and all options will
be saved to an INI file in your \Scripts directory.
The UI floater will become visible when you press the QRR icon with at
least one scene object selected. It will disappear/not appear when you
click the icon with nothing selected (QRR disabled). You can also close
the floater uing its [X] button and still be able to use QRR. To display
it again, click the QRR icon.
Version 0.5 BETA (9/5/99)
Fixed most problems with color picker in Material Editor.
Enabled Transformations again.
Removed the Status Floater which popped up at each rendering.
Implemented a new User variable to control the Time
Threshold for LowRes redraws (when enabled).
Version 0.42 BETA (7/27/99)
Fixed some image artifacts at the top and left border
of the region.
Increased the "responsiveness" of the script - it starts
rendering immediately after a change. Speed has not been improved though.
Version 0.31b BETA (5/22/99)
Here is an update which fixes some troubles (and
will probably add new ones ;o)
The changes are described in the source.
Here is a short list:
Not a big step forward, but still better than v0.2
When a new material is assigned to an interactive object,
it becomes interactive, too.
When you try to transform (move/Rotate/scale) an interactive
object, its Parameter hooks will be deleted.
This will prevent problems with updating while moving.
The detected region is now displayed before rendering
using two red lines.
Multiple update attempts (for example many objects with
the same material) are avoided.
Low-res update is switchable using a user variable.
Read the source for more.
Version 0.2b BETA (5/20/99)
This is a very rough test version of an
INTERACTIVE QuickRegionRender Script!
Here are the basics:
To hook an object to the interactive renderer,
just select it before pressing the QuickRegionRender icon.
You can hook as many as you want - both material
and object properties are updated - see current RESTRICTIONS in the source.
Everytime you press the icon, all ChangeHandlers
are deleted and new ones are created, so you can change the hooked objects
anytime by using a new selection and pressing the Icon.
To unhook everything, select Nothing and press
Note that the script will work best
at lower resolutions. (I used Dual PII400 with 320x240 and it took
0.2 to 1.5 secs to update depending on
the region size)
Just select a low res and Zoom in x2 or
x4 to see more... Will work on the problems and speed issues
Version 0.12b BETA (5/20/99)
While the QRR full-frame time is slightly
slower than the regular renderer because of the region
Please download the script, copy the BMPs
to \UI, the MS script to \Scripts, the .MAX demo scene to \SCENES.
Open and evaluate the script
Customize the Rendering toolbar, select the
QuickRegionRender from Render Tools.
Load the demo MAX scene.
Press the QRR icon to render a frame, note
the rendering time in the prompt line.
Open Material Editor, drag&drop a new
material to one of the spheres, press icon again.
Note the rendering time in the prompt
Now press the regular Render icon to render
the whole scene, note the rendering time.
detection overhead, the region render
after changing a material is much faster than a full frame
rendering. The more complex the scene
and the smaller the changing region, the faster the script.
Version 0.66 BETA Source