LDraw.org Discussion Forums

Full Version: Tourguide or walktrough animation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(2020-05-25, 6:37)Moreau Wrote: [ -> ]i tried deleting a few lines i thought might be restricting the camera angle of view but must have deleted too many lines so i ended up trashing tho whole script since there was nothing i could do to restore it. I'm still not sure though how to release the camera angle in a way that won't return to preset with every frame. i also have not found out how the script knows which "breadcrumb" to GOTO next in the line on the model. any hints?
The order of breadcrumbs in the LDraw file is the order used for the movement. It helps to display the source window.
(2020-05-25, 8:16)Philippe Hurbain Wrote: [ -> ]The order of breadcrumbs in the LDraw file is the order used for the movement. It helps to display the source window.
yeah i figured that out by rearranging them but none of the lines are numbered so without hovering/selecting its not possible to tell which piece corresponds to which line on the list, nor is there any way i can see to rearrange the pieces up or down in the source window.

Oh! i can open the .ldr file with text editor instead of Ldraw and all the lines there are numbered. well that's one way to find out how many total parts are in my models, almost.

another couple problems i discovered with the animation is that if i pause the playback and rotate the view, the camera position has changed (i had it set to 1st person on line 23), and even though i had the camera rotation set to SPN it was rotating as if in TBL, and did not revert to SPN untill i toggled it to TBL and back again to SPN. very disorienting! (i never use TBL).

Still trying to figure out how to allow camera rotation during animation play. i suspect its somewhere between lines 229 and 249.
(2020-05-08, 23:38)kevlamar Wrote: [ -> ]also, i am not quit sure what "level grounded" means but i am pretty certain mine is not.  It encompases various sub models and thay are situated at various heights due to the terrain going uphill so from the bottom it looks pretty ugly.  Confused

kevin
the y position value of the base you are using is zero and grid orientation is set to absolute?

i just tried placing one of the breadcrumbs on a 1x1x5 brick and the minifig still followed the trail, going up to the high point and back down to the next, so if you're using a contoured base or whatever, as long as your breadcrumbs are where you want the minifig's feet to go it should work without unnecessary clipping.
(2020-05-25, 16:03)Moreau Wrote: [ -> ]yeah i figured that out by rearranging them but none of the lines are numbered so without hovering/selecting its not possible to tell which piece corresponds to which line on the list, nor is there any way i can see to rearrange the pieces up or down in the source window.

Oh! i can open the .ldr file with text editor instead of Ldraw and all the lines there are numbered. well that's one way to find out how many total parts are in my models, almost.
You can move lines around by just dragging them.

Or if you want to change the order select them in the order you want them using the 3d view, and the n grab any of the selected lines in the source window and move the 'insertion line' to the top of the selection. This will force the lines in the same order as the selection.

(2020-05-25, 16:03)Moreau Wrote: [ -> ]another couple problems i discovered with the animation is that if i pause the playback and rotate the view, the camera position has changed (i had it set to 1st person on line 23), and even though i had the camera rotation set to SPN it was rotating as if in TBL, and did not revert to SPN untill i toggled it to TBL and back again to SPN. very disorienting! (i never use TBL).
The camera control is always trackball during animation playback unless the "CAM" label is red in the top right session panel. This because the animation needs full control of the camera and not be limited by the horizontal orientation of spin control.


(2020-05-25, 16:03)Moreau Wrote: [ -> ]Still trying to figure out how to allow camera rotation during animation play. i suspect its somewhere between lines 229 and 249.
I'm not sure what you mean here, if you want manual control of the camera during playback disable the CAM option mentioned above.

Or do you want manual control like in a first person action came, from the mifig's perspective during playback. This is not possible in 1.6, it's a planned 1.7 feature though.
(2020-05-25, 18:23)Roland Melkert Wrote: [ -> ]You can move lines around by just dragging them.

Or if you want to change the order select them in the order you want them using the 3d view, and the n grab any of the selected lines in the source window and move the 'insertion line' to the top of the selection. This will force the lines in the same order as the selection.

The camera control is always trackball during animation playback unless the "CAM" label is red in the top right session panel. This because the animation needs full control of the camera and not be limited by the horizontal orientation of spin control.


I'm not sure what you mean here, if you want manual control of the camera during playback disable the CAM option mentioned above.

Or do you want manual control like in a first person action came, from the mifig's perspective during playback. This is not possible in 1.6, it's a planned 1.7 feature though.
then may i suggest hotkeys for moving the 1st person camera in +/-x, y, z directions? i suggest N, S, E, W, U, D, with the movement incriments being the same as the red green and blue in the edit compass box.

Which string forces the camera to "keep looking forward" relative to the minifig?
(2020-05-25, 20:13)Moreau Wrote: [ -> ]then may i suggest hotkeys for moving the 1st person camera in +/-x, y, z directions? i suggest N, S, E, W, U, D, with the movement incriments being the same as the red green and blue in the edit compass box.
1.7 will feature interactive animation so how it responds to the keyboard etc is all up to the animation script.

(2020-05-25, 20:13)Moreau Wrote: [ -> ]Which string forces the camera to "keep looking forward" relative to the minifig?

The line

seq:addAction(aniTools.funcDepAction(camAct.yaw, 0, nil, actor.dir, dep))

sets up a dependency action based on the direction between two breadcrumbs (the one the minifig is in between at the moment).

It uses that direction and the rest Z-Direction to calculate the camera left/right angle.
(2020-05-25, 22:23)Roland Melkert Wrote: [ -> ]seq:addAction(aniTools.funcDepAction(camAct.yaw, 0, nil, actor.dir, dep))

sets up a dependency action based on the direction between two breadcrumbs (the one the minifig is in between at the moment).

It uses that direction and the rest Z-Direction to calculate the camera left/right angle.
i can change the fps to 1 which allows me to look around and for some inexplicable reason the first person camera is still nowhere near the minifig center where it ideally should be. even if i don't try to look around with the mouse it seems the first person camera is placed somewher way out in front of the minifig.

"seq:addAction(aniTools.funcDepAction(camAct.yaw, 0, nil, actor.dir, dep))"
i tried deleting that line and the camera fell off the truck and was left at 0, 0, 0
what do you mean by "rest z-direction"?

it still turns to look in the direction of the minifig's changing position, and still reverts back to that focus at the start of each new frame when i try looking around.
(2020-05-25, 8:16)Philippe Hurbain Wrote: [ -> ]The order of breadcrumbs in the LDraw file is the order used for the movement. It helps to display the source window.
Admittedly the method use is not how i would have approached the problem. there are noticeable flaws in the path of the minifig i can't account for (not only because i can barely read the script), but then i'm not used to just letting a computer tell itself what to do.

I had hoped to be able to instruct the camera to move similarly to how i would have instructed a turtle to plot a course way back in the days of LEGO2LOGO.
for example, something like:
set start camera position at 0,-88, 0
move camera east at 1 per frame for 80 frames
turn -1degree per frame for 90 frames
move camera north at 1 per frame for 80 frames

etcetera.
(2020-05-25, 23:31)Moreau Wrote: [ -> ]i can change the fps to 1 which allows me to look around and for some inexplicable reason the first person camera is still nowhere near the minifig center where it ideally should be. even if i don't try to look around with the mouse it seems the first person camera is placed somewher way out in front of the minifig.
The script places the camera roughly at the 'nose' position of the minfig, this asuming you're using a minifig submodel like in the example. If not you need to adjust the coordinates, given at the top of the script.

(2020-05-25, 23:31)Moreau Wrote: [ -> ]what do you mean by "rest z-direction"?
A camera without angles always looks along the z-axis (blue one in the compass).

(2020-05-25, 23:31)Moreau Wrote: [ -> ]it still turns to look in the direction of the minifig's changing position, and still reverts back to that focus at the start of each new frame when i try looking around.
Once the animation is paused normal (trackball) camera control is enabled, what you want to do would need interactive animation so the script can calculate things not just based on the frame time but also on mouse interaction etc. Like I said this is a planned 1.7 feature.
Pages: 1 2 3 4 5