I would like for multiple cameras to be generated automatically with maxscript: For instance I would like to have a hemisphere around a product that I want multiple shots of and I want the cameras to be generated at the position of the vertices. Ideally the target of the camera is the center of the hemisphere or even better another object of choice. Even more ideally, is that the cameras are linked to the position of these vertices, so when I deform the hemisphere in any way, the cameras are following along. I've been looking around but haven't found anything that could help me. If someone could help me in the right direction, that would be great. Thank you.
Announcement
Collapse
No announcement yet.
Generate multiple cameras at position of vertices with Maxscript.
Collapse
X
-
Generate multiple cameras at position of vertices with Maxscript.
Tags: None
-
You can try with this function:
Code:fn attachToVertices targetSurface source = ( max create mode targetMesh = targetSurface.mesh usedVertices = #() coords = #([1, 0], [0, 1], [0, 0]) for faceIndex = 1 to targetMesh.numFaces do ( face = getFace targetMesh faceIndex for i = 1 to 3 do ( vertexIndex = face[i] if appendIfUnique usedVertices vertexIndex do ( maxOps.CloneNodes source cloneType:#copy newNodes:&result attachmentController = Attachment() attachmentController.node = targetSurface result[1].position.controller = attachmentController addNewKey attachmentController 0f newKey = AttachCtrl.getKey attachmentController 1 newKey.face = faceIndex - 1 newKey.coord = coords[i] ) ) ) )
-
Thank you! I tried but I'm not getting anything. Is there something specific I need to do?
Comment
-
It's a long shot, as I know nothing of Maxscript coding - but couldn't this maybe be repurposed to do this?
http://www.scriptspot.com/3ds-max/scripts/dome-light
Comment
-
It's a start indeed. But I just found this and this does exactly what I need and it stays intelligent, if I deform the object the cameras move with it: http://www.scriptspot.com/3ds-max/sc...ct-to-vertices
Thanks for your help guys!
Comment
-
Originally posted by Vizioen View PostThank you! I tried but I'm not getting anything. Is there something specific I need to do?
so after excution the above maxscript you can type the following for example :
Code:attachToVertices $Sphere001 $Camera001
-------------------------------------------------------------
Simply, I love to put pixels together! Sounds easy right : ))
Sketchbook-1 /Sketchbook-2 / Behance / Facebook
Comment
Comment