Re: Best approach...



In article <0PDFe.13926$sJ4.9666@xxxxxxxxxxxxxxxxxxxxxx>,
spamsucks@xxxxxxxxx says...
> Gerry Quinn <gerryq@xxxxxxxxxxxxxxxxxxx> loquated like no one had ever
> loquated before with:

[Sorry for the half-article, sent it accidentally. I cancelled it so
it may not have shown up.]

> >> When the plugin will be triggered it will be when a user clicked on
> >> a plane representing terrain in a 3D scene (I am describing it as a
> >> plane because in the initial usage this will be the case [to be
> >> advanced later]), the plugin is only given the rendered scene (as a
> >> 2D texture) the view frustrum of the 'camera' and I already know the
> >> x/y/z location of several points within that plane (defined by the
> >> user saying something like "this point on the terrain is where the
> >> <insert landmark> is", and I need to calculate in real-time
> >> (optimization not important [yet]) the x,y,z location of any given
> >> point on that plane regardless of the orientation of the camera.
> >
> > If you can work out the position of any (x,y,z) on the view (you don't
> > have to do a full render) maybe an iterative approach would be
> > easiest.
> >
> > I.e. get the position of a few estimated points, then home in by
> > stages on the correct one.
> >
> > It would have the advantage of being easy to extrapolate to any
> > suitable surface.
>
> Again, I am given a 2D image (texture of the rendered scene) and the view
> frustrum. Some points in the 2D image space are correlated to x,y,z
> coordinates in world space.

My bad. From your mention of the view frustrum and the fact that you
had a plane, I was thinking of something I did recently relating to
finding the surface coordinates corresponding to a mouse click on a
quasi-isometric 3D view. I used certain points to create an origin and
a set of vectors corresponding to unit movement in the x,y and z
directions. It was accurate enough to reliably detect grid squares,
but if it wasn't (if the view was too close in) a second layer of
testing would have solved it.

> I don't understand what you mean by 'work out th eposition of any point *on
> the view*'.
> How do you 'home in' on the correct one (one what)?

I still have an idea that you might be able to do something. You have
a sort of 'statistically parametrised surface', i.e. a surface
deliniated in terms several points and a best fitting curve (in this
case specifically a plane) between them.

Can this be used? Maybe you take the known points that are closed and
try to interpolate:


---------------------------
| |
| |
| |
| |
| |
| |
| |
| |
| |
.



Relevant Pages

  • Re: Best approach...
    ... > Gerry Quinn loquated like no one had ever ... >>> point on that plane regardless of the orientation of the camera. ... Some points in the 2D image space are correlated to x,y,z ...
    (comp.games.development.programming.algorithms)
  • Re: Nonlinear Mapping - Object to Image Space
    ... >>I am familiar with collinear mapping from object to image space where ... >>we can map point to point, lines to lines, and planes to planes through ... mapping where we can map from say ... > must start from so that the ray hits the location on the image plane ...
    (sci.optics)
  • Re: Nonlinear Mapping - Object to Image Space
    ... >I am familiar with collinear mapping from object to image space where ... >we can map point to point, lines to lines, and planes to planes through ... Given that you have an optical design program or optical raytrace ... The software takes the final image location (like on a focal plane) ...
    (sci.optics)