Browse Search Popular Register Upload Rules User list Login:
Search:
video by texture

Image:
screenshot of the scene

Author: DrBalk

Group: Lesson

Filesize: 126.77 kB

Date added: 2015-12-31

Rating: 5

Downloads: 237

Views: 247

Comments: 4

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:
video,
animation,
texture,
resize_texture,
torus,
wrapping

Scene tag

Using textures and Kilinichs (thanks!!) trick for case-structure in thyme,
you can manage now to display a video of a sequence of
seperated pictures as texture on a rectangle.
Here, the png format helps additionally, cause it has a transparency
channel. I am amazed how fast Algodoo can handle these textures.
You can even resize the rectangle and the video is automatically
resized with it. In the left part of the scene you can see my first
tries with crocodiles, source is given as link. The animated torus i made
myself and its pictues can be used by you for your own convenience.
Please log in to rate this scene
edit
Similar scenes
Title: SYNCHRONIZED TEXTURE
Rating: 5.625
Filesize: 397.38 kB
Downloads: 534
Comments: 4
Ratings: 2
Date added: 2013/05/26 07:12:29
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: 3D Ball With Texture
Rating: 6.6364
Filesize: 120.77 kB
Downloads: 1193
Comments: 9
Ratings: 5
Date added: 2015/07/20 06:42:12
Made with: Algodoo v2.1.0
Rating: rated 6.6
download
Title: Platform Survival II (Can be used)
Rating: 5
Filesize: 40.38 kB
Downloads: 2269
Comments: 0
Ratings: 1
Date added: 2022/08/04 07:25:55
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Exploding shell
Rating: 7.3333
Filesize: 0.76 MB
Downloads: 4439
Comments: 11
Ratings: 9
Date added: 2011/04/30 13:14:14
Made with: Phun
Rating: rated 7.3
download
Title: Attak IN
Rating: 5.4
Filesize: 3.69 MB
Downloads: 1467
Comments: 1
Ratings: 4
Date added: 2010/02/09 15:40:29
Made with: Phun
Rating: rated 5.4
download
Title: Wood cutting tractor V.5
Rating: 5.5
Filesize: 1.37 MB
Downloads: 999
Comments: 7
Ratings: 2
Date added: 2015/08/13 17:04:00
Made with: Algodoo v2.1.0
Rating: rated 5.5
download
Some animation frames missing. Every image used in the animation must be displayed somewhere (you can put them off to the side) when the scene is saved or else the images don't get saved in the .phz.
Thank you, noonan!_o_

i have made a version where i put in all the required frames.
It is named:
http://www.algodoo.com/algobox/details.php?id=122754
and set it to the educational group with tags
video
movie
texture
Yes, that scene is now working correctly. No need to change the code, but the following alternate code also works:

cost := math.toInt((10 * (sim.time)) % 17);
texture = ["frame_00000.png", "frame_00001.png", "frame_00002.png", "frame_00003.png", "frame_00004.png", "frame_00005.png", "frame_00006.png", "frame_00007.png", "frame_00008.png", "frame_00009.png", "frame_00010.png", "frame_00011.png", "frame_00012.png", "frame_00013.png", "frame_00014.png", "frame_00015.png", "frame_00016.png"](cost)

or this:

cost := math.toInt((10 * (sim.time)) % 17);
cost > 9 ? {
texture = "frame_000" + cost + ".png"
} : {
texture = "frame_0000" + cost + ".png"
}
Last edited at 2015/12/31 23:19:39 by s_noonan
Thanks again, noonan! :) :)

this way i can now adress the frames without much copy-paste-modifyname.
I add your method as comment to the "working" scene, and will use it in
future scenes. The thyme-case-structure for the code to execute i will
put into my treasure-chest as well as your trick for direct adressing the
frame and the % for mathmod.
In fact, it was not easy to find thyme-control-structures in the forum
so i plan to extend a wiki
http://wikis.zum.de/zum/GadApedia/Thyme_algodoo_english
for thyme where things are explained and with
examples in about 10 days.

Thank you!!