Ruby Community Project Suggestions
-
I didn't follow back on the previous suggestion as I thought I read that wikii wrote it already and posted it.
A community project is fine with me. I would enjoy it. We all learn when we work together.
I think whatever we write should use an advanced webdialog, using all sorts of widgets, and it could stand as a model "how to" script for others who follow to learn from.
I've done a lot of advanced WebDialog stuff for myself, I've just not published much.
Todd
-
It's true that wikii wrote the core functionality - it exports images at a single camera height. It can be viewed as a proof-of-concept. It still needs a lot of work to make it a full-featured plugin. Compared to all the potential options of the script (rotational animation, panoramic animation, and shadows animation), and all the planning that goes into the design and organization of a plugin, the core functionality is almost an afterthought.
I'm not advocating using his example, but I don't want to rule it out either. It wouldn't likely survive intact, even if we decided to use it.
-
Well then, let's do it and use wikii's code as a base.
How about listing and defining all the features ("rotational animation" is too vague (for me!) ) and then we'll break it down into the different functions we'll need, etc. We can do the webdialog interface and code in parallel.
I'm going to plan on adding verbose comments to any code I write, aimed at folk new to ruby with SketchUp. We'll probably find a few places, along the way, to update the Wiki doc. Matter of fact, this code my well be used in several of the missing examples in the Doc.
Fun fun!!
Todd
-
Hi folks,
I saw that thread as well as what you and Tavi made with the js. It's quite cool actually but what if you spice it up? I mean now you make a series of pictures taken from around an object. But only one series - at a certain angle. What if you took several (custom number) series at different angles (tilted cameras) so that you could navigate not only around in one certain direction (horizontally) but also vertically.
You'd then create the so far only cross platform and cross-browser 3D viewer.
I know it would mean a lot harder work on both rb and js scripting (and surely several times more images to preload for instance) but would be exciting.
Well, just ideas of an outsider...
-
I have now the read prior post fully and followed all the links and watched the demos. I can see the good and the bad.
Good: the end results - you get a 360 degree view of the image.
Bad: The shadows moving bugs me, but I guess they do I real life too (and that's never bugged me!) I guess I was thinking of rotating the object in a static scene image for a 360 view (where the shadow would not change), but in this case, the camera is rotating about the object. Both are natural views I guess. Both options would be nice too. A simple border around the pictures would be good too, so the user knows were the clickable area starts and stop (especially for the white background images)So, some things to work out are:
- axis of rotation
- height of camera
- distance of camera
- speed of camera (or, how many images in 360 degrees)
- field of view
The height, distance and field of view could be simply taken from whatever settings are already in effect.
The number of images could be user specifiable.
The axis of rotation could be user specifiable as up-line from the target of the camera, or, any arbitrary line or construction line (that could be hidden by the script before it starting taking pictures).
A progress bar could communicate which picture of how many was in process. The view could even be updated as the camera was "taking pictures", so to speak.
I would like to see the output as a "package" - a built HTML page with controls, an images folder, the whole enchilada, so folks who don't know HTML or javascript can still get output.
I haven't looked at wikii's code yet. Will do that later tonight or this weekend.
What else?
Todd
-
My initial inspiration came from 3DNP. It is a fairly complete package. It has an images folder, html templates, and a configuration file (see attached pdf for options.) And it's open-source.
I agree the output should be a complete package. I suggest we use the 3DNP package and concentrate on SketchUp and Ruby, leaving the JavaScript for another day.
@unknownuser said:
How about listing and defining all the features ("rotational animation" is too vague (for me!) ) and then we'll break it down into the different functions we'll need, etc. We can do the webdialog interface and code in parallel.
Todd, you are correct. Here are several types of animation that could be done:
-
The Fly: Rotate the camera around a target at some user-defined angular displacement, and at 1 or more user-defined levels (heights.) As in the camera flies around the target.
-
The Lazy Susan: The target is rotated while the camera is stationary. This would result in an animation similar to The Fly, except that Shadows would change. Supports multiple levels.
-
The Head Turner: Rotate the camera in place to create a panorama. Could use levels to give tilt to the camera (looking up or down.)
-
The Shadow: Stationary camera, bend the space-time-continuum to create an animation of the target over the course of a day. (or at the same time of day over the course of a month, year.) This is actually a 1-dimensional "horizontal" animation, which leaves room for doing something with the vertical animation.
-
Others: Some sort of zoom animation? explode assembly diagram? Focal length animation? Walk-through animation?
Ok, that's quite enough. I'm not saying we should do all this. Would trying to do #'s 1 - 4 be too much?
@unknownuser said:
What if you took several (custom number) series at different angles (tilted cameras) so that you could navigate not only around in one certain direction (horizontally) but also vertically.
Gaieus, have a look at the examples on the 3DNP page, it's just as you describe.
So before I go on, do you want to use 3DNP?
-
-
no. the JS is hard to modify. I would go with this one
-
OK Guys, I see. First I only played with the top one. From now on I'll just shut up and listen.
-
One more thing - if I'm taking all the fun out of this, just say so! Planning is important, but it's also good experience to just start coding.
@unknownuser said:
I'm going to plan on adding verbose comments to any code I write, aimed at folk new to ruby with SketchUp. We'll probably find a few places, along the way, to update the Wiki doc. Matter of fact, this code my well be used in several of the missing examples in the Doc.
That's a good idea, and I'd add that each contributor is responsible for documenting their own work.
-
@unknownuser said:
no. the JS is hard to modify. I would go with this one
TBD, looks good, too - let's go with it.
Here are the specifications that the image exporter will need:
@unknownuser said:
The image file names/paths must be carefully prepared to work with the rotation. The names must match the pattern:
imgPrefix_α_βimgExt
Where α is the rotation step, and β is the tilt angle. You will need combinations of every rotation step and tilt angle that you are using. If you want to use panning, you must make sure that you number the images in the correct direction. Tilt angles assume that 1 is the view from the top (or the highest viewing perspective), and rotation steps assume that progressing from 1 to 2 is motion in a clockwise direction, etc. It is assumed that the rotation steps make a complete circle around the subject.
@unknownuser said:
You will need numRot x numtilt images in total. My demonstration here use 6 x 3 = 18 images - around 117 KB. For 30 rotation steps, and 15 tilt angles (for a very fluid effect), you would need 450 images (so let's hope you have a good relationship with your camera)
450 images? Ouch, but I would also estimate that is correct.
Advertisement