Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 19:52

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Four Spectators
PostPosted: 19.02.2012, 18:45 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Hello

I created a small game and now i have to project it into CAVE virtual Environment and for that i need to make four spectators
and i am really not getting an idea how to do it. I am asked to follow this tutorial to make four spectators, does some one has
any idea how this tutorial can help me relate it to creating four spectators.

Following is the tutorial i had to follow.
http://mm-werkstatt.informatik.uni-augsburg.de/projects/GameEngine/doku.php/docs%3atutorials%3anetwork#list_of_network-compatible_gamecomponents

I have read it all but couldn't find how can i relate it to having four spectators. May be my lack of knowledge regarding client server
programming.

I shall be thankful for this favor,


Top
 Profile  
Reply with quote  
 Post subject: Re: Four Spectators
PostPosted: 20.02.2012, 11:02 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Not sure what your problem has to do with network connections but to have four different views for different sides of a cave you can just add four different cameras. But I may misunderstood what you're really want to do


Top
 Profile  
Reply with quote  
 Post subject: Re: Four Spectators
PostPosted: 20.02.2012, 16:37 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
Not sure what your problem has to do with network connections but to have four different views for different sides of a cave you can just add four different cameras. But I may misunderstood what you're really want to do


Yes you are right Volker. I just have to make four views and i also didnt understand what i have to do with network connections,
okay I think you gave a better suggestion that I should add four different cameras

Question 1. Can i simply copy in .scene.xml another file as follows

Code:
<Camera pipeline="pipelines/forward.pipeline.xml" tx="-500" ty="291.6" sx="1" occlusionCulling="0" tz="-1" rx="-30" sy="1" ry="270" sz="1" rz="0" name="A Camera" >
    <Attachment type="GameEngine" name="A Camera" >
    </Attachment>
  </Camera>

<Camera pipeline="pipelines/forward.pipeline.xml" tx="-500" ty="291.6" sx="1" occlusionCulling="0" tz="-1" rx="-30" sy="1" ry="90" sz="1" rz="0" name="Camera2" >
    <Attachment type="GameEngine" name="Camera2" >
    </Attachment>
  </Camera>
// and simililarly camera3 and camera4


Or i will necessarily have to edit and add it from Horde3D Scene Editor ?

Question 2.
how will i get four windows with different views. Obviously i will have to fix positions of camera in a specific way, but i am not getting how will i get four windows
as now we get only one window when we render our scene.


Top
 Profile  
Reply with quote  
 Post subject: Re: Four Spectators
PostPosted: 20.02.2012, 19:34 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
Quote:
Or i will necessarily have to edit and add it from Horde3D Scene Editor ?

I don't know the internals of GameEngine, but maybe it will be easier to add four cameras and their parameters in code? In my opinion it will be easier to find all problems and debug than with writing an xml which structure you don't fully understand.
As for four different views, it seems that GLFW (window system that is used by default in Horde's and GameEngine samples) doesn't support opening more than one window. You would have to render all four cameras on different parts of the window (like in 3ds Max). There were some threads on Horde's forum about making this functionality, but it seems that nobody succeeded.


Top
 Profile  
Reply with quote  
 Post subject: Re: Four Spectators
PostPosted: 20.02.2012, 20:22 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
IMHO it doesn't make too much of a difference if you are adding the cameras in xml by clonig the xml node or do it in code. In both cases you have to retrieve the H3D node handle of all four cameras. If you want different windows you have to create multiple windows with shared opengl contexts. I guess that's not possible with the current GLFW version, maybe GLFW 3.0 supports that. What you can do is using Qt. It does support shared OpenGL contexts. Actually I'm using them myself in the editor, since switching the main view to fullscreen mode did cause some problems I solved by creating an additional shared fullscreen OpenGL context. The only thing you should care about is that it seemed that compiling shaders or uploading textures always have to be done when the first OpenGL context is current. But maybe that was a problem within Qt that has been solved since the first version I used when I created the editor. I haven't done to much research when I stumbled about that problem.


Top
 Profile  
Reply with quote  
 Post subject: Re: Four Spectators
PostPosted: 23.02.2012, 16:29 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
IMHO it doesn't make too much of a difference if you are adding the cameras in xml by clonig the xml node or do it in code. In both cases you have to retrieve the H3D node handle of all four cameras. If you want different windows you have to create multiple windows with shared opengl contexts. I guess that's not possible with the current GLFW version, maybe GLFW 3.0 supports that. What you can do is using Qt. It does support shared OpenGL contexts. Actually I'm using them myself in the editor, since switching the main view to fullscreen mode did cause some problems I solved by creating an additional shared fullscreen OpenGL context. The only thing you should care about is that it seemed that compiling shaders or uploading textures always have to be done when the first OpenGL context is current. But maybe that was a problem within Qt that has been solved since the first version I used when I created the editor. I haven't done to much research when I stumbled about that problem.



Hi Volker

I treid doing Qt, but when i was about to install Qt from its official web page and while its installation it says that it's not legal to install a spscific component that is required for Qt which i had to install so i just stopped it.

Anyways ! The idea, that I posted earlier of using that tutorial, I got some help from some one about it and i was provided with some code snippets which were actually used to project the game into CAVE. It is nothing other then making four viewers as clients and making 1 server,.
but now using that i have a problem i have to use
Code:
GameEngine::registerComponentOnServer("Player1", "Horde3D");


but i am getting an error that GameEngine has no function named registerComponentOnServer, do you have any idea what can be the problem.

I am trying to use it in the DemoApp of the new SVN provided, do i have to link headers other then including
for example
Code:
#include "GameEngine/GameEngine_Network.h"

do i need to add a reference or link it somewhere ?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group