Texture Node Switching

Greetings All

I’m making a node where I want to display either a still image (filetexture) a video (filestream>videotexture) or live video (VideoIn>videotexture) on a quad.

All the data for the quad is in spreads, so I can generate multiple quads that are size X, colour Y and ideally texture Z (which is: video z or still image Z or live image Z) I’m using Switch(nodes) to switch between still, video and live video.

The problem ive got is that the switch (nodes) switch input isn’t spreadable - so the first value in my ‘image type’ spread sets it and then only other textures from that source appear.

I also tried creating a dedicated quad for each type and then sending a spread to the enable pin to control whether it draws that quad or not. However the enable pin isn’t spreadable either…

Any ideas?

Yes, its sad - figured it out either. May be you can come around with a clever combination of GetSlice and/or Select nodes to be spreadable with textures.

Ive been fiddling.

I tried converting the filetexture to video, then using videoOut and SharedMemory however SharedMemorys ‘locations’ pin is again not spreadable.

What I havent tried yet is using AsString (Texture) and then switching the strings per normal, however I can only imagine that uses up a lot of cpu…

i believe dedicated quads for each type are the way to go. instead of using the (sadly unspreadable) enable pin, hook up a UniformScale (Transform) as the last member of your transformation chain and scale all undesired quads to 0.

wouldn’t it work with Cons (EX9.Texture) and GetSlice (Node) ? not exactly sure if it’s what you want, see attached (not tested!)

Switch (EX9.Texture).v4p (6.7 kB)

Appears I’ve been barking up the wrong tree, after all that filestream is of course not spreadable. I really should have checked that first. (For readers from the far future I’m using 40Beta16)

So I’m going to have to change the whole way I’m thinking about this and create a predefined number of quads with attached Filestreams/Filetextures/VideoIns - as many as I might need for this show…

Thanks though!

hi deformer, maybe its quite late,
here is a patch with sub modules, based on Kalle’s furiously interresting CtrlText node. maybe it could help.
switching is done between renderers.

mixer_video.zip (11.6 kB)