Camera matching
 1-13  14-33  34-38

Previous
Next
 From:  Michael Gibson
3644.34 In reply to 3644.33 
Hi PaQ, ooops sorry yeah I see now that last script won't work unless your image width:height happens to match the same 3:2 aspect ratio of 35mm film.

In order for this to work on any size viewport, the width to height aspect ratio needs to be known by the script, so the previous one will be the one to use.

By the way, the reason why MoI controls the angle by the innermost square is so that there isn't a really big difference in the general working seen area of the view depending on the window's current size. For example if you drag the main MoI window to different shapes, you get stuff like this:






If the display is controlled by horizontal angle only, then that tall viewport would have its contents look kind of all shrunken down, if it used the same horizontal angle as what was used for the initial wide viewport.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  danperk (SBEECH)
3644.35 
Hi Michael,

I'm trying to do something a little different than PAQ, but related.
Instead of matching the MoI view to modo, I'm matching modo's view to MoI,
so I can save an Adobe Illustrator hidden line file and match the view in modo,
then replace the Shaded background image with a modo render.

So far this is what i've been doing to get modo's FOV:



and for modo x and y camera rotation:

rotation x = 90 minus MoI's up/down angle
rotation y = MoI's left/right angle

Is there a way through scripting to get Moi's current 3D viewport pixel dimensions and camera coordinates/focal point coordinates?
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3644.36 In reply to 3644.35 
Hi danperk, it turns out that there is a bug in MoI's setting of the FOV angle - the script interface for setting it did something wrong so that the angle that you see or set in the UI does not end up being the proper actual angle in the view.

So you'll need a fix for that before any actual proper matching will be possible. If you e-mail me at moi@moi3d.com I can send you a test version that will help with that.


> Is there a way through scripting to get Moi's current 3D viewport pixel dimensions
> and camera coordinates/focal point coordinates?

Check out here for some script that will get the camera and target coordinates:
http://moi3d.com/forum/index.php?webtag=MOI&msg=5981.2

The pixel dimensions are available as .pixelWidth and .pixelHeight properties on the viewport.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3644.37 In reply to 3644.35 
And then when you do get a proper FOV setting, the way the FOV works in MoI is it controls the FOV of the minimum of either the width or height of the view. If the one in Modo is the FOV of the entire viewport width instead then you'll have to take that difference into account as well.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  danperk (SBEECH)
3644.38 In reply to 3644.37 
>And then when you do get a proper FOV setting, the way the FOV works in MoI is it controls the FOV of the minimum of either the width or height of the view. If the one in Modo is the FOV of the entire viewport width instead then you'll have to take that difference into account as well.<

Thanks Michael, yeah I got that from your previous posts in this thread. I use the same viewport proportions in modo and it works well.

For anyone who needs it:

script: /* 3D window pixel dims to clipboard */ var px = moi.ui.mainWindow.viewpanel.getViewport('3D'); moi.copyTextToClipboard( 'Height=' + px.pixelHeight.toString() + '\r\Width=' + px.pixelWidth.toString() );
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-13  14-33  34-38