PDA

View Full Version : How do I duplicate an example?


bosco312
01-17-2007, 05:18 AM
The "lakeskater.a2w" example included with the Alice download has this as the first part of its 'code' in the "world.my first animation' method:

Wait "1 Second"
"Camera" set point of view to "<None>" "point of view of=Camera.PointOfView2" "duration=2 seconds" more...
Wait "1 Second"
"Camera" set point of view to "<None>" "point of view of=Camera.PointOfView" more...

This causes the camera to move at the start of the movie and 'zoom' in on the ice skater. The 'PointOfView' and 'PointOfView2' points of view seem to have been created as variables in the camera properties.

I've been trying to set up movement of the camera for my own movie, but I can't seem to figure out how. I don't want the camera to follow another (visible object) and following a dummy object seems wrong somehow (maybe I have to do it this way, but the example doesn't seem to do that). So here is my trouble so far, which I would be glad if someone could help me with...

1. I can't seem to set up POV variables in the camera with any position/orientation other than 0,0,0. I can set up a pose by moving the camera manually and capturing a pose (it uses the current position/orientation of the camera), but I can't find any way to edit the POV value at all. Help!

2. Even assuming I want to move the camera POV from x, y, z to 0,0,0, when I add a "camera" set point of view method to my world.animation method (the default, main method), I don't have the option of choosing '<None>' (or any of the other settings shown in the example. What am I doing wrong? Is there a tutorial that covers this? (I did all the tutorials that came with Alice)

atomota
01-20-2007, 01:00 AM
If worst comes to worst you can (probably) drag statements from the example to the clipboard icon and from there to your own project.

TomGWeeks
02-05-2010, 11:49 PM
I must know how they set those pointOfView properties on the camera in lakeSkater.a2w!

Please, someone, tell me the secret!

x2495iiii
02-05-2010, 11:55 PM
You mean the "camera set point of view to [object]" method? All objects have that method, and the camera's no different. Click the camera on the item list, then scroll down the methods menu a little bit to see the method tile, the just drag it onto the scripting area and choose the object you want the camera to set it point of view to (Note: dummy objects can be dropped at the camera's current placement in Add Objects mode if you click the "More Controls" button on the right side of the screen).

TomGWeeks
02-06-2010, 12:57 AM
Hey x2495iiii! Thanks for writing back so fast!

Thanks to these forums, I have been made well aware of the "drop dummy at camera," and then, "camera set point of view to dummy" trick. Very useful!

Although that is actually sufficient for all my camera-position-recording needs, I still find myself longing to be able to store camera position properties on the Camera itself, as was done in lakeskater.a2w:

http://www.mninter.net/~atmel/camera%20pov%20props.png

Please, I beg of you: how did they do that?! How did they manage to set those PointOfView and PointOfView2 properties to values other than 0,0,0???

Niteshifter
02-06-2010, 02:22 AM
Unless I'm missing something within the program, you can't have the POV variables set automatically like they have it. There are methods to create it during real-time though.

You could just drag and drop and have the POV variable set as the POV of an object.

Another harder method is to actually create a function or method that would allow you to do this, but this would require a lot of knowledge about the move, turn, roll, position, orientation, etc. to attempt.

I'm also fairly sure that there's a way to open your alice save file within another program and just edit the values and then reopen the file in Alice and they will automatically be there from the start, but I'm not entirely sure on how you would go and open them in the first place.

x2495iiii
02-06-2010, 04:04 AM
Yes, although POV variables can be created, their values cannot be edited. Not sure how the developers pulled that off...

TomGWeeks
02-07-2010, 03:52 PM
Ooo those wiley developers! They know all the tricks, don't they? :)


That's fine, then. I was afraid there was some important piece of GUI functionality that I was unaware of, but if this is one of those "you have to be a developer to do this" tricks, then I'm fine with just using dummy objects for recording camera positions, and letting the developers keep their little secrets. :rolleyes:

zonedabone
02-07-2010, 05:58 PM
I can try to make a jython script that does this! I'll see what I can do.

I'm also making a string>number script!

x2495iiii
02-08-2010, 12:10 AM
Yeah I'm following that too, zone. You're doing some very good work, seriously, that's got to be the coolest thing I've seen done with Alice.