ivan.rasin Posted November 8, 2016 Share Posted November 8, 2016 Hello, I am just building a test with Unigine Syncker. Now I want to configure a CAVE environment. The documentation says that a mesh needs to specified, but did not show in which coordinate system it has to be configured. I got a configuration working where the positive Z-Axis of the Mesh shows to the left, the positive Y-Axis up and the positive X-Axis towards me, but I am not sure if this is right. I also run into the problem that the projection is not calculated correctly on the slave (see attachement). If I set the aspect ratio to 1:1 it works but not for 1920:1080. Here is the code example for the mesh: int slave_0=mesh.addSurface("slave_0"); //Z-Positive left , Y-Positive up, X-Positive towards mesh.addVertex(vec3(-1.f, -0.108f, 2 * +0.192f), slave_0); //bottom-left corner mesh.addVertex(vec3(-1.f, -0.108f, 0), slave_0); //bottom-right corner mesh.addVertex(vec3(-1.f, +0.108f, 2 * +0.192f), slave_0); //top-left corner mesh.addIndex(0, slave_0); mesh.addIndex(1, slave_0); mesh.addIndex(2, slave_0); mesh.save("slaves.mesh"); May someone know what to do exactly? Link to comment
ivan.rasin Posted November 9, 2016 Author Share Posted November 9, 2016 Here is the screenshot of the slave. As you can see the projection is stretched by an aspect ratio of 192:108. The screen resolution is 1920x1080. Link to comment
silent Posted November 9, 2016 Share Posted November 9, 2016 Hi Ivan, Mesh configuration should represent the real screen size in meters. Could you please try to do this in your mesh generation script?Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ivan.rasin Posted November 9, 2016 Author Share Posted November 9, 2016 Hi Andrey, these are also the values in meters: mesh.addVertex(vec3(-1.f, -0.108f, 2 * +0.192f), slave_0); //bottom-left corner mesh.addVertex(vec3(-1.f, -0.108f, 0), slave_0); //bottom-right corner mesh.addVertex(vec3(-1.f, +0.108f, 2 * +0.192f), slave_0); //top-left corner the screen is 1 meter away and has a size of 0.384 m x 0.216 cm. The cave head Position is (0,0,0). Like I said the projection is not right. If I design the mesh like a sqare (0.384*0.384 for example) the projection is correct over the screen of the slave, but it should be incorrect. Link to comment
ivan.rasin Posted November 9, 2016 Author Share Posted November 9, 2016 I noticed, when I resize the window's height that the vertical fov remains the same and the horizontal fov gets bigger. I think that this should not be the case, the fov should stay the same regardless of the window/viewport size, since it depends on the mesh of the screen and eye position of the viewer. Maybe I am missing something in the configuration of the player/camera. Link to comment
ivan.rasin Posted November 11, 2016 Author Share Posted November 11, 2016 Hello again, I tried a few things but didn't come to a solution until now. So maybe someone can show me how to define a mesh for the setup in the attachement. It is a 3 screen cave with the viewer in the center. Is their anything else I have to setup for projection in the slaves (plugins, settings, commands, etc.) I would really like to test this option, because our company is very interested in such a feature. I also read something about the aspect correction in the documentation and want to ask how to deactivate it from c++ side. Maybe it is the cause of the stretched projection problem I posted earlier. I also tried the grid functionality and observated for positive angles with master_angle a gap between the screens appears, for negative values the screens will overlap. There is a similiar problem reported before. https://developer.unigine.com/forum/topic/3417-solved-angle-mismatch-in-modelview-and-projection-matrix/ Thanks in advance for your help. Link to comment
silent Posted November 15, 2016 Share Posted November 15, 2016 Hi Ivan, Sorry for the late reply. We are still investigating this issue. We using a simple script to generate mesh projections for our projects. In attachment you can find a small example for cave setup (no floor projection). How to use: Launch run_slave_center_config_1.bat; config_1.mesh file will be generated (that can be used to get projection). Monitors / Projectors configuration is defined in config_1.usc file. In that case we do not have stretched images. Could you please also send us a small test project with your setup (script + meshes) so we can test in on our side as well?Thanks! mesh_script.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ivan.rasin Posted November 22, 2016 Author Share Posted November 22, 2016 Hi Andrey, thank you for your mesh example. I created a mesh with the parameters you set in the usc file, but I don't think the images are right (see attachements). I used the syncker material example which comes along with unigine 2.3.1. my batch files where configured like this: master: set PATH=%PATH%;%~dp0lib; start bin\main_x86.exe -editor_script "core/systems/syncker/syncker_master.cpp" -video_app auto ^ -video_vsync 1 ^ -video_mode 1 ^ -video_resizable 1 ^ -data_path "../" ^ -extern_plugin "Collada,OpenFlight,AppProjection" ^ -engine_config "../data/samples/unigine.cfg" -console_command "world_reload && console_key 42" slave: set PATH=%PATH%;%~dp0lib; start bin\main_x86.exe -video_app auto ^ -video_vsync 0 ^ -video_mode 5 ^ -video_resizable 1 ^ -video_fullscreen 0 ^ -data_path "../" ^ -extern_plugin "Collada,OpenFlight,AppProjection" ^ -editor_script "core/systems/syncker/syncker_slave.cpp" ^ -console_command "editor_reload && console_key 42" Thanks for your help Link to comment
Recommended Posts