English | French | Spanish | Italian | Russian
Boygrouping 是指vvvv中内置的客户端-服务器架构。它使得你可以从一台服务器上控制任意数量的渲染机(也就是客户端)。你在服务器上完成所有的编程工作,vvvv会安排所有相连的客户端来运行 n'sync <!-- now you know why it's called 'boygrouping'-->。使用boygrouping技术的应用程序通常都是多屏系统或者无缝拼接的投影装置。
beta22版中提供了一个新功能,可以使一个客户端监听多个服务器。 仔细阅读下面的MultiBoygrouping部分以深入了解,但第一步还是要保证你已经理解了传统的设置方法:
一个boygroup通常由一个专门的PC服务器加上一定数量的PC客户端组成,它们之间通过以太网连接。现在当然最好有千兆连接,但我们仍然可以在百兆环境下在vvvv中应用boygrouping。
最简单的boygroup只有一台服务器和一台客户端电脑。在这样一个设置中,你甚至可以用该服务器的全屏幕输出作为主输出之一。不过,你的程序可能比较耗电(就这么一说了),这么做就未必是一种好的选择,因为多数情况下,服务器有更多的工作要做,这样会导致它输出的帧速比在客户端低。
用vvvv来开发某个项目时,一个比较好的做法是创建如下的目录结构:
C:\MYPROJECT\patches C:\MYPROJECT\resources C:\MYPROJECT\vvvv
在一个特定的boygroup设置中,有必要在网络上共享\myproject目录,并在所有的客户端上创建相同的结构。不过呢,客户端上的\patches目录里并不需要.v4p文件,因为它们将神奇地从服务器上获得其所有结点!如果服务器上有一些必要的.fx或.dll文件,客户端上的这个目录里还是需要拷贝一份的。同时也需了解即便你在客户端里拷贝了备份了所有.v4p文件也没关系,反正是不会用到它们的。
boygrouping不在网络上传输任何资源(纹理,视频,特效文件, .. )。只有原始数据(值,字符串,颜色,枚举)被自动处理。因此,服务器上的程序片上调用的所有的资源,必须在客户端上对应的文件系统中也能获得。使用额外的工具可以轻松地使一台服务器与多台客户端同步目录结构。参见 RemoterSA 或 kalles file modules.
程序片中客户端的部分是相当透明的。其实 在所有客户端上都没有什么程序片要做 。你只要以 vvvv.exe /client [服务器IP地址] 命令行参数 这样的带命令行参数的方式运行vvvv:
vvvv.exe /client 192.168.0.100
假设 192.168.0.100 是服务器的IP地址。您可以通过检查任务栏来验证vvvv是不是在客户端模式上运行,vvvv的窗口标题应该是: //CLIENT of 192.168.0.100
在服务器上用 /server 命令行参数 这样的参数启动vvvv,注意任务栏上的vvvv按钮现在显示 SERVER! 以指明当前模式。
在同一命令行上,你还可以指定可选的广播IP地址,各客户端依靠这一地址工作,就像这样:
vvvv.exe /server 192.168.0.255
当你的服务器有多个网络设备时这样做很管用。如果没有指定ip,那么就选用默认的网络适配器。
为了让服务器知道需要处理哪些客户端,需创建一个 Boygroup (VVVV Server) 服务器节点。然后将这个结点的clients引脚连到一个包含你所有客户端的IP地址的铺展上,通常你的程序片最后有点像这样:
要注意的是Boygroup节点的输出承载了一个布尔值的铺展,它指出了各个客户的连接状态。如果一切都设置正确,客户端启动几秒钟(<10)后,就会显示已连接。
在服务器模式下运行的一个vvvv实例中,快捷键CTRL+B能让你boygroup个别节点。boygroup过的节点都染上了蓝色,以此来表示它们已经映射到客户端(即使你看不到它们),现正在客户端上计算呢。
通常你会先从boygroup一个渲染器开始。注意vvvv是如何自动boygroup一些邻近的节点的。这是因为通过节点连接线连起来的那些节点(如变换,纹理,音频,视频,层,...)需要连接到网络的同一边。这基本上是自动的,几乎不需要你多加思考。
不过需要多花一些功夫的是,那些除了自动boygroup掉的节点外,你该如何手动boygroup哪些节点以达到最佳效果。不存在一般性规则,诸如“boygroup多多益善”或“少用一点boygroup就是好的boygroup”。
所以我们要明白boygroup过的节点(蓝色)和正常节点(灰色)的之间的连接上传送的数据(当然仅仅当它们改变了的时侯)是需要在每帧上都透过网络来传送的。因此,你要关心在那些连接上不传送具有太大的切片数的铺展,宁可boygroup那些创建铺展切片数的节点。
让我们来看一看编程时面临的3种不同的boygrouping应用场景:
要找到哪些节点适合做boygroup是需要一些实践经验的,不过一般而言,你不能错得太离谱。如果你的结果不顺畅,就试试看不同的节点组合方式,或者将动画节点变成蓝色节点。
So far all clients would really always do everything in complete sync which isn't of much use. Consider Justin, Lance, JC, Joey and Chris performing their dancemovements all at the very same position on stage. While this would cause interesting artefacts it just wouldn't work in our limited 3 dimensions. Therefore boygrouping introduces a ClientID which is the only feature that lets you distinguish between the clients (and indeed the server) from a patchs view.
The Boygroup (VVVV Client) node returns a different ID from 0 up to ClientsCount – 1 on each client. The order depends on the spread of IP-addresses you entered on the Boygroup (VVVV Server) node. IP in slice 0 will be ClientID 0, IP in slice 1 will be ClientID 1 and so on. Note that on the server Boygroup (VVVV Client) returns whatever value you set on its ServerID input and whatever value you choose for the ServerID has no effect on the clients. Changing the ServerID simply lets you simulate any of the clients on the server.
For a simple test patch see
girlpower\takethat.v4p.
There you see the Boygroup (VVVV Client) node in action. In the example it is used to set the camera to a different offset on each client.
The standard boygrouping scenario is that you still want to be patching on the server while your clients already are in fullscreen. Therefore you'll want the Renderers Fullscreen pin be set to 1 on the clients but 0 on the server. Remember that the only way to distinguish the server from all the clients (and the clients from each other) is the ClientID. Depending on this you can patch something like the following to have a renderer on the server in windowed mode while it is fullscreen on all clients.
Simply put clients cannot only obey to one master but receive patches and values from any number of servers you want them to.
Imagine the following setup: You have 65 projectors showing one continuous visual, but also at times they are supposed to show special content in 5 clusters of around 12 projectors each. Here, instead of having one server that needs to compute all the patches of the master-visual and the individual area contents at once you can make use of MultiBoygrouping. Specify one master server that has all the clients connected and provides the master-visual and dedicate 5 area-servers to provide individual area contents that are only connected to the individual areas clients.
Also imagine a live collaborative event where you have some clients connected to projectors and multiple operators connected to them at the same time with their own server...
Practically the only thing you need to do to assign a client to multiple servers, is starting it with additional /client commandline parameters, like:
/client 192.168.0.100 /client 192.168.0.200:5555
Note that here it is necessary to use a different port for every connection as described in the FAQ about network ports below.
see tonfilm-VideoSync?
When having to deal with a large number of clients it is often useful to start/stop vvvv.exe or other processes on all of them with just one click from the server. Also you may want to reboot/shutdown/WakeOnLAN individual clients or establish a VNC connection to one of them for debugging. All this and some more can conveniently be done with our separate tool: RemoterSA.
Alternatively some of those features could be even patched using the Remote Shell node RSh (Network). Also see RSH HowTo.
This shortcut only works in server-mode. Start vvvv with the /server flag to enable boygrouping.
Yep. that is very likely so. The solution to this problem is simple: Instead of having a bang between a blue and a gray node patch it so you have only a changing value (e.g. counting up a value) being transmitted via the network. The first blue node is then a Change (Animation) to convert the valuechange to your desired bang.
For an explanation read on: server and clients are not framesynced. It is most likely that clients run faster than the server, which usually has some overhead. Even though the bang will definitely be sent from the server it may just arrive on clients in between frames and be discarded. A bang is essentially a change to 1 followed by a change back to 0 in the next frame. If both those messages arrive on the client in the same frame only the last message is taken resulting in a loss of the bang.
Per default vvvv establishes a TCP connection on port 3333 to every client for transmitting all graph changes. All value changes are being broadcast on UDP port 3333. You can change that default port via the Boygroup (VVVV Server) nodes Network Port pin. Note though, that if you do so you also have to start your clients with a modified startup command like this:
/client 192.168.0.100:4444
anonymous user login
~2d ago
~2d ago
~9d ago
~11d ago
~13d ago
~16d ago
~16d ago
~24d ago
~30d ago
~30d ago