ScriptSpot

Script

Lele's Vray Tools

By Lele · Credited author: Emanuele Lecchi · 2007-01-28

Version
V. 1.41ss - SP2
Version requirement
3D studio max 8 - 11 (32 or 64 bits), VRay RCx, Final, SP1 and SP2 (32/64 bits)
Date updated
2014-03-15
Votes
157
Description

A set of tools to aid in the daily VRay work.

Updated to install with Max 2014.

WARNING: there is NO guarantee than any of the tools will work as intended, that they won't break your scenes in dramatic fashion, or skin your cat while you aren't looking.
This update comes purely because i needed the Physcam Autofocus for a personal test, and noticed they didn't install or run.
Having lost the source code for the encrypted parts, all i could do was to patch fix the (very ugly, with hindsight) installer and individual script launchers.
At least the autofocus routines still work in vray 3.0.
Feel free to let me know of issues, but also know that without a complete rewrite (quite unlikely), the fixes won't be forthcoming.

Updated for VRay 1.5 SP2.

The installer from V. 1.4ss - SP2 onward now has an option to automatically add the scripts to a ctrl+shift+alt quadmenu.
Notice it should append the scripts to whatever is already in the quadmenu (nothing, by default).
Please report any odd behavior, or undesired effect: it's a first attempt at the code, and may contain issues.

Anything to Physcam v.1.4: converts max standard cameras and viewports to VRay Physical Cameras, along with FoV animation.V.1.4 corrects a bug with camera views conversion, copies across clipping planes' ranges , and allows for individual camera naming at creation, rather than later by hand.

Matrix-Weighted Exposimeter V. 1.21 : very similar in principle to that of dSLR, it allows for different weighting of each slice/square in which the image is divided, as well as allowing a different range of pixel brightnesses to be chosen for the exposure (akin to real world lens filters).
Entirely customisable for behaviour.Now with auto-white balance and preset manager!

From V. 1.16 it supports exposure / White Balance animation through the script.
Please note this is not meant to be a frame by frame tool: doing so will result in flickering (like for standard dSLRs) and will likey lead to max crashes due to maxscript memory heap overload.
Keep previews small, Nth frame at around 1 second, and go in and refine by hand activating "Auto Key" from the max interface and exposing the problematic areas.

The Sample Rate calculator, new with 1.19, is an early attempt at DMC AA optimisation.
It will render a sample pass with whatever DMC AA (ONLY!) settings you have, analise the sample rate, and guestimate a new threshold value (AA noise threshold only) so that the BIAS setting may be met (+- 2.5%).
The BIAS indicates the pixel brightness average in the sample pass (where ~0 is min sampling, and ~1 is max sampling).
V.1.21 fixes the inconsistencies in vray versions when using QMC (now brute force) as a method for exposure GI.

Physcam Auto-Focus:Finds the closest object surface directly in front of the camera, and focuses the VRay Physical Camera to it.
Added DoF Preview rendering (near-realtime) for Physical Cameras which have been created with the Physcam Converter Script (so physical cameras parented to, and overlapping perfectly, a standard one) .
The function works only under Max2008, due to the fact that previos viewport grabbing methods would refresh the framebuffer before grabbing, losing the DoF effect. Implementation for earlier versions is possible and under study.
A drawback of the new grabbing method, though, is that you'll have to have the current viewport (the one selected just before pressing the script button, any viewport will do.) free of dialog boxes and such, as the grab will read from video memory and grab those as well.
For this reason, the script now pops up in the BOTTOM RIGHT CORNER of your screen, away from what's normally the camera view.

Please note that the preview is NOT accurate as to the Physcam. It's just meant as a visual queue to understand where the camera has focused.

VRay Realtime Sky V.1.01: Allows realtime update of the VRay sky in viewport, through any change of sun position or parameter. Changes the Sun intensity for DISPLAY ONLY, not at rendertime, to allow for sky visibility without a Physical camera exposure. IMPORTANT NOTE: it's strongly suggested to keep the Background Texture Size at something like 256 in the vieport driver preferences to obtain optimal realtime performance. If updates seem sluggish, slow, or impossible, that's what you want to change.
Updated the to refresh the viewport as soon as it's activated, and changed the viewport-only multiplier to 0.02 to better reflect the default Physcam camera exposure for the new Vray Sun and Sky models.

VRay rendertime infos 1.2: Shows some useful settings while vray is rendering, to allow for easy troubleshooting of scenes that seem to render for "too long", without interrupting the rendering phase Now with material interpolation min/max settings.Added in some GI options (don't render final image, GI modes and so on)

VRay Light Monkey V0.3 : allows for mass change of vray light's properties, for selected or all, in very quick fashion.Updated for 1.5 Final-sp1

VRay stuff collector V.1.1: Collects VRay specific objects and maps (proxies, VRay HDRI maps and so on) along with the max file and normal maps into a folder Now with support for IES profiles

Physcam parameters cloner: allows for quick copy/paste operations on VRay Physical Cameras

Physcam Presets Deck: Similar to the one above, but with a neat 12-slots deck which is session persistant and immediate in its usage

PPT/LC calculator: Expresses sample sizes in pixels (rather than normalised image ratio) and subdivs as shading rates (rather than absolute numbers)

 

Additional Info

Unpack the rar file into a temp folder, and RUN (it's not an i-drop package. use "maxscript->run script") main_installer.ms.
Check/uncheck what scripts you want installed, choose to deep-delete old files if you're on max 9 (useless in max 8), and press the install button.
You'll then find them into the "Customize->CustomizeUI->Lele's VRay Tools" category, and will be able to assign them to a menu, a button, a quadmenu or a keyboard shortcut.
Remember to save the UI configuration after you've done so, so to preserve the assignments on the next max run.

The scripts are released as donationware: if you like them, and/or use them for a commercial production, make sure you get the "i'm feeling generous" mood going, and drop a symbolic donation at the provided email address on paypal.

Attachments

Tags: 3D Studio Max 8, 3D Studio Max 9, 64 bit, Physical Camera, 3D Studio Max 2008, VRay 1.5 SP1 SP2

Comments (47)

not working in 2016

stmalk · 2016-07-29

Vray Camera convert doesn't work in 2016 with 3.40 Vray. It gives you an error "not creatable"
and this line is highlighted in the editor:

"VRcam = VRayPhysicalCamera whiteBalance_preset:4 whiteBalance:white name:(VRcamName) isSelected:on"

Vray Camera converter

patrick dyer · 2016-12-12

Hey Lele, any chance of updating this script so it works with max 2017 and V-ray 3.3 please?

Locking light intensity

3dwannab · 2014-10-13

When run on multiple/selected lights it greys out the light intensity of each one. Does it make them references or something?

Attachments

Not greyed out for me

Tommy_LedZep · 2014-10-14

Hi,
I can't replicate that problem here with VRay Light Lister - v4.0 on Max design 2015.
Maybe a fresh new install would solve your problem ?

Sorted

3dwannab · 2014-10-14

Silly me. I got carried away. The lights were set as sky portals therefore greying out the intensity.

Help says:
Skylight portal - when this option is on, the Color and Multiplier parameters are ignored; instead the light will take its intensity from the environment behind it.

Sorry to bother you.

I have found a workaround

Tommy_LedZep · 2014-06-04

Thank you.
I have found a workaround: I manualy run the VRayLightMonkey.mse file located in the usermacro directory and it works.

THX!!

segar · 2014-05-29

Thanks a lot Lele, You did a very good job :)

NicolasC · 2014-01-10

Thanks a lot, mate :)

fajar · 2013-11-01

Hey my friend I send you new file , updated 2013, it support installation for max 2014 too. Check the main_installer.ms inside the mzp file.

You can now drag and drop the mzp without getting error when installing process begin (hope so)

Thanks for the script.

Attachments

Lele · 2014-03-15

oh damn, if i noticed!
I didn't open this page for YEARS, and only now realised you did my work for me! :P
Well, it was a three minutes job, so no worries, and thanks anyways!

Lele

UI configuration not saved

Tommy_LedZep · 2014-05-30

Hi,
Thank you for the LightMonkey script, very usefull although it would be nice to have it work for regular 3dsmax lights too.
I have a problem: even though I saved the UI using the "Save custom UI scheme" option, I have to run the installer each time I run 3dsmax otherwise I can no longer use your scripts (I created a toolbar for LightMonkey and it is greyed out).
Any idea for what I have to do ?
Thank you in advance,

Lele · 2014-06-04

eh, I noticed, and can replicate it.
Will look into it, for what's possible with the code i have left un-encrypted.

prijady · 2013-05-22

Yeeha, you are the man, thanks

Brilliant fix!

ANDDNA · 2013-04-02

I was afraid of losing these tools in 2012 and beyond, but the fix is flawless! Running "Anything to phys cam" in 2012 x64 without issues. Others not tested yet.

Lele tools can work with 2013

yeeha68 · 2013-02-06

With a few modifications it can work with 2013. There are two parts to each script. A .mse which is a compiled script and a .mcr that calls it. In this case the .mcr doesnt work anymore because Autodesk has decided to make a huge mess of the directory structure. GOOD JOB AUTODESK!

i.e.- here is what the "Lele_s VRay Tools-Matrix_Exposimeter.mcr" looks like;(use a text editor)
========================
macroScript Matrix_Exposimeter category:"Lele's VRay Tools" silentErrors:true
(
on execute do(
filein ((getDir #UI) + "\\MacroScripts\\matrix_exposimeter_1.21_proc.mse")
)
)
========================
Change it to this;
========================
macroScript Matrix_Exposimeter category:"Lele's VRay Tools"
(
filein "matrix_exposimeter_1.21_proc.mse"
)
========================
Save it and put both the "matrix_exposimeter_1.21_proc.mse" file and the .mcr in the same "usermacro" directory.
Do this to each .mcr file used.
Enjoy!

Works like a charm in Max 2013!

3DV · 2013-03-09

Thanks a lot for this fix!
These tools are real timesavers.

pedz3d · 2014-01-28

thanks a lot. it works on 3ds max design 2012 X64

Any chance

JCR2011 · 2013-01-25

even slim, of an update for 2013? Even just the camera converter would be great...
Thanks again for these great scripts LeLe,

voltron7

dsp_418 · 2013-01-26

+1

k2000 · 2012-04-12

+1
we need 2012 x64 version!

chakib · 2011-12-01

Please we need x64 2012 version !

HarryPotter · 2011-10-18

Any update for these for Max 2012 64bit?
Thanks...

NicolasC · 2009-07-07

Hello,

 

First of all, thks for this great set of tools !

However, I've a problem using  the RealTime Sky feature ... it doesn't do anything :( I'm on 3dsmax 2009 (32b) and VRay 1.5 SP2.

 

Thanks in advance for any help !

 

Cheers :)

 

 

 

fajar · 2009-05-16

I suggest U use Vray proxy manager!! may be you can find it here or CGplusplus.com

KVMaster · 2009-05-26

Thanks FAJAR, I'll download and check it out. I couldn't find it here but found it on CGplusplus

KVMaster · 2009-05-14

VRay stuff collector

Is there a way for this to redirect the proxy file path to the same folder/location you selected to collect to? Just like how a Resource Collecter works with Update Materials checked?

Thanks in advance,

satyambabu · 2009-02-03

wow excellent scripts thanku

Lele · 2008-12-03

Sam: There's nothing like a manual or a tutorial, unfortunately. In most cases, it's point and shoot, and it works well enough (provided you have a physical camera to expose, ofc). The rest of the options are more or less explained in the accompanying TXT file.
If you have precise questions, feel free to ask them :)

Fajar:I'd need more informations (and possibly a scene) to find the bug: it doesn't error out here, for some reason.
If you feel it's a repeatable bug, please prepare me a scene, and a small report on how to reproduce it, and send it to the mail in the readme.txt in the script pack.
I thought the stuff collector did that, but it may have slipped.
I sure will do that asap (meaning within the month: snowed under at work atm.), thanks for the pointer.

Lele

fajar · 2008-09-02

I love this script very much but I got some error when converting camera to vray phsycal camera (the newer script(not the older))

can you look up for it!!

can you U make the vray stuff collector update the path of vrmesh file!!

thanks for your great script!!

sam75 · 2008-08-20

Hi,

i don't really understand how the exposimeter works, is there a tutorial somewhere telling how to use it properly ?

Thanks

Lele · 2008-07-07

I thought i fixed that a while back, but it's evident something slipped.
Thanks ever so much for the pointer, will look into it ASAP (atm i have no Pc to do script dev on, it will take me a week or so to get sorted).

Lele

zeronove · 2008-07-06

Hi Lele,

I am testing your exposimeter with max design 2009 (64)+VRay SP2 (64)+xp64. Everything seems to work fine with the exclusion of the "exposure-only GI settings"; when "QMC based" is selected the script returns this error:
Unknown property: "qmcgi_subdivs" in V_Ray_Adv_1_50_SP2:V_Ray_Adv_1_50_SP2

I suppose someway related with QMC vs. DMC inside maxscript

just to notify it

a.

adytc · 2007-08-26

Now it works.
Thank you again for your support.

Best regards,

Adi

P.S.: I'm looking forward to see your tutorial about interior rendering :)

adytc · 2007-08-26

Hi Lele.
I've downloaded your video tutorial about VRay Sun, Sky and Physical Camera and I must say that I was very happy seeing that your concept works.:) Thank you so much for sharing it with us.
Now, what I wanted to ask you is where can I get your latest script VRay_Physical_Mats_Converter (I've tried the link posted on ChaosGroup forum, but it looks dead).
Thank you again for your support.
Best regards,
Adi

Lele · 2007-08-06

Make sure you used the main_install.ms script to install the pack, or nothing will work as expected.
Check that VRay is the current renderer.
Most tools check that before even starting.
Once this is all done, simply drag the commands from the Customize UI interface onto toolbars and such.

Should this not fix it, try and mail me the contents of the maxscript listener after you try and run the script.

Lele

Animaleante · 2007-08-05

Hey Lele, this tools are amazing, but I'm havin problems with the maxcam 2 PhysCam. I've made the button and so...but when I click..it doesn do anything. I'm using max9and vray 1.5rc3.
Help plz
And keep up the good work!^^

Lele · 2007-07-04

Just fixed the silly mistake with the matrix exposimeter's presets.

They now load properly.

Also, i gave up on the maxscript interface for the VRimg2EXR.

Way too much work, and it will be soon replaced by the Chaos' own made one, i reckon.

Lele

Thak's Lele, now it's much

cecofuli · 2007-07-01

Thak's Lele, now it's much more clean. 😉

cecofuli · 2007-06-27

Another question for the vrimg2exr.exe program. What's the -datawindow option?  Why in you exporter not exist?

 

Thank's

Lele · 2007-06-28

http://www.scriptspot.com/blog/lele/me-and-my-bugs

This answers (not!) why the converter has those issues.

It was written on rc2, but in the further RCs something must have gone wrong with it, as the tool seems to be in a state of active developement, at a much quicker pace than i can follow with my free-time scripting...

Chaos promised to release its own converter interface pretty soon, so this one is left at the very back of time allotment.

My suggestion is to use it for what it can do, and then simply export by hand whatever channel gets skipped by it.

Of course, should i find time to update it (it's a hell of a lot of code to wade through, for simple a tool it is) you'll know through ScriptSpot.

As to for what any option does, you can simply run "VRimg2Exr.exe" without parameters in a dos window, and it'll output an help page.

It's not in the converter as it's been added after i coded it.

It's best if you ask the question regarding what it does in the chaos forums, as i haven't yet looked into it, and from the look of things, won't be able to do so in a while...

Lele

cecofuli · 2007-06-27

Hello Lele, i have a question for you. In you vrimg converter, why the  VRayZDepth is not recognized? And why the mtlID, RenderID and ObjID is not convert to exr?

 

anyway, thank's 😎

MaxCam_2_PhysCam doesn't

DraKeXXI · 2007-03-10

MaxCam_2_PhysCam doesn't work on my MAX8 SP3. When trying to convert a max camera, MAX freezes and exit. Am I the only one?

Any chance of getting this issue fixed?. I'd really thank you, Lele.

Lele · 2007-03-12

Hello Drake, and thanks for the pointer.

I am aware of an issue (cascading into another...) with the script which is due to the physcam not liking its target to be fiddled with and producing a max crash.

To solve this i had to code a small hack, which returns the second issue: the animation of the original camera's target gets lost upon conversion.

To fix these, i am waiting for the final release of VRay 1.5, so not to have to do some obscure twiddling to the code to adapt it to a known bug.

This said, there may be some silly bug still hiding here and there, even though aside from the aforementioned one(s) you're the first i hear that gets crashes.

It's been tested well only under RC3+, as of now, but if you feel it may still be the script, please mail me the scene and some infos at "emanuele dot lecchi at gmail dot com" and i'll look into it asap.

Thanks again for the report,

Lele 

DaForce · 2007-03-12

I have tested here on max8 sp3 and it works exactly as expected. (non animated camera)

Thanks again Lele 😎

Lele · 2007-03-23

Anything_2_Physcam Rewritten

I rewrote the code for the Physcam Converter (anything_2_physcam) so to better handle animation.

Also strenghtened the script generally, and removed previous hacks which were needed in previous RC versions of Vray.


It now comes with an interface, tooltips and a "quick help" button.

Allows conversion of selected, or all cameras (if none is selected), or of the current view, whatever the type is (orthogonal, perspective or camera view).


It's also able to match FoV animation in a number of fashions: Creating linearly interpolated keys where the original keys were (in which case it will lose any non-linearly interpolated ease that was give to the curves, eg. bezier handles); Using the same controller type a the original camera, but NOT copying over every key parameter (hence the animation may not match exactly, but should be in most cases very close), only time and value; Baking the animation per frame on the Physcam FoV , representing the original FoV animation very precisely, at the expense of some weight on the scene, unnoticeable but for the most massive of conversions.


So far, not one max crash due to the previous issues.


Please provide any feedback (issues or suggestions, preferably...) as to its usage.


Lele

ps

Renato · 2007-05-02

Thanks, everything works like a dream. The installer make life so easy!! Keep it up Lele.

 Cheers

Renato