Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - 3D - FieldOfView vs Camera position vs Mesh size

 
 
Old 01-10-2006   #1 (permalink)
Craig Kelly


 
 

3D - FieldOfView vs Camera position vs Mesh size

I have 2D panes which I paint onto an animated 3d surface, but when the
animation finishes, I hide my viewport and show my 2D pane. This does a
pretty good job in giving the illusion that my 2D pane is actually on the 3D
surface, except I'm having trouble getting the 3D surface's width/height to
line up perfectly with the 2D pane's width/height. Because they aren't
exactly the same, the transition (show 2D, hide 3D) looks rather ugly.

I'm sure I could mess with ScaleTransformations, camera positions, and
FieldOfView enough to get it to the point where it is good enough, but I'd
like to avoid having to fudge with the numbers for each of my 2D panes.

Can someone tell me more about the relationship between the perceived pixel
size of an object and,
1) FieldOfView
2) the camera position (Im' using an orthographic camera) positioned
3) 3D Mesh size (I'm using a 2x2x0 mesh surface)

How can I insure that my 3D surface looks like it's the same size as the
window that I'm painting on it?

Thanks
CK

ps: I'm using Nov '5 CTP

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
TheRHogue


 
 

RE: 3D - FieldOfView vs Camera position vs Mesh size

1. make sure the aspect ratio of the 3D plane is the same as the 2D image.
2. adjust the plane in Z to map properly
3. Adjusting camera, field of view will mess up the mapping. You are
essentially mapping a 2D space in 3D to map your 2D elements ratios.


"Craig Kelly" wrote:

> I have 2D panes which I paint onto an animated 3d surface, but when the
> animation finishes, I hide my viewport and show my 2D pane. This does a
> pretty good job in giving the illusion that my 2D pane is actually on the 3D
> surface, except I'm having trouble getting the 3D surface's width/height to
> line up perfectly with the 2D pane's width/height. Because they aren't
> exactly the same, the transition (show 2D, hide 3D) looks rather ugly.
>
> I'm sure I could mess with ScaleTransformations, camera positions, and
> FieldOfView enough to get it to the point where it is good enough, but I'd
> like to avoid having to fudge with the numbers for each of my 2D panes.
>
> Can someone tell me more about the relationship between the perceived pixel
> size of an object and,
> 1) FieldOfView
> 2) the camera position (Im' using an orthographic camera) positioned
> 3) 3D Mesh size (I'm using a 2x2x0 mesh surface)
>
> How can I insure that my 3D surface looks like it's the same size as the
> window that I'm painting on it?
>
> Thanks
> CK
>
> ps: I'm using Nov '5 CTP

My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
craig kelly-soens www.XpectWorld.com


 
 

RE: 3D - FieldOfView vs Camera position vs Mesh size

hi craig,
sorry, but, same name and same interests, we have to talk !
please drop me a quick e-mail via the website, im very interested in what you
are doing with XAML\Vista
cheers,

craig kelly-soens - Windows Vista WinFx XAML .Net Evangelist
http://www.XpectWorld.com - for customised "super-easy to use" Windows Vista
based software

"Craig Kelly" wrote:

> I have 2D panes which I paint onto an animated 3d surface, but when the
> animation finishes, I hide my viewport and show my 2D pane. This does a
> pretty good job in giving the illusion that my 2D pane is actually on the 3D
> surface, except I'm having trouble getting the 3D surface's width/height to
> line up perfectly with the 2D pane's width/height. Because they aren't
> exactly the same, the transition (show 2D, hide 3D) looks rather ugly.
>
> I'm sure I could mess with ScaleTransformations, camera positions, and
> FieldOfView enough to get it to the point where it is good enough, but I'd
> like to avoid having to fudge with the numbers for each of my 2D panes.
>
> Can someone tell me more about the relationship between the perceived pixel
> size of an object and,
> 1) FieldOfView
> 2) the camera position (Im' using an orthographic camera) positioned
> 3) 3D Mesh size (I'm using a 2x2x0 mesh surface)
>
> How can I insure that my 3D surface looks like it's the same size as the
> window that I'm painting on it?
>
> Thanks
> CK
>
> ps: I'm using Nov '5 CTP

My System SpecsSystem Spec
Old 01-10-2006   #4 (permalink)
Craig Kelly


 
 

RE: 3D - FieldOfView vs Camera position vs Mesh size

Thanks for the reply.

> 1. make sure the aspect ratio of the 3D plane is the same as the 2D image.


Done. I start with a 2x2 3D plane, which I apply a scale transformation to.
In this case, I scale the width to be twice as much as the height. I also
set the size of the viewport to be the same size as the 2D window.

> 2. adjust the plane in Z to map properly


I'm not exactly sure what to do what you're asking. In my case, the object
ends up directly facing the viewer (flat on the xy plane) with z=0. (sounds
like there's nothing for me to do...)

> 3. Adjusting camera, field of view will mess up the mapping. You are
> essentially mapping a 2D space in 3D to map your 2D elements ratios.


So, i took out the field of view property (which I assume just defaults to
some value), and I've abitrarely set the camera position at 0,0,5 (if I put
it closer, the sizes are way off). Unfortunately the transition from hide
the 3D to show the 2D is still not perfect. I'm sure if I messed with the
camera position enough, I could get it to look just right, but it doesn't
sound like I should have to.

Does it sound like I'm doing something wrong, or am I missing a step? I'm
currently setting the size of the viewport

Thanks very much

CK

>
>
> "Craig Kelly" wrote:
>
> > I have 2D panes which I paint onto an animated 3d surface, but when the
> > animation finishes, I hide my viewport and show my 2D pane. This does a
> > pretty good job in giving the illusion that my 2D pane is actually on the 3D
> > surface, except I'm having trouble getting the 3D surface's width/height to
> > line up perfectly with the 2D pane's width/height. Because they aren't
> > exactly the same, the transition (show 2D, hide 3D) looks rather ugly.
> >
> > I'm sure I could mess with ScaleTransformations, camera positions, and
> > FieldOfView enough to get it to the point where it is good enough, but I'd
> > like to avoid having to fudge with the numbers for each of my 2D panes.
> >
> > Can someone tell me more about the relationship between the perceived pixel
> > size of an object and,
> > 1) FieldOfView
> > 2) the camera position (Im' using an orthographic camera) positioned
> > 3) 3D Mesh size (I'm using a 2x2x0 mesh surface)
> >
> > How can I insure that my 3D surface looks like it's the same size as the
> > window that I'm painting on it?
> >
> > Thanks
> > CK
> >
> > ps: I'm using Nov '5 CTP

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Windows Explorer Size and Position Vista General
Window Size and Position Vista General
window position, size and views Vista General
How to keep windows size and position? Vista performance & maintenance
Desktop icons keep neither their size nor position Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46