Lock The Camera


#1

I just saw similar thread and wanted to ask this without hijacking the other.

I use Maxwell, and it uses the Rhino camera (including focal point) for defining the render. I create a new viewport and camera, toggle it visible and then use the camera points to line it up perfectly. I then set the focal point for the camera specifically where I want it.

As soon as I click in another window and go back to my render window, it changes the focal point. Every time.

It would be great if you could just lock a camera so it couldn’t move at all. There have been plenty of times I accidently bump my space mouse and move my camera off of it’s location.


(Pascal Golay) #2

Hi Eric- use NamedView to save a view, then turn on the camera widget for that view and its points to manipulate the view- does that get you anywhere?

-Pascal


#3

I do that. I set a view called Render Cam then open a floating viewport on my other screen and toggle the camera. I then use my normal viewport to set up the render, but I have to make the named viewport active before I hit Render. Everytime I do, the focal distance jumps.


(Pascal Golay) #4

Hi Eric- just to make sure, what I am suggesting is not the camera that you get from F6 , but by saving a named view (namedView command)and turning on the camera widget for the named view and then manipulating the points for that camera widget.

-Pascal


#5

Yes, I use a named view. It is a problem with them.

I quickly made this to show you the problem. It applies to default views as well.


(Brian James) #6

Hi Eric,

Does the command ‘Maxwell_AutoFocusObjects’ do what you want? Just make the floating viewport your named view and then run this command. You’ll be asked to pick the objects that you want to be in focus but the view won’t actually change.


(Pascal Golay) #7

OK, the reason I asked is that the camera in your animated image does not look like a named view widget, it looks like the interface you get from the Camera Show command, which is not the same thing.

-Pascal


#8

@BrianJ, I have to use the Maxwell focus commands before the render, but when I switch back to the other views to tweak or move one more thing, I have to refocus my camera prior to render as the focus jumps as described.

@pascal, ok, I had no idea there is a camera widget. What is the command to turn that on? I have a named viewport “RenderCam” that I set up in a floating viewport. Then I use Camera T to show it, and adjust in my Top, Front, Right, Persp viewports.

Can the camera widget be locked so it isn’t move accidentally?


(Pascal Golay) #9

Hi Eric-
There are controls in the NamedView panel- this is what I originally tried to explain.

-Pascal


#10

@pascal, I’m sorry Pascal. I didn’t notice those options in the Named Views panel. I was looking in the help file for a command to call at the command line.


#11

My first question would be: are you able to reproduce this behavior with the space mouse taken out of the picture? My guess would be that what you are seeing here is the device interactively altering the view, which I suppose might be pretty understandable, in the case that it wants to rotate about some point other than your focal point. If that’s the cause, with the alteration occurring simply as a function of selecting the viewport, then as Pascal suggests, storing your view, and then restoring it just prior to rendering, will be about the best way to go.

I should be able to help you deal with this in the future by adding a manual override for focal distance to the plugin’s camera model. I’ll also look into adding some auto-focus modes, with optional exposure compensation. I already wrote the logic for that for use in the SketchUp plugin, and at least in theory, it should not be difficult to bring it over to Rhino.


#12

@jdhill, I just looked at your profile and didn’t see anything. What company are you with?


#13

@pascal, I thought this would fix it, but it doesn’t. The named view camera widget and the viewport camera are separate objects. Maxwell uses the viewport camera and not the named view camera for the render.

As soon as you open a viewport and set the view to your named view, the viewport camera uses it’s own focus instead of the named view’s.


#14

Yeah, I still have to fill that stuff out. I am with Next Limit, and am the author of the Maxwell for Rhino plugin.


#15

@jdhill, perfect! Can you just change this to be selectable? That way I could select the named view as Pascal outlined.

It would also be nice to lock the Fire window to a named view as well. Right now I have a floating viewport and Fire on my second monitor while I work in the 4 standard viewports on the other screen. This would totally eliminate the viewport / named view camera issue.


#16

Technically, I don’t think I can do that, but as I say, I can provide an explicit override for focal distance. That aside, though, could you please confirm whether the present issue is, in fact, related to your use of the space mouse?


#17

@jdhill, sorry, I unplugged the space mouse and the behavior is the same. The focal point jumps when you adjust the viewport camera in one viewport then select the other viewport to activate it.

It also happens when you use the Maxwell command to set the focal distance, activate a different viewport and then return to it.

Anything you can do to improve this issue would be appreciated. But the named view solution that Pascal outlined seems like such an elegant solution to the problem. Maybe an option in the Scene Manager > Output tab to lock the output to Active Viewport or Named Viewport?

I can’t tell you how many times I’ve gone to check on my renders to see that I have accidently rendered with the wrong viewport activated or that my scene is not in focus. Waste of a 2 hour render.

BTW, I am a jewelry designer and basically do macro photography renders, so aperture and focal distance greatly affect the outcome.


(Brian James) #18

Hi Eric,
Just checking that you also restarted Rhino…


#19

It may not be sufficient to unplug the device – I assume it also installs a Rhino plugin, and that it would be this plugin which is manipulating the view. To know for sure, this plugin would need to be disabled or uninstalled, and as Brian indicated, Rhino restarted.

When you set focal distance via Maxwell, you are setting the focal distance of the view, nothing more, so this would describe the expected behavior.

If you mean similar to the way that Maxwell Fire is able to lock on a viewport, then in that case, yes, this would be a possibility. It would not prevent direct modification of the view or viewport by you or a plugin, though, as this is something which needs to remain Rhino’s business.


#20

@BrianJ and @jdhill - Yes, it was the plugin. Sorry. When the 3DConnexion plugin is NOT loaded, the focal point works as expected.

That would solve both problems (rendering the wrong viewport and jumping focal point).

Right now, I can:

  1. Open a floating viewport
  2. Set view to a named view (RenderCam)
  3. Lock Fire to RenderCam
  4. Close the floating viewport, which activates the Perspective viewport
  5. FIre remains locked to RenderCam
  6. Open the named view camera widget and adjust
  7. Fire updates based on the definition of the named view camera widget as expected
  8. Hit render and the Perspective viewport is sent in the MXS file

So just changing step 8 to:

8… Export the MXS with the view that Fire is locked to

–or–

8.Select an option in Scene Manager to change the Camera from Active to a named viewport.

9.Export the selected view from Scene Manager is sent in the MXS file.

Boom, all my problems in life are solved and I owe you a beer or steak or poison of choice.