LDraw.org Discussion Forums

Full Version: Animated Instruction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


How I get the same result shown on video width *.ldr files ? Can LPub3D handle it ?
I know this is possible. Some thing similar can get with LDraw. I can get this result capture screen in real-time. But i can get or build tool which work will for me in batch processing mode.
I find this article Tutorials: Animation 101 - Simple Movement. They use POV-Ray and L3P, create finall file with Ulead MediaStudio Pro 6. So I'm looking further. Anyone can help...
(2018-03-04, 8:52)Jarema Wrote: [ -> ]How I get the same result shown on video width *.ldr files ? Can LPub3D handle it ?
I know this is possible. Some thing similar can get with LDraw. I can get this result capture screen in real-time. But i can get or build tool which work will for me in batch processing mode.

I remember an animation from several years ago where many parts would fly out of a model parallel to the XYZ directions at one time. I think it was a Star Wars model. I'm also not sure whether it was LDraw or LDD.
(2018-03-04, 8:52)Jarema Wrote: [ -> ]How I get the same result shown on video width *.ldr files ? Can LPub3D handle it ?
I know this is possible. Some thing similar can get with LDraw. I can get this result capture screen in real-time. But i can get or build tool which work will for me in batch processing mode.
You can create simple animated building with LDCad scripting. Which you can export to png (OpenGL rendering) or POV-Ray.

You would have to post process the inventory stuff shown in your example though.

I was looking for an sample script idea in order to do some last testing of the new LDCad release, thanks for the idea Smile
Creating animation from images, is pretty easy this days. But my final goal is command-line tool that anyone can use. I should use LDCad instead of Blender.

Another question is about LDView 4.1 (3 Dec, 2009).

This tool gave me strange line, that Pov-Ray do not understand them, like:
  • #include "lg_defs.inc"
  • #include "lg_color.inc"
  • #include "lg_3811.inc" // Baseplate 32 x 32
  • #include "lg_3700.inc" // Technic Brick  1 x  2 with Hole
I attached files for you guys. This is simple wall model.
This explode animation, works according to my needs. The question about LDCad is:
How i can save result as video clip or set of images ?
Doing this in opposite direction, will be nice ?
Did i can work with animations without GUI - from command-line for example ?
(2018-03-05, 8:17)Jarema Wrote: [ -> ]How i can save result as video clip or set of  images ?
View -> editing views -> export (alt+E) -> OpenGL view export (or possibly pov view export if you have too much time!)
Quote:Doing this in opposite direction, will be nice ?
Change script to go in reverse order. Or assemble images of explosion in reverse order!
See also https://forums.ldraw.org/thread-20337-post-20337.html
Quote:Did i can work with animations without GUI - from command-line for example ?
AFAIK no.
Thanks. This is exactly what is need.
I modify my LDraw model. So i have one brick per step. Every thing is find inside LCAD. After rendering... i get more images that steps. I do not use any script only base on STEP command.
How work with this error ?
Novice question about LUA scripting:
  • How exclude only first part - like base-plate - from rotation|scaling in animation ?
  • How rotate whole model about 45*|90* degrees once per STEP ?
  • What places do you recommend in the network, learn about LUA ?
Question about LDCad:
  • How escape animation mode, after press A key ?
(2018-03-05, 8:13)Jarema Wrote: [ -> ]Another question is about LDView 4.1 (3 Dec, 2009).

Why are you using such outdated tool? The latest release 4.3 of LDView is of 2018-01-30
https://tcobbs.github.io/ldview/Downloads.html
New release. Problem still the same.
(2018-03-05, 11:29)Jarema Wrote: [ -> ]I modify my LDraw model. So i have one brick per step. Every thing is find inside LCAD. After rendering... i get more images that steps. I do not use any script only base on STEP command.
How work with this error ?

You will have to change the fps and or playback length to limit the number of images.
(2018-03-05, 16:55)Jarema Wrote: [ -> ][*]How exclude only first part - like base-plate - from rotation|scaling in animation ?
The sample explode script uses a for loop of 1 to n (note the 1, as lua prefer 1 instead of 0 in arrays etc)
Change the interval to exclude the first brick.

(2018-03-05, 16:55)Jarema Wrote: [ -> ][*]How rotate whole model about 45*|90* degrees once per STEP ?
This is done using the ldc.camera object, examples of its use is in the"camera test" animation and some of the example animations.

(2018-03-05, 16:55)Jarema Wrote: [ -> ][*]What places do you recommend in the network, learn about LUA ?
generic lua you can learn on the lua site
https://www.lua.org/

(2018-03-05, 16:55)Jarema Wrote: [ -> ][*]How escape animation mode, after press A key ?
shift+a, or use the session panel at the top right and select the 'normal' tab.
Thanks for your help. You save me from a headache.
I've made a very simple building animation script.

https://youtu.be/XZwOytkgMRM

It will be included in LDCad 1.6b
(2018-03-05, 8:13)Jarema Wrote: [ -> ]Creating animation from images, is pretty easy this days. But my final goal is command-line tool that anyone can use. I should use LDCad instead of Blender.

Another question is about LDView 4.1 (3 Dec, 2009).

This tool gave me strange line, that Pov-Ray do not understand them, like:
  • #include "lg_defs.inc"
  • #include "lg_color.inc"
  • #include "lg_3811.inc" // Baseplate 32 x 32
  • #include "lg_3700.inc" // Technic Brick  1 x  2 with Hole
I attached files for you guys. This is simple wall model.

In LDView's POV export options dialog, uncheck "Use XML mapping file" in the "Native POV Geometry" group. The XML mapping file in question causes LDView to generate POV code that uses LGEO parts, but requires those to be installed. If you hover over that option, the tooltip should kind of explain this, but it's not exactly obvious.
(2018-03-05, 22:55)Roland Melkert Wrote: [ -> ]I've made a very simple building animation script.

https://youtu.be/XZwOytkgMRM

It will be included in LDCad 1.6b

Great work ,as always. Consider including content of:
Elements such as axles holding the wheels, the wheels themselves should be animated in a horizontal cradle.
(2018-03-06, 8:44)Jarema Wrote: [ -> ]
(2018-03-05, 22:55)Roland Melkert Wrote: [ -> ]I've made a very simple building animation script.

https://youtu.be/XZwOytkgMRM

It will be included in LDCad 1.6b

Great work ,as always. Consider including content of:

Forgot about Phillo's animations, but that's the fun of scripting you don't have to wait on a new release to get new stuff Smile
(2018-03-06, 8:51)Jarema Wrote: [ -> ]Elements such as axles holding the wheels, the wheels themselves should be animated in a horizontal cradle.

You would need some sort of logic in to deciding which way to drop the part from. I don't think that can be done without some sort of reference list.
Thanks for clue. I will inform about progress. This Tab-Delimited File include 272 know wheels and tyres from Rebrickable database.
(2018-03-07, 20:14)Jarema Wrote: [ -> ]Video building guide:
This kind of video can be easily produced with lpub, just generate images and make a video from images. But since there is no real animation, a simple pdf is MUCH more convenient imho! See also https://www.youtube.com/watch?v=dAXzd0eSoYs
I'm just start. Do not extinguish the fire in a fresh bonfire. Like i say above:

Quote:Creating animation from images, is pretty easy this days. But my final goal is command-line tool that anyone can use.
How get current path of executed lua script running from LDCad ?
(2018-03-10, 20:19)Jarema Wrote: [ -> ]How get current path of executed lua script running from LDCad ?

There is no way of seeing that for the current running script/animation but all loaded lua files have their own submenu in the scripts menu. The second item in those is always "Open script" that will open the lua file using the systems assigned .lua handler.
How register module to use in lua script via LDCAD.
Code:
-- get all lines from a file, returns an empty
-- list/table if the file does not exist
function io_lines_from(file)
  if not file_exists(file) then return {} end
  lines = {}
  for line in io.lines(file) do
    lines[#lines + 1] = line
  end
  return
PHP Code:
[string "model-build-animations.lua"]:108attempt to index a nil value (global 'io'
String "model-build-animations.lua"]:14: module 'io' not found:
    no field package.preload['io']
    no file '..\AppData\Roaming\LDCad\scripts\default\global\io.lua'
    no file '..\AppData\Roaming\LDCad\scripts\default\modules\io.lua'
    no file '..\LDCad\io.dll'
    no file '..\LDCad\..\lib\lua\5.3\io.dll'
    no file '..\LDCad\loadall.dll'
    no file '.\io.dll'
Script main run failed.
(2018-03-10, 20:35)Jarema Wrote: [ -> ]
PHP Code:
[string "model-build-animations.lua"]:108attempt to index a nil value (global 'io'
String "model-build-animations.lua"]:14: module 'io' not found:
    no field package.preload['io']
    no file '..\AppData\Roaming\LDCad\scripts\default\global\io.lua'
    no file '..\AppData\Roaming\LDCad\scripts\default\modules\io.lua'
    no file '..\LDCad\io.dll'
    no file '..\LDCad\..\lib\lua\5.3\io.dll'
    no file '..\LDCad\loadall.dll'
    no file '.\io.dll'
Script main run failed.
I didn't link in the lua IO module thinking it could be misused easily.

If you need to use external data you can put it in a lua script using a global variable though and then require that script like so:
data=require('myDataDefFileWithoutTheDotLua')
I put :
PHP Code:
local horizontal = require "horizontal"
for i=1refCnt do 
 
 mainSf:getRef(i)
end 

In horizontal.lua file have:

PHP Code:
horizontal_num={
 "11094"
,"11208"


How obtain and compare name in this loop ?
I resolved this right now.
I am glad, that  i can introduce the first official release. Remember not to use multiple nested sub-models.
I once saw a video of the Millennium Falcon that was like this. E.g. all the parts "flew" off toward the edges at 90 degree angles. Can't seem to locate it now however.
Question for mid-advanced users:
How detect invisible|hidden in current view parts via LUA and rotate to show them via LUA ?
Something like Left Side view angle or Right side View angle.
Second question for mid-advanced users:
I have chassis on step one, wheels on step two. How to break up so that the wheels moving will not start until the chassis reaches the destination point ?
Some steps are faster animated, although they appear in the file.
(2018-03-20, 21:48)Jarema Wrote: [ -> ]Second question for mid-advanced users:
I have chassis on step one, wheels on step two. How to break up so that the wheels moving will not start until the chassis reaches the destination point ?
Some steps are faster animated, although they appear in the file.

You would need to gather some information about the number of steps etc in the start event.

Then in the frame event you can use that info to apply pauses.

get the step count from
someSubFile:getStepCount()

and information about references in a step from
ofs, cnt=someSubFile:getStepRefInfo(stepNr)

The use ofs and cnt instead of the someSubFile:refCount() loop
(2018-03-20, 22:19)Roland Melkert Wrote: [ -> ]You would need to gather some information about the number of steps etc in the start event.

Then in the frame event you can use that info to apply pauses.

get the step count from
someSubFile:getStepCount()

and information about references in a step from
ofs, cnt=someSubFile:getStepRefInfo(stepNr)

The use ofs and cnt instead of the someSubFile:refCount() loop

 Can you do this, for me, for us ? Huh