I’ve started to make my second project in 4v, but I have some problem…
I’d like to create a patch that shows in a renderer some 3d models contents in usb sticks, the final idea is to create a composition of 3d objects by 4/ 8 different usb sticks.
So I’ve started to put a Collada model in a usb pen and then I connected this file with Mesh, PhongDirectional and Renderer, but when I remove the usb pen the 3d model still remains and also if I try to put another usb with another 3d model the things doesn’t change
How can I do?
Well, you need to tell to vvvv that you want to load another/different file.
That is why you need to BANG all the Reload pins on the collada nodes.
So if you can prepare all your USB sticks, you could name them all the same and name all the files the same. Than use the Exist (File) node to figure out if you changed the USB drive, if the "exist pin jumps from 0 (no USB drive) to 1 (A USB drive with the file we want), you know the USB drive is changed and you can reload your model.
Excist USB Drive.v4p (7.2 kB)
Thank you Westbam, now if I change usb stick, change also the model in the renderer ,
But when I remove the pen the 3d model is still in the screen.
there is a way to have in real time a blank screen when I remove the pen?
If the file doesn’t exist, aka no USB stick, the exist gives a zero, so use that zero to turn something off (the shader you use to show the collada should have and enable pin), or switch the file name with a default “Loading shape”
Or scale everything to zero, use a filter (damper, linear filter) to make it smooth.
Without knowing your patch I am just shouting suggestions!!
OK it works, thank you so much!!
There is only a problem, if I start the patch with an usb pen plugged everything works.
but if no one pen is plugged, collada node is red and if I insert the pen nothing happen…
I posted the patch ;)
Mullti_usb2.v4p (32.1 kB)
The nodes get red because they are fed with nothing (NIL) at the start because there is no model to load.
Just use the AvoidNIL node between the output of the Dir node and the rest.
Set the default pin to an empty string or a path to a default model to load when no models are present.