ClusterConfig.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. from direct.showbase.DirectObject import *
  2. from ClusterClient import *
  3. import string
  4. # A dictionary of information for various cluster configurations.
  5. # Dictionary is keyed on cluster-config string
  6. # Each dictionary contains a list of display configurations, one for
  7. # each display in the cluster
  8. # Information that can be specified for each display:
  9. # display name: Name of display (used in Configrc to specify server)
  10. # display type: Used to flag client vs. server
  11. # pos: positional offset of display's camera from main cluster group
  12. # hpr: orientation offset of display's camera from main cluster group
  13. # focal length: display's focal length (in mm)
  14. # film size: display's film size (in inches)
  15. # film offset: offset of film back (in inches)
  16. # Note: Note, this overrides offsets specified in DirectCamConfig.py
  17. # For now we only specify frustum for first display region of configuration
  18. # TODO: Need to handle multiple display regions per cluster node and to
  19. # generalize to non cluster situations
  20. ClientConfigs = {
  21. 'single-server' : [{'display name' : 'display0',
  22. 'display mode' : 'client',
  23. 'pos' : Vec3(0),
  24. 'hpr' : Vec3(0)}
  25. ],
  26. 'two-server' : [{'display name' : 'master',
  27. 'display mode' : 'client',
  28. 'pos' : Vec3(0),
  29. #'hpr' : Vec3(30,0,0)},
  30. 'hpr' : Vec3(0,0,0)},
  31. {'display name' : 'la',
  32. 'pos' : Vec3(0),
  33. #'hpr' : Vec3(-30,0,0)
  34. 'hpr' : Vec3(0,0,0)
  35. }
  36. ],
  37. 'mono-cave' : [{'display name' : 'la',
  38. 'pos' : Vec3(-0.105, -0.020, 5.000),
  39. 'hpr' : Vec3(51.213, 0.000, 0.000),
  40. 'focal length' : 0.809,
  41. 'film size' : (1.000, 0.831),
  42. 'film offset' : (0.000, 0.173),
  43. },
  44. {'display name' : 'lb',
  45. 'display mode' : 'client',
  46. 'pos' : Vec3(-0.105, -0.020, 5.000),
  47. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  48. 'focal length' : 0.815,
  49. 'film size' : (1.000, 0.831),
  50. 'film offset' : (0.000, 0.173),
  51. },
  52. {'display name' : 'lc',
  53. 'pos' : Vec3(-0.105, -0.020, 5.000),
  54. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  55. 'focal length' : 0.820,
  56. 'film size' : (1.000, 0.830),
  57. 'film offset' : (-0.000, 0.173),
  58. },
  59. ],
  60. 'seamless-cave' : [{'display name' : 'master',
  61. 'display mode' : 'client',
  62. 'pos' : Vec3(-0.105, -0.020, 5.000),
  63. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  64. 'focal length' : 0.815,
  65. 'film size' : (1.000, 0.831),
  66. 'film offset' : (0.000, 0.173),
  67. },
  68. {'display name' : 'la',
  69. 'pos' : Vec3(-0.105, -0.020, 5.000),
  70. 'hpr' : Vec3(51.213, 0.000, 0.000),
  71. 'focal length' : 0.809,
  72. 'film size' : (1.000, 0.831),
  73. 'film offset' : (0.000, 0.173),
  74. },
  75. {'display name' : 'lb',
  76. 'pos' : Vec3(-0.105, -0.020, 5.000),
  77. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  78. 'focal length' : 0.815,
  79. 'film size' : (1.000, 0.831),
  80. 'film offset' : (0.000, 0.173),
  81. },
  82. {'display name' : 'lc',
  83. 'pos' : Vec3(-0.105, -0.020, 5.000),
  84. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  85. 'focal length' : 0.820,
  86. 'film size' : (1.000, 0.830),
  87. 'film offset' : (-0.000, 0.173),
  88. },
  89. {'display name' : 'ra',
  90. 'pos' : Vec3(0.105, -0.020, 5.000),
  91. 'hpr' : Vec3(51.675, 0.000, 0.000),
  92. 'focal length' : 0.820,
  93. 'film size' : (1.000, 0.830),
  94. 'film offset' : (0.000, 0.173),
  95. },
  96. {'display name' : 'rb',
  97. 'pos' : Vec3(0.105, -0.020, 5.000),
  98. 'hpr' : Vec3(0.370, 0.000, 0.000),
  99. 'focal length' : 0.815,
  100. 'film size' : (1.000, 0.831),
  101. 'film offset' : (0.000, 0.173),
  102. },
  103. {'display name' : 'rc',
  104. 'pos' : Vec3(0.105, -0.020, 5.000),
  105. 'hpr' : Vec3(-51.213, 0.000, 0.000),
  106. 'focal length' : 0.809,
  107. 'film size' : (1.000, 0.831),
  108. 'film offset' : (-0.000, 0.173),
  109. },
  110. ],
  111. 'nemo-cave' : [{'display name' : 'master',
  112. 'display mode' : 'client',
  113. 'pos' : Vec3(-0.105, -0.020, 5.000),
  114. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  115. 'focal length' : 0.815,
  116. 'film size' : (1.000, 0.831),
  117. 'film offset' : (0.000, 0.173),
  118. },
  119. {'display name' : 'la',
  120. 'pos' : Vec3(-0.105, -0.020, 5.000),
  121. 'hpr' : Vec3(51.213, 0.000, 0.000),
  122. 'focal length' : 0.809,
  123. 'film size' : (1.000, 0.831),
  124. 'film offset' : (0.000, 0.173),
  125. },
  126. {'display name' : 'lb',
  127. 'pos' : Vec3(-0.105, -0.020, 5.000),
  128. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  129. 'focal length' : 0.815,
  130. 'film size' : (1.000, 0.831),
  131. 'film offset' : (0.000, 0.173),
  132. },
  133. {'display name' : 'lc',
  134. 'pos' : Vec3(-0.105, -0.020, 5.000),
  135. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  136. 'focal length' : 0.820,
  137. 'film size' : (1.000, 0.830),
  138. 'film offset' : (-0.000, 0.173),
  139. },
  140. {'display name' : 'ra',
  141. 'pos' : Vec3(0.105, -0.020, 5.000),
  142. 'hpr' : Vec3(51.675, 0.000, 0.000),
  143. 'focal length' : 0.820,
  144. 'film size' : (1.000, 0.830),
  145. 'film offset' : (0.000, 0.173),
  146. },
  147. {'display name' : 'rb',
  148. 'pos' : Vec3(0.105, -0.020, 5.000),
  149. 'hpr' : Vec3(0.370, 0.000, 0.000),
  150. 'focal length' : 0.815,
  151. 'film size' : (1.000, 0.831),
  152. 'film offset' : (0.000, 0.173),
  153. },
  154. {'display name' : 'rc',
  155. 'pos' : Vec3(0.105, -0.020, 5.000),
  156. 'hpr' : Vec3(-51.213, 0.000, 0.000),
  157. 'focal length' : 0.809,
  158. 'film size' : (1.000, 0.831),
  159. 'film offset' : (-0.000, 0.173),
  160. },
  161. {'display name' : 'lAudienceL',
  162. 'pos' : Vec3(-4.895, -0.020, 5.000),
  163. 'hpr' : Vec3(51.213, 0.000, 0.000),
  164. 'focal length' : 0.809,
  165. 'film size' : (1.000, 0.831),
  166. 'film offset' : (0.000, 0.173),
  167. },
  168. {'display name' : 'rAudienceL',
  169. 'pos' : Vec3(-5.105, -8.0, 5.000),
  170. 'hpr' : Vec3(51.675, 0.000, 0.000),
  171. 'focal length' : 0.820,
  172. 'film size' : (1.000, 0.830),
  173. 'film offset' : (0.000, 0.173),
  174. },
  175. {'display name' : 'lAudienceR',
  176. 'pos' : Vec3(5.105, -0.020, 5.000),
  177. 'hpr' : Vec3(-51.213, 0.000, 0.000),
  178. 'focal length' : 0.809,
  179. 'film size' : (1.000, 0.831),
  180. 'film offset' : (0.000, 0.173),
  181. },
  182. {'display name' : 'rAudienceR',
  183. 'pos' : Vec3(4.895, -8.0, 5.000),
  184. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  185. 'focal length' : 0.820,
  186. 'film size' : (1.000, 0.830),
  187. 'film offset' : (0.000, 0.173),
  188. },
  189. ],
  190. 'nemo-cave-narrow' : [{'display name' : 'master',
  191. 'display mode' : 'client',
  192. 'pos' : Vec3(-0.105, -0.020, 5.000),
  193. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  194. 'focal length' : 0.815,
  195. 'film size' : (1.000, 0.831),
  196. 'film offset' : (0.000, 0.173),
  197. },
  198. {'display name' : 'la',
  199. 'pos' : Vec3(-0.105, -19.890, 4.500),
  200. 'hpr' : Vec3(51.500, 0.000, 0.000),
  201. 'focal length' : 1.662,
  202. 'film size' : (1.000, 0.828),
  203. 'film offset' : (1.079, 0.207),
  204. },
  205. {'display name' : 'lb',
  206. 'pos' : Vec3(-0.105, -19.890, 4.500),
  207. 'hpr' : Vec3(0.000, 0.000, 0.000),
  208. 'focal length' : 2.186,
  209. 'film size' : (1.000, 0.828),
  210. 'film offset' : (0.007, 0.207),
  211. },
  212. {'display name' : 'lc',
  213. 'pos' : Vec3(-0.105, -19.890, 4.500),
  214. 'hpr' : Vec3(-51.500, 0.000, 0.000),
  215. 'focal length' : 1.673,
  216. 'film size' : (1.000, 0.828),
  217. 'film offset' : (-1.070, 0.207),
  218. },
  219. {'display name' : 'ra',
  220. 'pos' : Vec3(0.105, -19.890, 4.500),
  221. 'hpr' : Vec3(51.500, 0.000, 0.000),
  222. 'focal length' : 1.673,
  223. 'film size' : (1.000, 0.828),
  224. 'film offset' : (1.070, 0.207),
  225. },
  226. {'display name' : 'rb',
  227. 'pos' : Vec3(0.105, -19.890, 4.500),
  228. 'hpr' : Vec3(0.000, 0.000, 0.000),
  229. 'focal length' : 2.186,
  230. 'film size' : (1.000, 0.828),
  231. 'film offset' : (-0.007, 0.207),
  232. },
  233. {'display name' : 'rc',
  234. 'pos' : Vec3(0.105, -19.890, 4.500),
  235. 'hpr' : Vec3(-51.500, 0.000, 0.000),
  236. 'focal length' : 1.662,
  237. 'film size' : (1.000, 0.828),
  238. 'film offset' : (-1.079, 0.207),
  239. },
  240. {'display name' : 'lAudienceL',
  241. 'pos' : Vec3(-0.105, -19.890, 4.500),
  242. 'hpr' : Vec3(49.038, 0.000, 0.000),
  243. 'focal length' : 1.452,
  244. 'film size' : (1.000, 0.797),
  245. 'film offset' : (-0.292, 0.149),
  246. },
  247. {'display name' : 'rAudienceL',
  248. 'pos' : Vec3(0.105, -19.890, 4.500),
  249. 'hpr' : Vec3(49.038, 0.000, 0.000),
  250. 'focal length' : 1.468,
  251. 'film size' : (1.000, 0.797),
  252. 'film offset' : (-0.306, 0.149),
  253. },
  254. {'display name' : 'lAudienceR',
  255. 'pos' : Vec3(-0.105, -19.890, 4.500),
  256. 'hpr' : Vec3(-52.750, 0.000, 0.000),
  257. 'focal length' : 1.551,
  258. 'film size' : (1.000, 0.796),
  259. 'film offset' : (0.245, 0.149),
  260. },
  261. {'display name' : 'rAudienceR',
  262. 'pos' : Vec3(0.105, -19.890, 4.500),
  263. 'hpr' : Vec3(-52.750, 0.000, 0.000),
  264. 'focal length' : 1.534,
  265. 'film size' : (1.000, 0.796),
  266. 'film offset' : (0.232, 0.149),
  267. },
  268. {'display name' : 'lCart',
  269. 'pos' : Vec3(-0.105, -0.020, 5.000),
  270. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  271. 'focal length' : 0.815,
  272. 'film size' : (1.000, 0.831),
  273. 'film offset' : (0.000, 0.173),
  274. },
  275. {'display name' : 'rCart',
  276. 'pos' : Vec3(0.105, -0.020, 5.000),
  277. 'hpr' : Vec3(0.370, 0.000, 0.000),
  278. 'focal length' : 0.815,
  279. 'film size' : (1.000, 0.831),
  280. 'film offset' : (0.000, 0.173),
  281. },
  282. ],
  283. 'fourd-cave' : [{'display name' : 'master',
  284. 'display mode' : 'client',
  285. 'pos' : Vec3(-0.105, -0.020, 5.000),
  286. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  287. 'focal length' : 0.815,
  288. 'film size' : (1.000, 0.831),
  289. 'film offset' : (0.000, 0.173),
  290. },
  291. {'display name' : 'la',
  292. 'pos' : Vec3(-0.105, -0.020, 5.000),
  293. 'hpr' : Vec3(51.213, 0.000, 0.000),
  294. 'focal length' : 0.809,
  295. 'film size' : (1.000, 0.831),
  296. 'film offset' : (0.000, 0.173),
  297. },
  298. {'display name' : 'lb',
  299. 'pos' : Vec3(-0.105, -0.020, 5.000),
  300. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  301. 'focal length' : 0.815,
  302. 'film size' : (1.000, 0.831),
  303. 'film offset' : (0.000, 0.173),
  304. },
  305. {'display name' : 'lc',
  306. 'pos' : Vec3(-0.105, -0.020, 5.000),
  307. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  308. 'focal length' : 0.820,
  309. 'film size' : (1.000, 0.830),
  310. 'film offset' : (-0.000, 0.173),
  311. },
  312. {'display name' : 'ra',
  313. 'pos' : Vec3(0.105, -0.020, 5.000),
  314. 'hpr' : Vec3(51.675, 0.000, 0.000),
  315. 'focal length' : 0.820,
  316. 'film size' : (1.000, 0.830),
  317. 'film offset' : (0.000, 0.173),
  318. },
  319. {'display name' : 'rb',
  320. 'pos' : Vec3(0.105, -0.020, 5.000),
  321. 'hpr' : Vec3(0.370, 0.000, 0.000),
  322. 'focal length' : 0.815,
  323. 'film size' : (1.000, 0.831),
  324. 'film offset' : (0.000, 0.173),
  325. },
  326. {'display name' : 'rc',
  327. 'pos' : Vec3(0.105, -0.020, 5.000),
  328. 'hpr' : Vec3(-51.213, 0.000, 0.000),
  329. 'focal length' : 0.809,
  330. 'film size' : (1.000, 0.831),
  331. 'film offset' : (-0.000, 0.173),
  332. },
  333. {'display name' : 'lAudienceL',
  334. 'pos' : Vec3(-4.895, -0.020, 5.000),
  335. 'hpr' : Vec3(65.213, 0.000, 0.000),
  336. 'focal length' : 0.809,
  337. 'film size' : (1.000, 0.831),
  338. 'film offset' : (0.000, 0.173),
  339. },
  340. {'display name' : 'rAudienceL',
  341. 'pos' : Vec3(-5.105, -8.0, 5.000),
  342. 'hpr' : Vec3(65.675, 0.000, 0.000),
  343. 'focal length' : 0.820,
  344. 'film size' : (1.000, 0.830),
  345. 'film offset' : (0.000, 0.173),
  346. },
  347. {'display name' : 'lAudienceR',
  348. 'pos' : Vec3(5.105, -0.020, 5.000),
  349. 'hpr' : Vec3(-65.213, 0.000, 0.000),
  350. 'focal length' : 0.809,
  351. 'film size' : (1.000, 0.831),
  352. 'film offset' : (0.000, 0.173),
  353. },
  354. {'display name' : 'rAudienceR',
  355. 'pos' : Vec3(4.895, -8.0, 5.000),
  356. 'hpr' : Vec3(-65.675, 0.000, 0.000),
  357. 'focal length' : 0.820,
  358. 'film size' : (1.000, 0.830),
  359. 'film offset' : (0.000, 0.173),
  360. },
  361. ],
  362. 'parallax-cave' : [{'display name' : 'master',
  363. 'display mode' : 'client',
  364. 'pos': Vec3(0),
  365. 'hpr': Vec3(0),
  366. 'focal length' : 0.815,
  367. 'film size' : (1.000, 0.831),
  368. 'film offset' : (0.000, 0.173),
  369. },
  370. {'display name' : 'la',
  371. 'pos': Vec3(0),
  372. 'hpr': Vec3(0),
  373. 'focal length' : 0.809,
  374. 'film size' : (1.000, 0.831),
  375. 'film offset' : (0.000, 0.173),
  376. },
  377. {'display name' : 'lb',
  378. 'pos': Vec3(0),
  379. 'hpr': Vec3(0),
  380. 'focal length' : 0.815,
  381. 'film size' : (1.000, 0.831),
  382. 'film offset' : (0.000, 0.173),
  383. },
  384. {'display name' : 'lc',
  385. 'pos': Vec3(0),
  386. 'hpr': Vec3(0),
  387. 'focal length' : 0.820,
  388. 'film size' : (1.000, 0.830),
  389. 'film offset' : (-0.000, 0.173),
  390. },
  391. {'display name' : 'ra',
  392. 'pos': Vec3(0),
  393. 'hpr': Vec3(0),
  394. 'focal length' : 0.820,
  395. 'film size' : (1.000, 0.830),
  396. 'film offset' : (0.000, 0.173),
  397. },
  398. {'display name' : 'rb',
  399. 'pos': Vec3(0),
  400. 'hpr': Vec3(0),
  401. 'focal length' : 0.815,
  402. 'film size' : (1.000, 0.831),
  403. 'film offset' : (0.000, 0.173),
  404. },
  405. {'display name' : 'rc',
  406. 'pos': Vec3(0),
  407. 'hpr': Vec3(0),
  408. 'focal length' : 0.809,
  409. 'film size' : (1.000, 0.831),
  410. 'film offset' : (-0.000, 0.173),
  411. },
  412. ],
  413. 'carttest' : [{'display name' : 'master',
  414. 'display mode' : 'client',
  415. 'pos' : Vec3(0),
  416. 'hpr' : Vec3(0),
  417. },
  418. {'display name' : 'left',
  419. 'pos' : Vec3(-.105,0,0),
  420. 'hpr' : Vec3(0,0,0)},
  421. {'display name' : 'right',
  422. 'pos' : Vec3(.105,0,0),
  423. 'hpr' : Vec3(0,0,0)}
  424. ],
  425. 'ursula' : [{'display name' : 'master',
  426. 'display mode' : 'client',
  427. 'pos' : Vec3(0),
  428. 'hpr' : Vec3(0),
  429. },
  430. {'display name' : 'l',
  431. 'pos' : Vec3(-.105,0,0),
  432. 'hpr' : Vec3(0,0,0),
  433. 'focal length' : 15,
  434. 'film size' : (13.33, 10),
  435. #'film offset' : (0.105, -2),
  436. 'film offset' : (0.105, -1),
  437. },
  438. {'display name' : 'r',
  439. 'pos' : Vec3(.105,0,0),
  440. 'hpr' : Vec3(0,0,0),
  441. 'focal length' : 15,
  442. 'film size' : (13.33, 10),
  443. #'film offset' : (-0.105, -2),
  444. 'film offset' : (-0.105, -1),
  445. }
  446. ],
  447. 'composite' : [{'display name' : 'master',
  448. 'display mode' : 'client',
  449. 'pos' : Vec3(0),
  450. },
  451. {'display name' : 'left',
  452. 'pos' : Vec3(-0.105, -0.020, 5.000),
  453. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  454. 'focal length' : 0.815,
  455. 'film size' : (1.000, 0.831),
  456. 'film offset' : (0.000, 0.173),
  457. },
  458. {'display name' : 'right',
  459. 'pos' : Vec3(0.105, -0.020, 5.000),
  460. 'hpr' : Vec3(0.370, 0.000, 0.000),
  461. 'focal length' : 0.815,
  462. 'film size' : (1.000, 0.831),
  463. 'film offset' : (0.000, 0.173),
  464. }
  465. ],
  466. }