« Return to Thread: Tutorial for taking photos for 3D?
thanks Luke; your example rocks.if you need to use AS2 there is this example by Tim Murray (2005) http://www.actionscript.org/resources/articles/164/1/Object-VR-In-Flash-MX/Page1.html-----Original Message-----
From: Luke Van In [mailto:lukevanin@...]
Sent: Wednesday, July 16, 2008 1:18 PM
To: harley@...; papervision3d@...
Subject: Re: [Papervision3D] Tutorial for taking photos for 3D?
I've made a demonstration of the fake 3D concept discussed here, most notable for it's simplicity in implementation and potential to have photographic quality output.
Where it fails is that the user's view point is severely restricted by the image data, which directly translates to memory footprint. In the example I have animated rotation about one axis only, but it is possible to go up to two axis' (for zooming or tilting) by creating a grid of images. Beyond that you would need an array of grids, but by then you would already be better off using a real-time 3D implementation like Paperview3D.
Example is available from here:
http://aliotech.com/demo/fake3d/fake_3d.swf
The demo movie file simply contains one frame for each angle of the view. In this example I chose an increment of 10 degrees between frames, and so there are 35 frames in total (the 36th would be identical to the first). Smaller rotational increments result in motion that is more fluid, but at the expense of memory. The example use 3D rendered images, but it translates to using photographs.
The operational code is shown below.
//
package
{
import flash.display.*;
import flash.events.*;
public class Document extends flash.display.MovieClip
{
public function Document()
{
// stops the document (otherwise you get a perpetually spinning object)
this.gotoAndStop(1);
// adds an event handler to fire whenever the mouse moves on the stage
this.stage.addEventListener( flash.events.MouseEvent.MOUSE_MOVE, this.OnMouseMove );
}
public function OnMouseMove(event:flash.events.MouseEvent):void
{
// get the position of the mouse relative to the stage area
// value between 0.0 (far left) and 1.0 (far right)
var ratio:Number = this.mouseX / this.width;
// get frame as the ratio relative to the number of frames in the clip
// the -1 and +1 corrects the frame number to start at 1 (and not 0)
// the (1.0 - ratio) reverses the direction of rotation to match my images
var frame:Number = ( (this.totalFrames - 1) * (1.0 - ratio) ) + 1;
// goes to the selected frame and stops
this.gotoAndStop( Math.round(frame) );
//
trace("ratio:" + ratio + " frame:" + frame);
}
}
}
On Wed, Jul 16, 2008 at 10:28 PM, Harley Powers Parks <harley@...> wrote:
This is a nice description. I started to think about this as sphere and try to zoom and restrict the user to an axis... but right, why not just animate the camera path along the desired path. keep the frame rate high and let the user interact.Is there an example of the code which scrubs across the timeline as the user drags across the regions x-axis? ideally, scrubbing along the y-axis would zoom in.-----Original Message-----
From: papervision3d-bounces@... [mailto:papervision3d-bounces@...] On Behalf Of Luke Van In
Sent: Wednesday, July 16, 2008 9:00 AM
To: papervision3d@...
Subject: Re: [Papervision3D] Tutorial for taking photos for 3D?[Long post]
Edward,
It sounds more like you want to do is simulate 3D by showing different pictures of an object from different angles. In that case you wouldn't need PV3D as it can be done simply with flash movie and a series of images.
You would start out by taking a picture of the object from successive angles (say every 36 degrees) for a full 360 degrees. Import the pictures into flash - placing one picture on a frame by itself. You can make it interactive by writing a script to gotoAndStop() on each frame corresponding to an angle based on the user's mouse position. That will give you a view around a single axis. For a double-axis view, take pictures as you would, but for each revolution around the object, rotate your camera on the perpendicular axis by a set angle (also 36 degrees) and then do another revolution. You would then combine the images in a 2D grid, and show a cell from that grid depending on an x and y coordinate take from the user. The advantage of this technique is that you can get photographic 3D views. The disadvantage is that your angular resolution is dependent on the number of images you take. If you take photos at 36-degree intervals, you will only have a resolution of 10 degrees, which may or may not be of use to you.
However, if you do need a real-time 3D rendering that you can fly around and rotate and zoom to your heart's content, your other option is to scrap the rotary table and rather manually create low-poly models of the objects you want to portray (in 3DS MAX for example) - then use orthogonal photographs as texture maps to add detail to the components. By low-poly I mean your ram module that you mentioned might be a plane for the memory board (with texture mapping on either side). The ram chips themselves would then be flat rectangles (also texture mapped) stuck onto the ram module. You definitely wouldn't model things like the legs on the chips - you just want the minimal number of vertices in order to map textures and give you some 3D properties.
I hope this introduction helps. Please let me know if you need any explanations or clarifications on the concepts mentioned here ;)
- Luke
On Wed, Jul 16, 2008 at 6:13 PM, Edward P. Sager <edsager@...> wrote:
Hello All,
I have a few small computer items (processors, RAM, etc.)of which I need to take photos and transfer such to a 3D representation of the items. I am using Swift3D and the Export to Papervision 3D and Photoshop for image manipulation/cleaning.
Does anyone know of any tutorials which show how to take photos for later 3D representation?
I have a green screen background and have fashioned a turntable to rotate the items to be photographed, but I am unsure of the best methods to go about this project.
Thanks for any help,
edsager
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
« Return to Thread: Tutorial for taking photos for 3D?
| Free embeddable forum powered by Nabble | Forum Help |