Forum

Nubi: Timer

hi there and greetings,
First i have to do some gratulation cause ive never learnded/produced something that fast as in vvvv. the logic is impressive and i love that interface with context and the pins
displayed that what you need. with a little knowledge of structured programming or oop you can do everything faster, rapid prototyping lives.

So for my first post i got a fresh nubi question, iam trying to loop images from a dir fade them for two seconds or morph and then wait 10 seconds.
Timer:
So in C++ and MS C# there is an function named timer() so, do you know how to do it here?
Loop:
how do i programm a loop in here? no iam not stupid :D
Trans/Morph/Fade:
are there any maybe freeframe or DX effects/functions for transition and morphing?

grats and
thx in adavance

Martin Lierschof
Art University Linz/Austria

hello

made a small patch for you. maybe not the best solution, because all images are loaded in the graphic cards texture memory in the beginning. but this keeps the patch simple, because we can work with one spread which has exactly the size of number of images. and once the textures a loaded everything runs smooth.

Basically it counts how many images are in the directory, then dublicates the same number of quads at the same position. each quad gets the texture in the same order as the dir node outputs the filenames. The SetAlpha node can set the Alpha Channel for each quad. the counter node in conjunction with peakspread sets the alphachannel for each quad one after another from 0 to 1. with the damper node you can filter the bolean jump from 0 to 1 to a smooth float over a given time.

hope this helps you a bit

cheers

DiaShow.v4p (11.1 kB)

damn i luv u !

do u have such a lot sparetime to do this ? :D i dont

but thanks in advance, but one hand washes the other so if you need something where i can help!

elektromeier, that is one patch I can realy learn from, so many thnx.

How is it that all my images display like they are the same sizes?? (I just picked a ramndom folder with loads of JPGs in there)

hello west

this is because the images are mapped as texture on a quad (or two quads for the fade effect to be correct) which has allways the same size.

but i think theres a way to resize the quad to the correct ratio, for this, you first need to find out what dimension each image has… but as far as i know there s no node which can tell you that.

there a node called: info (ex9.texture) which gives you the width and height of a texture… unfortunately this information is retreived after resizing to a power of two by directx. i made a new topic related to this problem in wishlists:
File Handling

maybe someone knows a workaround to this problem???

cheers
ele

hello west…

found out that the aviparser is able to read pictures (i tried with pngs and jpgs) as well. at least it outputs the dimensions as long they are not bigger than 2000x1000 pixels… unfortunately the previewoutput isnt working correctly with pictures. it just outputs some pixelnoise art. maybe a bug maybe the aviparser isnt done for previewing pictures?

Can a dev explain here please? a previewnode for pics AND video would be very cool

try this. im not sure if have done that aspect ratio thing correctly but i looks more or less correct.

DiaShowRatio.v4p (16.6 kB)

about AviParser and still images: it seems to be depending on what directshow filters you have installed on your system. for me .jpgs and .bmps work (even with preview). .png doesn’t work here. what you need is a directshow filter that can read your still image file format. maybe one day we include one. meanwhile you could only hope that some other software installs a filter on your system. hard to figure out where they come from…

.mov files are something different again. i just tried but didn’t get it to work even though i have quicktime alternative installed…

there a node called: info (ex9.texture) which gives you the width
and height of a texture… unfortunately this information is retreived
after resizing to a power of two by directxmaybe someone knows a
workaround to this problem???

you could hack a workaround with a Reader and the Ord node - read the jpg in as a string and select the bytes containing the width and height. note that each image format does that differently, and there may be all kind of different formats.

see http://www.obrador.com/essentialjpeg/HeaderInfo.htm for example for interpreting jpgs data

i agree that a specific node would be favourable