& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
It seems there is no way in max to convert a old camera in a new Physical Camera...
I have made a script for this:
old_cameras = $Camera* as array old_cameras = (for o in old_cameras where o.baseObject.category == #standard collect o) for old_cam in old_cameras do ( new_camera = Physical_Camera() new_camera.transform = old_cam.transform new_camera.specify_fov = true if old_cam.type == #free then ( new_camera.targeted = false ) else ( new_camera.targeted = true new_camera.target_distance = old_cam.targetDistance ) for prop_name in getPropNames old_cam do ( if hasProperty new_camera prop_name then ( prop_value = getProperty old_cam prop_name setProperty new_camera prop_name prop_value ) ) )
Solved! Go to Solution.
Thanks for taking the time to create this script and sharing it! I may try it soon. Do you know if it works with Vray cameras?
I would need to convert the new Physical Camera from max2016 into the old Free Standard Max camera.
Do you think it's possible to convert that with your script ?
Or some adjustments ?
That would be amazing !
Thank you so much for every little help,
appreciate it !
This script doesnt seem to work...
Hi jens.diemer
Very thanks for your script !
I'm do some little upgrade:
-ability to convert selected cam only.
-name the new cam with the original name
old_cameras = $Camera* as array --No Vray convertion neded old_cameras = (for o in old_cameras where classof o == Targetcamera or classof o == Freecamera collect o) if selection.count==1 then ( if classof (selection[1]) == Targetcamera do ( old_cameras = #((selection[1])) ) )else() for old_cam in old_cameras do ( new_camera = Physical_Camera() new_camera.transform = old_cam.transform new_camera.specify_fov = true new_camera.name = "(phy)" + old_cam.name if old_cam.type == #free then ( new_camera.targeted = false ) else ( new_camera.targeted = true new_camera.target_distance = old_cam.targetDistance ) for prop_name in getPropNames old_cam do ( if hasProperty new_camera prop_name then ( prop_value = getProperty old_cam prop_name setProperty new_camera prop_name prop_value ) ) )
JBB
This is amazing! Thanks so much...
One thing I notice is that the new physical camera ends up facing in the opposite direction to the original target camera
Hi TroyHome,
Wat is your 3ds max release ?
Thx.
JB
Hi TroyHome,
What is your 3ds max release ?
Thx.
JB
Hi TroyHome,
I haven't test the script on 2017...
but normally it working.
The position of target of original Cam it not so nearest from cam point ?
TH,
I found that the float default value of the target distance is different between standard camera and physical camera.
MAX Help / MAX Script / Camera Common Properties, Operators, and Methods
... more info
Therefore, when I use this script, and I found that the new target could not match the old target's position.
However, I do not have any idea of how to convert the difference between the float default values to the same.
And then, I did something different.
I did a little changes based on the upgraded version which written by jbaptiste.
I did not use "target.distance", I changed it to "target.transform".
It seems that it works.
I paste the script here...
old_cameras = $Camera* as array --No Vray convertion neded old_cameras = (for o in old_cameras where classof o == Targetcamera or classof o == Freecamera collect o) if selection.count==1 then ( if classof (selection[1]) == Targetcamera do ( old_cameras = #((selection[1])) ) )else() for old_cam in old_cameras do ( new_camera = Physical_Camera() new_camera.transform = old_cam.transform new_camera.specify_fov = true new_camera.name = "(phy)" + old_cam.name if old_cam.type == #free then ( new_camera.targeted = false ) else ( new_camera.targeted = true new_camera.target.transform = old_cam.target.transform ) for prop_name in getPropNames old_cam do ( if hasProperty new_camera prop_name then ( prop_value = getProperty old_cam prop_name setProperty new_camera prop_name prop_value ) ) )
By the way, I test it in 3ds max 2017.
Thanks for the effort jens.diemer and jbaptiste made. Nice script.
It worked for me when working on our latest animation.
Check out the trailer here:
http://stillinmotion.com/smart-shoe/
cheers,
Bernhard
Nice animation!! Congratulation!!
And I just wrote a new script. Similar, but for the different purpose.
It is converting a physical camera to a standard one.
Paste this script...
old_cameras = $Camera* as array old_cameras = (for o in old_cameras where classof o == Physical_Camera collect o) if selection.count==1 then ( if classof (selection[1]) == Physical_Camera do ( old_cameras = #((selection[1])) ) )else() for old_cam in old_cameras do ( new_camera = FreeCamera() new_camera.transform = old_cam.transform new_camera.name = "(standard)" + old_cam.name if old_cam.targeted == false then ( new_camera.type = #free ) else ( new_camera.type = #target new_camera.target.pos = old_cam.target.pos ) for prop_name in getPropNames old_cam do ( if hasProperty new_camera prop_name then ( prop_value = getProperty old_cam prop_name setProperty new_camera prop_name prop_value ) ) )
In this case, I do not use "target.transform", I use "target.pos".
Something weird, "transform" would not bring the right result.
However, if the camera has simple animation, it could add the setting of the parent constrain to camera and camera target.
For the new one following the old one's animation.
For example...
new_camera.parent = old_cam
Test it in 3ds max 2017.
Doesn't work on my end when using max2019.
What am I missing here?
https://i.imgur.com/NFErag3.gif
I recorded a simple gif for demo it. Save .ms, and drag it to your 3dsMax.
If you are not versed in ms script, like myself, another workaround is to create a physical camera in the scene, align it on all axis in the align tool, then link it to the existing old camera. Then type in the same FOV angle from the the old camera into the physical camera's FOV and sect that as camera view. It's a perfect lens match, and is perfectly linked to any animation settings the old camera has. You can then use the DOF and motion blur settings as desired in the physical camera. I have done this in MX 2020 with Arnold.
To clarify a little more : Create a Physical camera in the scene where you want to replace an old camera. Un-check the targeted box. Select the align tool with the new camera selected, then click on the old camera. When the align tool dialogue opens, check all the X,Y,Z axis to align orientation and do the same with scale. Then again select the Physical camera, enter the same FOV number as is in the old camera. When you change the selected camera in the camera viewport to select your physical camera, the view will not alter at all - showing you the lens is a perfect match in angle and orientation. Final steps are to link the Physical camera to the old camera body to apply all transforms and animations previously applied. Adjust exposures / DOF and motion blur as desired in the Physical camera. Hope that is more clear!
Even easier (works in 3ds Max 2023, anyway):
♫ Ta-daaa!! ♪ No MaxScript or even Align Tool required.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name