User avatar
By abgrafx3d
#10468
Based on the "DOF toy for Max" that dschaga created and the idea that 8etty had (connecting the near focus limit and the far focus limit to the near clipping plane and the far clipping plane), I decided to see if I could make this work.

Here's what I did manually:

1. Create a new camera - name it "DOFhelper"
2. Parent constrain the new camera to the Maxwell camera with no offset
(maintain offset unchecked - camera should snap to Maxwell camera location)
3. Show clipping planes for "DOFhelper" cam
4. Create the following expressions for the "DOFhelper" cam for NearClipPlane and FarClipPlane respectively:

DOFhelperCameraShape.nearClipPlane=100*MXCamera1.nearFocusLimit;
DOFhelperCameraShape.farClipPlane=100*MXCamera1.farFocusLimit;

(note: the factor of 100 is because the units of the near and far focus limits in the channel box for the Maxwell camera are in meters - just converting to cm)

5. To show or hide near/far focus limits (clipping planes of "DOFhelper"), select the "DOFhelper" cam and go to Display, Camera/Light Manipulator, Clipping planes from the menu

I'll automate this in a mel script soon :D
User avatar
By ludenhud
#10471
That sounds pretty sweet, but I think I wait for the mel :D or why not post a .mb scene file with the camera loaded until the mel is done? :]

*PM me if you want web-space for 5-6mb
By DELETED
#10476
DELETED
User avatar
By tom
#10488
:D happy coding wayne! this is cool news for maya users ...
By Maya69
#10510
very good stuff

i try

thank
By pabl0
#10527
cool !

thanx abgrafx !!! :wink:
By Takumi Takahashi
#10529
Good idea, abgrafx !
If you need some help with MEL, let me know.
By jep
#10548
I can't wait to try this! Great post!
User avatar
By abgrafx3d
#10564
ludenhud wrote:why not post a .mb scene file with the camera loaded until the mel is done?
Here's the DOF test scene with the "DOFhelper":

http://abgrafx.com/maxwell/testDOF1_revised_clip.mb

also one other thing, needed to add one more expression for the focal length of the "DOFhelper" cam:

DOFhelperShape.focalLength=Maxwell_CameraShape.focalLength;

Change to the perspective cam, select the "DOFhelper" cam from the outliner and then show clipping planes (Display, Camera/Light Manipulator, Clipping Planes from menu) and you can see the range of focus (total depth of field) visually. :wink:

I'm getting close with the mel script for this :D
User avatar
By abgrafx3d
#10578
Takumi Takahashi wrote:If you need some help with MEL, let me know.
Here's the script:

DOFhelper V1.1

I have not thoroughly tested this yet, so use at your own risk.

Does anyone know how to display clipping planes in mel? The only thing I found was:

ShowCameraManipulators;

but this shows center of interest, pivot, clipping planes and cycling index - I only want to show clipping planes.

Thanks everyone for the comments/praise - just trying to help make things easier :D
Last edited by abgrafx3d on Fri Mar 18, 2005 8:24 pm, edited 1 time in total.
User avatar
By iker
#10584
abgrafx3d, you are a great man! :D

Thanks for your help!
User avatar
By abgrafx3d
#10589
Thanks iker! Glad to help!
By jep
#10596
abgrafx3d - YOU ROCK!

Thanks!
Jep
By Takumi Takahashi
#10605
abgrafx3d wrote:
Takumi Takahashi wrote:If you need some help with MEL, let me know.
Does anyone know how to display clipping planes in mel? The only thing I found was:

ShowCameraManipulators;

but this shows center of interest, pivot, clipping planes and cycling index - I only want to show clipping planes.

Thanks & good stuff... btw below line should show the camera manip for DOFhelper.

renderManip -cam off off off on off DOFhelperShape;

I guess you can insert this somewhere after you created your DOFhelper camera (haven't look at your script yet).

Also it would be useful to show both camera in the 2 pane layout.
such as ...

TwoStackedViewArrangement;

This way you may not need to show the clipping planes.

-tak
User avatar
By tom
#10634
i'm not in maya but your work is cool Wayne...keep it, thank you again!
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]