![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 |
| | #2 (permalink) |
| Guest | 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 |
| | #3 (permalink) |
| Guest | 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 |
| | #4 (permalink) |
| Guest | 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 |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Start an application and set its Window Position and Size | GrantSt | VB Script | 4 | 2 Weeks Ago 08:02 AM |
| window position, size and views | Glenn | Vista General | 3 | 02-09-2008 04:38 PM |
| How to keep windows size and position? | beto666 | Vista performance & maintenance | 0 | 05-23-2007 10:12 PM |
| Desktop Icons size and position | Tauty | Vista General | 2 | 03-27-2007 07:59 PM |
| Desktop icons keep neither their size nor position | Kai-Uwe v. d. Ohe | Vista General | 4 | 09-19-2006 07:42 AM |