Tourguide or walktrough animation


Tourguide or walktrough animation
#1
I liked the idea of an animated model tour from a minifig's perspective a lot (see  https://forums.ldraw.org/thread-23512-po...l#pid34790)

So I made a start on a generic script for it, to be included with LDCad 1.6c

Many things can be improved, but I'm very proud on the fact this was 'doable' without finding any bugs out of the box.

Attached a demo.

Any feedback / ideas on improvements are welcome.

A appropriate (big) model for testing purposes would be appreciated too.

edit:
This animation takes over the camera during playback. You can disable/enable that by clicking the 'CAM' label in the top right session panel in animation mode.


Attached Files
.zip   tour.zip (Size: 3.21 KB / Downloads: 19)
Reply
RE: Tourguide or walktrough animation
#2
(2019-12-06, 1:59)Roland Melkert Wrote: I liked the idea of an animated model tour from a minifig's perspective a lot (see  https://forums.ldraw.org/thread-23512-po...l#pid34790)

So I made a start on a generic script for it, to be included with LDCad 1.6c

Many things can be improved, but I'm very proud on the fact this was 'doable' without finding any bugs out of the box.

Attached a demo.

Any feedback / ideas on improvements are welcome.

A appropriate (big) model for testing purposes would be appreciated too.

edit:
This animation takes over the camera during playback. You can disable/enable that by clicking the 'CAM' label in the top right session panel in animation mode.

Nice! I can send you a big (16.000 bricks) model of a building.
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Tourguide or walktrough animation
#4
(2019-12-06, 7:52)Jaco van der Molen Wrote: Nice! I can send you a big (16.000 bricks) model of a building.

Thanks for mailing the model, very nice one.

Too bad it only does 15fps on my system.

You could add door animations to also go inside etc to make it even more interesting. Would probably take ages to render in povray tough Smile
Reply
RE: Tourguide or walktrough animation
#12
Brick 
(2019-12-06, 18:37)Roland Melkert Wrote: Thanks for mailing the model, very nice one.

Too bad it only does 15fps on my system.

You could add door animations to also go inside etc to make it even more interesting. Would probably take ages to render in povray tough Smile
why is the frame rate not set in stone?
Reply
RE: Tourguide or walktrough animation
#3
Now that's fun!


Attached Files
.zip   coaster.zip (Size: 57.38 KB / Downloads: 11)
Reply
RE: Tourguide or walktrough animation
#5
(2019-12-06, 10:07)Philippe Hurbain Wrote: Now that's fun!

Love the roller-coaster use.

But the current version is setup for a constant Z so weird scaling occurs, as I was thinking to use different animation code for things like stairs etc.

I'll try to improve the Z handling.
Reply
RE: Tourguide or walktrough animation
#6
(2019-12-06, 10:07)Philippe Hurbain Wrote: Now that's fun!

Neither one works for me, tells me it takes too long (250ms seems some limit) any clue?
Reply
RE: Tourguide or walktrough animation
#7
(2019-12-06, 21:30)Gerald Lasser Wrote: Neither one works for me, tells me it takes too long (250ms seems some limit) any clue?

Are you on a very old system?

250ms translates into less then 4 frames per second, which is extremely slow for the relative simple tour.mpd model.
Reply
RE: Tourguide or walktrough animation
#8
(2019-12-06, 22:23)Roland Melkert Wrote: Are you on a very old system?

250ms translates into less then 4 frames per second, which is extremely slow for the relative simple tour.mpd model.
I'll restart my PC, haven't done so in a while. I hope it makes it going again


-> That helped, now it is running smooth....!
Reply
RE: Tourguide or walktrough animation
#9
Brick 
(2019-12-06, 1:59)Roland Melkert Wrote: I liked the idea of an animated model tour from a minifig's perspective a lot (see  https://forums.ldraw.org/thread-23512-po...l#pid34790)

So I made a start on a generic script for it, to be included with LDCad 1.6c

Many things can be improved, but I'm very proud on the fact this was 'doable' without finding any bugs out of the box.

Attached a demo.

Any feedback / ideas on improvements are welcome.

A appropriate (big) model for testing purposes would be appreciated too.

edit:
This animation takes over the camera during playback. You can disable/enable that by clicking the 'CAM' label in the top right session panel in animation mode.
much appreciated! I'm sure this will give me a jumping-off point for doing other scripting, and i'll let you know what i come up with.
have you started a section to the forum for custom scripts or does that go along with the custom model show-n-tell (MOC's)
Reply
RE: Tourguide or walktrough animation
#10
(2019-12-07, 17:59)Moreau Wrote: have you started a section to the forum for custom scripts or does that go along with the custom model show-n-tell (MOC's)

Id say that prolly fits best in Rendering Techniques.
Reply
RE: Tourguide or walktrough animation
#11
(2019-12-06, 1:59)Roland Melkert Wrote: I liked the idea of an animated model tour from a minifig's perspective a lot (see  https://forums.ldraw.org/thread-23512-po...l#pid34790)

So I made a start on a generic script for it, to be included with LDCad 1.6c

Many things can be improved, but I'm very proud on the fact this was 'doable' without finding any bugs out of the box.

Attached a demo.

Any feedback / ideas on improvements are welcome.

A appropriate (big) model for testing purposes would be appreciated too.

edit:
This animation takes over the camera during playback. You can disable/enable that by clicking the 'CAM' label in the top right session panel in animation mode.
interesting, however i have some questions.
how do i toggle the camera to first person instead of third? i tried editing the one line in samples > camera test, from camConfusedetThirdPerson(camPos, camDist, angle+45, 25, 0)
to camConfusedetFirstPerson(camPos, camDist, angle+45, 25, 0)
and all it did was look up instead of down, though maybe it did stay in one place while doing so?

trying to move the camera with the mouse during playback just makes it look shakey
i admit i am still new to all this Lua stuff (as a first programming language), but i thought the only difference should be the first person camera remains stationary and just rotates the model space around it.
maybe what i want does'nt exist yet. is there even a way to toggle the mouse camera to first instead of third person perspective?
Reply
RE: Tourguide or walktrough animation
#13
Brick 
(2019-12-23, 12:22)Moreau Wrote: interesting, however i have some questions.
how do i toggle the camera to first person instead of third? i tried editing the one line in samples > camera test, from camConfusedetThirdPerson(camPos, camDist, angle+45, 25, 0)
to camConfusedetFirstPerson(camPos, camDist, angle+45, 25, 0)
and all it did was look up instead of down

trying to move the camera with the mouse during playback just makes it look shakey
i admit i am still new to all this Lua stuff (as a first programming language), but i thought the only difference should be the first person camera remains stationary and just rotates the model space around it.
maybe what i want does'nt exist yet. is there even a way to toggle the mouse camera to first instead of third person perspective?
upon further investigating scripts > misc > current camera, and selecting () "script first person camera" from the format list, the repeating after moving the camera with the mouse, yields two sets of values.

ldc.camera(1, ldc.vector(3939.7942, -1547.4372, -2197.128), 4549.2681, -60, -15, 0)
ldc.camera(1, ldc.vector(1897.3212, -1839.676, -1139.8568), 2558.9633, -60, -37.05, 0)

so clearly the program can identify the position in partspace and angle of the camera eye. i also assume the first three are XYZ position. But what are the other values?
Reply
RE: Tourguide or walktrough animation
#14
(2019-12-23, 12:44)Moreau Wrote: upon further investigating scripts > misc > current camera, and selecting () "script first person camera" from the format list, the repeating after moving the camera with the mouse, yields two sets of values.

ldc.camera(1, ldc.vector(3939.7942, -1547.4372, -2197.128), 4549.2681, -60, -15, 0)
ldc.camera(1, ldc.vector(1897.3212, -1839.676, -1139.8568), 2558.9633, -60, -37.05, 0)

so clearly the program can identify the position in partspace and angle of the camera eye. i also assume the first three are XYZ position. But what are the other values?

The tour animation has a cameraMode variable at the top, change it to 1 for first person mode.

ldc.camera parameters are 'mode' followed by a number of mode depend ones.

first person
ldc.camera(1, eye, dist, yaw, tilt, roll)

third person
ldc.camera(3, lookAt, dist, yaw, tilt, roll)

two point
ldc.camera(2,lookAt, eye, roll

advanced
ldc.camera(0,lookAt, ori, dist)

mode 1..3 are basically just wrappers as internally all cameras are 'advanced'.
Reply
RE: Tourguide or walktrough animation
#15
(2019-12-23, 21:18)Roland Melkert Wrote: The tour animation has a cameraMode variable at the top, change it to 1 for first person mode.

ldc.camera parameters are 'mode' followed by a number of mode depend ones.

first person
ldc.camera(1, eye, dist, yaw, tilt, roll)

third person
ldc.camera(3, lookAt, dist, yaw, tilt, roll)

two point
ldc.camera(2,lookAt, eye, roll

advanced
ldc.camera(0,lookAt, ori, dist)

mode 1..3 are basically just wrappers as internally all cameras are 'advanced'.
why would first person need a distance? I'm guessing the 'eye' is the position in xyz, which is what i would want to move via script. the last three parameters i would want to be mouse controlled. is that possible?
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)