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: 27)
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: 13)
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
RE: Tourguide or walktrough animation
#17
(2019-12-26, 1:03)Moreau Wrote: 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?

I suppose if you wanted to add focal blur in POV-Ray you would need to know the distance as well.
Reply
RE: Tourguide or walktrough animation
#18
Brick 
(2020-02-02, 19:24)Michael Horvath Wrote: I suppose if you wanted to add focal blur in POV-Ray you would need to know the distance as well.
 I'm not using POVray, just Ldraw. i have yet to find anything like a setting to switch from 3rd to 1st person perspective in editing mode.
Reply
RE: Tourguide or walktrough animation
#19
(2020-02-16, 19:39)Moreau Wrote:  I'm not using POVray, just Ldraw. i have yet to find anything like a setting to switch from 3rd to 1st person perspective in editing mode.

The distance parameter is indeed a preparation on blur support in (pov) exports.

The editor doesn't have a 1st person mode, only trackball or spin control.

The camera tools in the scripts menu are helpers to initialize ldc.camera objects in animation scripts.

The walk trough animation script lets you switch from 1st to 3rd person by editing the cameraMode variable at the top.
Reply
RE: Tourguide or walktrough animation
#21
(2020-02-16, 20:00)Roland Melkert Wrote: The distance parameter is indeed a preparation on blur support in (pov) exports.

The editor doesn't have a 1st person mode, only trackball or spin control.

The camera tools in the scripts menu are helpers to initialize ldc.camera objects in animation scripts.

The walk trough animation script lets you switch from 1st to 3rd person by editing the cameraMode variable at the top.

I have probably suggested this already, but a "walk" camera mode that works like first-person shooter video games would be very nice (for my very large horizontal town models). The dev version of LDView already has this feature, but sadly the framerate is much worse than LDCad on my very old computer and video card.

Sad
Reply
RE: Tourguide or walktrough animation
#23
Brick 
minor update, progress of a sort.
(2020-02-16, 21:40)Michael Horvath Wrote: I have probably suggested this already, but a "walk" camera mode that works like first-person shooter video games would be very nice (for my very large horizontal town models). The dev version of LDView already has this feature, but sadly the framerate is much worse than LDCad on my very old computer and video card.

Sad
I have discovered that by turning off number-lock, and zooming in all the way with the mouse wheel, that i can use the number pad arrows to move the camera in those directions. its only perpendicular to the camera center, so if i want to move only horizontally in partspace i need to be looking straight up or down. The increments are very small but the motion is smooth (at greater distances than zero, the increments are greater). At zero distance i can look around as if in first person. the arrows on the editing compass still work the same for more rapid repositioning of the camera in partspace.
Reply
RE: Tourguide or walktrough animation
#16
I have wanted to do the same with Datsville, but I get less than 1 FPS in LDView, and POV-Ray takes about an hour to render the whole town on my old CPU. (More if I use LGEO parts, turn on radiosity, etc.)
Reply
RE: Tourguide or walktrough animation
#20
(2020-02-02, 19:22)Michael Horvath Wrote: I have wanted to do the same with Datsville, but I get less than 1 FPS in LDView, and POV-Ray takes about an hour to render the whole town on my old CPU. (More if I use LGEO parts, turn on radiosity, etc.)

You can also export the OpenGL renderings as a sequence of png's. This can be done in higher resolutions then your screen and at higher frame rates then realtime could manage.
Reply
RE: Tourguide or walktrough animation
#22
(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.

This is nice! I really liked LD4DModeler even though I didn't get an opportunity to use it.

[edit]

Oops, I responded to this once already.
Reply
RE: Tourguide or walktrough animation
#24
(2020-02-16, 22:25)Michael Horvath Wrote: This is nice! I really liked LD4DModeler even though I didn't get an opportunity to use it.

LD4DModeler has been replaced by LD4DStudio ages ago, which is still available.
http://www.ld4dstudio.nl/

Funny is was just considering canceling the .nl domain the other day Smile

I have no idea if it works on win10, I think it should though, given you install it outside the program files folder or use the archive version.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)