|
|
FR
Gudd, the Generic Udp Device Driver
Gudd is a "device driver" for Xsi.
This new version now allow multiples instances .
Gudd get a udp packet and split it by the space (" "), and then put this value into a channel.
Because some software are sending strange datas at the end of their packet, the last one will be remove,
so it's necessary to end your packet by " something".
It looks like the DeviceManager do not resend the id of the device to the driver (the dll), so we had to develop a particular interface for the gudd device : GuddManager.
After instalation, you'll find it in animation->tools->devices->GUDD Manager :
Open the GuddManager will deactivate and reactivate the DeviceManager to "clean" it.
Clic on the GUDD button import a gudd device, associating it an id.
Theoretically, 255 devices can be imported, but actually for me, xsi's crashing at the 18th (that is not so bad )...
We can now edit options of each devices : receiver's udp port, and number of channels.
Note that the number of channels do not affect the driver itself that split and count datas Independently from the manager.
This value is only effective for the creation of channels' map : the AutoMap button.
This button will create a hierarchy of nulls, named Gudd_IdDevice_IdChannel, and associate each channels to the kine.local.posy of those nulls.
The z position is equal to the id of the device, and the x position is equal to the id of the channel.
Because we have to test if it exist, this function will select the null Gudd_IdDevice_IdChannel, and create it if an error is returned.
The result is a long log of error, that are not error!
Now activate the device, the message "Socket Bind OK" must be returned.
If it's not the case, the port is surely already open ...
The last step is now to send a packet of float, separated by space, to the selected udp port.
For example, if you have puredata installed, just execute this 2 lignes of python open the patch UdpResender9999.pd :
import os
os.system("..\\..\\Doc\\GuddDevice\\UdpResender9999.pd")
This patch is resending 40 times the same value with a delay on the port 5000, and their inverse (* -1) on the 5555.
You can also try the MouseResend that's resending mouse's value (xy+ wheel + 5 buttons ) on the 5555:
import os
os.system("start MouseResend.exe")
Notes :
* What is it for ?
* The autoMap can be "hot changed" to add or remove channels.
* Xsi only allows a maximun of 256 channels.
* The udp recept is non blocking, so xsi (eg framerate) is actualised only when receiveing.
* Moreover, update of channels (the SetValue) will be done only if the value is diferent from the one before, so a minimum of process is require.
* Thanks to send me a feedback : gonzagueddr at yahoo.fr
Installation :
Execute GuddSetup.exe, python is required.
If you don't have python, or troubles, extract GuddSetup.exe.
Copy/paste the content of GuddSetup/XSI_6 into your si install folder, and then change the path of the <OptionsPreset> in the XSI_6\Data\Devices\GUDD.xsidevice
copyright © Gonzague Defos du Rau, avril 2008
This programs are free but still property of the author.
|
|
|
|