View Full Version : Help with array and surfacing lscript

10-04-2008, 06:02 PM
If somebody could help me with a project i am working on i would greatly appreciate it.

I am trying to array a line of hundreds of rectangles, and have each rectangle go down by a percent of transparancy and also have a video texture on them which will be the next frame as we see the rectangles extend in to the distance.

Any kind of direction would be a big help.


10-07-2008, 07:59 PM
so you're saying you have a video and a line of rectangles lined up. you want a video's offseted frame to be applied to each rectangle. so that video frame 1 is applied to rectangle 1, frame 2 applied to rectangle 2, etc. and that you want transparency to diminish progressively. is that correct?

10-08-2008, 08:48 AM
Thats it, dead on!
any idea??

10-08-2008, 09:44 AM
ok, well, in my opinion lscript is not the answer, because if you tried it it would be more complicated than it has to be.

my opinion is to use nodes to fine-tune the video offset and transparency. transparency should be easy to set using gradients.

the video offset is the part that you'd have to compromise. first you have to convert the video in to image sequence, because LW's not going to allow you to load the same video and offset it.

now, each offset means one instance of the image sequence. it really depends on how varied you want it to be. maybe you can get away with 5-10 offset variations. (i've posted an image containing only three image variations.) so in the image editor, let's say we create three instances and then manually move the start frame of each sequence to something random. with that done, we go to the surface node editor. the rectangles, ideally, would be one surface only.

now the idea is to use a gradient with an input of the distance between the spot point and a reference object (or camera). then we create three keys (one key for every image) and then click Show Output for each key. this enables you to plug each image node to the key's color. in short, instead of gradient colors, an image is replaced as the object's distance varies from the reference object.

the gradient input could also be weight map (in this case the rectangles should be one mesh). or maybe even the ObjectID (separate meshes loaded and cloned in layout), if you have that node.

10-08-2008, 09:48 AM
i forgot to mention, you can try to do this in a compositing program. i would look into exporting a UV pass of your rectanges and using a UV texture operator to attach the video. but only if that's possible with your compositor.