VFB+ : Including Source Code

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 08 August 2011   #1
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.

ScriptSpot download link

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.
Attached Files
File Type: zip vfbplus_v1.42_source_code.zip (44.5 KB, 78 views)

Last edited by lo : 09 September 2011 at 07:03 PM.
 
Old 08 August 2011   #2
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!
__________________
Homepage clicky clickey!
 
Old 08 August 2011   #3
Thank you for your feedback.

Originally Posted by haavard: 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.

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.

Originally Posted by haavard: Another issue with that button is that it overlaps the toggle UI button when I resize the window.

Could you send me a screen grab that shows this problem? It is not supposed to overlap (and does not overlap on my machine)...
 
Old 08 August 2011   #4
Great work on this lo, I'll check it out first thing monday. Congrats and thanks.
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 08 August 2011   #5
Thank you very much.

I've uploaded some bug fixes to Scriptspot, and updated the attached source code zip.
 
Old 08 August 2011   #6
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.
 
Old 08 August 2011   #7
Thanks for the feedback

Originally Posted by Gravey: The bug: after pressing the clear history button, the VFB+ buttons revert to the standard max ui buttons.

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?

Originally Posted by Gravey: 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.

Thank you, I will look into these suggestions.
 
Old 08 August 2011   #8
Thumbs up

It is even actually working! This is too awesome to be true!
 
Old 08 August 2011   #9
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.
__________________
Homepage clicky clickey!
 
Old 08 August 2011   #10
Originally Posted by haavard: 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/s...r#comment-12960
 
Old 08 August 2011   #11
I managed to reproduce the overlap problem. When rendering in unusual output sizes e.g. 295x350 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?
__________________
Homepage clicky clickey!
 
Old 08 August 2011   #12
Version 1.1 released

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/s...ax-frame-buffer
 
Old 09 September 2011   #13
Version 1.13 Change Log

New Features:
* Option to store history images on hard drive instead of on RAM, reducing the memory footprint of the application. This is now the default store method.
* Across the board memory optimization (on average 50% less memory used, for both history storing modes!)
* Load/Save curves presets. File format is fully compatible with all Adobe products!
* Option to change temporary save folder, optionally receive notification if it's getting too big.
* Option to hide split A/B line (requested by StealthX).

Bug Fixes:
* Original VFB would show underneath VFB+, causing flicker when resizing the window.
* Split A/B line width could sometimes be 2 pixels wide instead of 1 (reported by StealthX).
* Exposure and Curves 'Local' button would sometimes not work properly (reported by Moulder6).
* Render time label would show wrong result if render went past midnight (reported by Moulder6).
* Shift+TAB would not work properly in the Exposure spinners.
* Exposure spinner would show artifacts on some machines.
* Zoom using mouse wheel would stop working when display control did not have focus (reported by Moulder6).
* Always on Top' option would keep the VFB on top even if 3dsmax was not the active application (reported by Moulder6).
* Pressing 'escape' at some points could raise an exception.
Many other cosmetic fixes.

Thanks to all the great people who contributed feature requests and bug reports!

download link:
http://www.scriptspot.com/3ds-max/s...ax-frame-buffer

source code in this thread has been updated.
 
Old 09 September 2011   #14
hey lo, just a quick one. had a brief look over your C# source and you have the exposure parameters around the wrong way in the Math.Pow function.
you have:
Math.Pow(targetCC.exposure, 2f)
should be:
Math.Pow(2f, targetCC.exposure)
ie. 2 to the power of exposure rather than the other way around.
 
Old 09 September 2011   #15
thanks, will fix asap
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.