i have some instanced geo textured with some small movies (using instance texture and a texture index). i would like to have each instance start on a different frame. is this possible in TD?
I’ve been trying the cache top after the movie in, but haven’t gotten it to really do what i want.
My other option is to make MORE movies that are offset (pre-rendered).
I believe in the OP Snippets there’s an example of using a movie file to feed a Tex3D TOP (I think it’s in the examples of instancing geometry?), which you can feed to the instances, then use the W parameter of the texture settings on the instance page to decide which frame you want. So at that point, you wouldn’t even play your movie, you could use something like an Event CHOP to create an always increasing/looping index for each instance and you would use to that to choose what frame each instance is on, and if your number is moving fast enough, it’ll look like they’re all playing the movie, even though they’re just flying through texture indices very quickly.
i hadn’t thought of converting them to tex3d, and i was completely clueless about the event chop.i guess i still am, but watching the toronto workshop video about instancing and the event chop has helped. now to try and make it work.
thanks.
thanks matt.
of course I’m never satisfied and always want more, so i’m going to think through how to have different random movies with different length without hardcoding the texture assignment. if I was coding this, I would pass that info to the instances when I create them. i’m assuming there isn’t an easy way to know what texture is assigned to which instance?
the way I plan to approach it is to fill a table, whose length is the same as the number of geo instances, with tex3d names and lengths and use that for the texture index, and looping calculations (based on the different frame lengths). will it work? i’ll soon find out.
i
You’ll need a separate texture 3d to cache each video.
Break your instances into groups at the geo level and then assign each one a given video.
Another technique that might provide more of what you’re looking for is to use texture instancing - available only on gforce 600+ and on quadro K series cards. Using this technique you can use pattern matching to link videos to instances. Here an index can be used to specify which texture / video is assigned to each instance.
This is a great technique, though it has a limited deployment that’s dependent on hardware. Another consideration here is that the codec will matter as you’ll be decoding video rather than scrubbing through frames that are already in memory.
This fills up 5 texture3d TOPs (I’ve downrezed them while I’m working on an old laptop), then assigns them to their own constant material.
The CHOP magic here is patterning, sorting, and trimming - that’s not totally what you want, but it’s a move in what I think is the direction you’re after.
Matt, it took me some time to figure out what you were doing in those examples. I finally have something working by mashing up the 2 examples.
I had been using texture instancing for the randomly distributed different videos, which worked well. however, I couldn’t randomly offset the starting frame, which led to this thread. the tex3d lets me control the start frame, but (as I found out) text3d doesn’t work with texture instancing. of course, this is why you are using the different geos and mats.
thanks for your help.
david