Create Vray Camera from Perspective View

6 votes
Version: 
1.0
Date Updated: 
06/15/2013
Author Name: 
Oliver Emley

This is a script that will allow you to create a Max Standard Target Camera (Ctrl+C) at the click of a button. More importantly it will allow you to create a VRay Phycical Camera from prespect view at the touch of a button. No more having to align your Vray-camera with the standard Max Camera. You can also choose which camera to display in the selected viewport from a drop-down list

 

 

Additional Info: 

To install simply copy the downloaded macroscript file to C:\Users\(Username...)\AppData\Local\Autodesk\3dsMaxDesign\2013\ENU\usermacros You may need to enable show hidden files to access the folder. After that you open 3ds max, go to customize> Customize User Interface> Toolbars. Under category find Oliver Emley and then drag CAMVIEW to an existing toolbar or create a new one. I have created it in Max 2013 but it may work in prevous versions. Hope it makes all your lives easier.

 

 

Version Requirement: 
Max 2013 & Higher
Other Software Required: 
VRAY
AttachmentSize
oliver_emley-camview1.0.mcr4.44 KB
camview.jpg68.87 KB

Comments

Comment viewing options

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

2018 Max

It does not work for 2018 version. Not for Vray physical camera at least. The 3ds camera works fine.

alizehi3d's picture

VRay Phycical Camera

by Con+c we can create default 3ds max camera, what about VRay Phycical Camera?
why chaos group did not working on this?
https://irancgcenter.com/

vfga10's picture

Corona

Does it work with Corona Cameras?
Could you update the script for it please?

JCR2011's picture

Thank you

So much for this incredibly useful script!

fajar's picture

--- a rip off from max

--- a  rip off from max create camera from viewport ported to vray physical camera
-- assign some keyboard to it , to make it easy
macroScript VRayPhysicalCamera_From_View
ButtonText:"Create V-Ray Camera From View"
category:"VRay" 
internalCategory:"Lights and Cameras"
Tooltip:"Create V-Ray Physical Camera From View"
Icon:#("Cameras",3)
 
(
	on IsEnabled return (If (viewport.Gettype() == #view_persp_user) do return true)
 
	on execute do
	(
	fn verifyRenderer=
	(
		if (matchpattern ((renderers.current) as string) pattern:"v_ray*" ignoreCase:true) then return "vray" else return "other"
	)
 
	myCamColor=(color 5 54 179)
	myCamTarget=getscreenscalefactor [0,0,0]
	myCamVOF= getViewFOV()
	myCamXForm= Inverse(viewport.getTM())
 
	if viewport.Gettype() == #view_persp_user do
		(
			if (verifyRenderer()) == "vray" then	
			(	
				sCam=vrayPhysicalCamera  target_Distance:myCamTarget isSelected:on \
							wirecolor:myCamColor
				sCam.specify_fov=true
				sCam.fov= myCamVOF	
				sCam.Transform = myCamXForm 
				viewport.setcamera sCam	
				sCam.targeted=true	
				scam.target.wirecolor=myCamColor
				sCam.type = 0
			)
			else
			(
				stdCam = Freecamera  targetDistance:myCamTarget isSelected:on wirecolor:myCamColor
				stdCam.fov = myCamVOF
				stdCam.orthoProjection = false 
				stdCam.Transform = myCamXForm 
				viewport.setcamera stdCam
				if(Perspective_Match.IsMatching() == false) then
				(
					stdCam.type = #target
					stdCam.target.wirecolor = myCamColor
				)	
				--messageBox "\tCreate V-Ray PhysicalCamera \nonly support when you're set V-Ray as renderer !" title:"3ds Max"
			)
		)
	)
)

assign to your ctrl+c shortcut....it'll create vray camera instead standard camera when its detect your renderer is vray , n standard camera if the renderer isnt vray.

3dmax farsi's picture

VRay Phycical Camera

by Con+c we can create default 3ds max camera, what about VRay Phycical Camera?
why chaos group did not working on this?
http://www.3dmaxfarsi.ir/

Architectural Drawings and Projects
https://www.vrayshop.ir

MrTom's picture

A VRay camera can be aligned

A VRay camera can be aligned to the perspective view by creating it in another viewport, activating perspective view and THEN use 'CTRL + C' as normal.

This will align the new VRay camera to the perspective view....in fact it'll align any selected VRay camera to the perspective view.

zeablyk's picture

Yeah...

Yeah, but you can find this in Z Tools, you can find more here 

dsp_418's picture

Very useful, thank you!

Very useful, thank you!

Comment viewing options

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