[Closed] VFB+ : Including Source Code
edit : v1.42 released, see last post in this thread.
This is a tool I’ve been working on in my free time and would like to release to the community as I find it has been quite useful in my everyday work.
Info:
Concept
I felt the 3dsmax VFB toolbar has not been changed in literally a decade, and is very lacking in features, while on the other hand, has a lot of useless features (who would print a render straight out of the VFB?). I set out to replace the toolbar with something much more useful in everyday production work, especially for look developers, shaders, lighters, render artists, and generally anyone who finds themselves doing lots of test renders.
Features
- Render History – navigate through all of the current session’s renders.
- Embedded UI – sits straight inside the VFB, no wasted screen space. Fully compatible with all original VFB features (zooming, scrolling, region editing, pixel color information, etc.)
- Color Correction – perform color correction straight in the VFB using on-screen controls.
- Split A/B Mode – compare between any two renders from the history (RAM player style).
- Render Settings Browser – compare render settings between different renders, and optionally revert to previous settings.
Compatibility
- Tested on 3dsmax 2009 and upwards, unknown about previous versions.
- Any renderer which uses the 3dsmax VFB.
Limitations
- Frame buffer is currently only 32BPP.
- Each stored render does take up a small amount of RAM. You can limit the maximum stored renders in the preferences dialog.
In this thread I’ve also included the full source code, both Maxscript and C#, in case anyone finds it useful. The code is not commented, but overall not too messy, and I will be happy to answer any questions about it.
Hi,
toggling the blue pluss button threw an error for me:
-- Error occurred in updateRender(); filename: D:\Autodesk\3ds Max 2011\scripts\startup\vfbplus.ms; position: 16281; line: 493
-- Frame:
-- manual: true
-- vray: undefined
-- renderString: undefined
-- called in toggleToolbar(); filename: D:\Autodesk\3ds Max 2011\scripts\startup\vfbplus.ms; position: 8041; line: 264
-- Frame:
-- storeRender: true
-- doUpdate: true
-- state: true
-- called in toggleHandler(); filename: D:\Autodesk\3ds Max 2011\scripts\startup\vfbplus.ms; position: 23683; line: 700
-- Frame:
-- e: dotNetObject:System.Windows.Forms.MouseEventArgs
-- s: dotNetObject:vfbplus.VFBButton
>> MAXScript dotNet event handler Exception: -- No ""-"" function for undefined <<
My rendered frame was already open when I executed the script, I guess that could have caused it, though I no longer get the error after I reran the script. Another issue with that button is that it overlaps the toggle UI button when I resize the window.
Besides that, this looks like a huge time saver and kudos for handing out the source!
Thank you for your feedback.
Yes I think that makes sense, though I will modify it so it won’t happen even once. Please let me know if you receive this error again for some reason.
Could you send me a screen grab that shows this problem? It is not supposed to overlap (and does not overlap on my machine)…
Great work on this lo, I’ll check it out first thing monday. Congrats and thanks.
Thank you very much.
I’ve uploaded some bug fixes to Scriptspot, and updated the attached source code zip.
hey lo great work. If I didn’t primarily use VRay and the VRay frame buffer i’d definitly use this.
Your curves control is pretty nice. I’ll probably mull over your source sometime soon for interest sake.
I have 1 bug report and 2 suggestions:
The bug: after pressing the clear history button, the VFB+ buttons revert to the standard max ui buttons.
tested on 2011 x64 winxp
suggestion 1: an actual exposure setting instead of (or in addition to) the brightness setting.
formula for exposure is: value * 2 ^ exposure
suggestion 2: a levels adjustment control. The formula is also simple if you need it.
Thanks for the feedback
This is actually the intended behavior. When there are no images to display, having the toolbar is useless, so it is toggled off. Perhaps the clear history button should clear all images except the last one?
Thank you, I will look into these suggestions.
Hi again, sorry for the late response.
I could not manage to reproduce the overlapping buttons, can’t remember what I did last time. Resizing the window is slow on my computer though, looks like 5-6 fps.
What machine and OS do you have?
For me it flickers, but the speed is decent.
I’ve released an update version which fixes several bugs.
http://www.scriptspot.com/3ds-max/scripts/vfb-a-feature-rich-extension-to-the-3dsmax-frame-buffer#comment-12960
I managed to reproduce the overlap problem. When rendering in unusual output sizes e.g. 295×350 the blue cross button overlaps the toggle ui button:
The overlap is not so prominent here though.
After having tested the it for a while the re-size lag come and goes. I’m using win7 64bit.
Don’t know if it is reported before, but toggling the UI overlays button does not work. The settings are not reapplied when turning it on again. If I have 2 pictures rendered and is viewing the first one, pressing the toggle button then shows the second image. That said, I have not updated the script, maybe it has been fixed?
I’ve updated a new version, adding features and fixing some bugs including the ones you mentioned.
New Features:
- Ability to save per-image color correction and curves settings (requested by Moulder6)
- Added exposure spinner to color correction (requested by Gravey)
- Option to make VFB window always on top (requested by Moulder6)
*Option to discard the last render and not the first render when history size limit is reached (requested by Moulder6)
Changed Features:
- Gamma correction is now pre-applied to the image, to avoid banding effects
- Renamed ‘Brightness’ spinner to ‘Offset’, to avoid confusion with exposure.
Bug Fixes:
- Toggle (+) button would overlap the ‘Toggle UI’ button in some cases (reported by Haavard)
- UI Overlays button would sometimes not work (reported by Haavard)
- Banding effects when using non-default gamma in 3dsmax (reported by Swahn)
- The ‘X’ button on exposure and curve controls would sometimes not work (reported by Moulder6)
- Pressing the ‘X’ button when editing the render region would not update the respective icon in the frame buffer UI (reported by Moulder6)
- Open in Photoshop would throw errors in some conditions (reported by Geo)
- Loading external images did not respect maximum history size
- Resizing the VFB would discard the VFB+ window title
- Rendering when the VFB is not visible would raise an exception
I’ve updated the source code in the first post to reflect the new version.
http://www.scriptspot.com/3ds-max/scripts/vfb-a-feature-rich-extension-to-the-3dsmax-frame-buffer