Plane from current view
-
I am trying to figure out where to start on this:
I would like to create a rectangular plane from the current camera position to essentially create a work plane from the current view. The end-game will allow me to place an image on this plane for projection onto a terrain model. My thought is that I could export a 2D image of the current view of a terrain model (imported through the geolocation in Earth), edit it in an image editor to 'dress it up', then place the edited image on the work plane and project the edited image as a texture on the model...maybe someone has tackled this already...
My guess is that I can get a 3D vector of the camera point to target and the 'up' vector. I would need the normal vector to both of these to create the plane's vectors. I am not sure how to make the corner points (projected from the model bounds) to make the rectangle on this plane.
Thanks in advance,
Jon -
-
Thanks TIG
-
OK, that got me close. Does anyone know how to convert the viewport coordinates from pixels to actual coordinates? Ideally I would be able to create a rectangle the same size as the viewport corners, write the current view image, manipulate the image (outside of SU), apply back to this rectangle and project to the model. I can generate a correctly oriented rectangle using the eye, target, and up camera methods, but now I am struggling with sizing it correctly.
I do not believe the model bounds will not work because I need to be able to work in any orientation and any zoom level to affect specific locations of the model.
Jon
-
I have a similar workflow to what your describing but I use photo match and no ruby scripts. Set the view you want, save it at the screen resolution, edit it, then start a Photo Match session using the new image. Everything should line up perfectly as long as nothing has changed. Finally, just project the photo onto the elements of the model using the option on the Photo Match Dialog.
Advertisement