scale relative to camera

2013-09-04 Thread Ponthieux, Joseph G. (LARC-E1A)[LITES]
Hello,

I have a situation where I would like an object to remain the same size 
relative to the camera. Think in terms of pixel width for example. I managed 
to accomplish this through ICE by using the distance between the camera and the 
object to manage the scale for the object.

The problem is this. If the object is in the center of the viewport and I move 
the camera towards or away from the object, its perfect. The scale remains 
constant relative to the viewport. But if the object is on the periphery of the 
viewport, it is slightly larger than in the center of the viewport. The object 
scale still remains relative if the camera moves, the problem is that the scale 
is different than in the center. I assume this has something to do with forced 
perspective having an affect on the scaling?

Has anyone tried this before? I haven't a clue how to correct this at the 
moment. Any ideas would be appreciated.

--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
Mymic Technical Services
NASA Langley Research Center
__
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.



Re: scale relative to camera

2013-09-04 Thread Christian Gotzinger
You'll have to adjust for the shift from the camera center. Instead of
using the camera-to-object distance as your multiplier, you should use (I
haven't tried it, so hopefully the math is right):

(cosine alpha) * (distance camera-to-object)
alpha is the angle between your camera-to-object-vector and your
camera-to-camerainterest-vector


On Wed, Sep 4, 2013 at 5:25 PM, Ponthieux, Joseph G. (LARC-E1A)[LITES] 
j.ponthi...@nasa.gov wrote:

  Hello,

 ** **

 I have a situation where I would like an object to remain the same size
 relative to the camera. Think in terms of “pixel width” for example. I
 managed to accomplish this through ICE by using the distance between the
 camera and the object to manage the scale for the object. 

 ** **

 The problem is this. If the object is in the center of the viewport and I
 move the camera towards or away from the object, its perfect. The scale
 remains constant relative to the viewport. But if the object is on the
 periphery of the viewport, it is slightly larger than in the center of the
 viewport. The object scale still remains relative if the camera moves, the
 problem is that the scale is different than in the center. I assume this
 has something to do with forced perspective having an affect on the scaling?
 

 ** **

 Has anyone tried this before? I haven’t a clue how to correct this at the
 moment. Any ideas would be appreciated.

 ** **

 --

 Joey Ponthieux

 LaRC Information Technology Enhanced Services (LITES)

 Mymic Technical Services

 NASA Langley Research Center

 __

 Opinions stated here-in are strictly those of the author and do not 

 represent the opinions of NASA or any other party.

 ** **



RE: scale relative to camera

2013-09-04 Thread Ponthieux, Joseph G. (LARC-E1A)[LITES]
Christian,

Indeed, this did the trick nicely!

Thanks!

--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
Mymic Technical Services
NASA Langley Research Center
__
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Christian 
Gotzinger
Sent: Wednesday, September 04, 2013 12:15 PM
To: softimage@listproc.autodesk.com
Subject: Re: scale relative to camera

You'll have to adjust for the shift from the camera center. Instead of using 
the camera-to-object distance as your multiplier, you should use (I haven't 
tried it, so hopefully the math is right):
(cosine alpha) * (distance camera-to-object)
alpha is the angle between your camera-to-object-vector and your 
camera-to-camerainterest-vector

On Wed, Sep 4, 2013 at 5:25 PM, Ponthieux, Joseph G. (LARC-E1A)[LITES] 
j.ponthi...@nasa.govmailto:j.ponthi...@nasa.gov wrote:
Hello,

I have a situation where I would like an object to remain the same size 
relative to the camera. Think in terms of pixel width for example. I managed 
to accomplish this through ICE by using the distance between the camera and the 
object to manage the scale for the object.

The problem is this. If the object is in the center of the viewport and I move 
the camera towards or away from the object, its perfect. The scale remains 
constant relative to the viewport. But if the object is on the periphery of the 
viewport, it is slightly larger than in the center of the viewport. The object 
scale still remains relative if the camera moves, the problem is that the scale 
is different than in the center. I assume this has something to do with forced 
perspective having an affect on the scaling?

Has anyone tried this before? I haven't a clue how to correct this at the 
moment. Any ideas would be appreciated.

--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
Mymic Technical Services
NASA Langley Research Center
__
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.