Horde3D

Next-Generation Graphics Engine
It is currently 08.11.2024, 23:57

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: 01.08.2012, 05:41 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
I have SVN of the game engine and I created a 3D environment in the horde3D editor. An xml was generated where I see all the objects attached with
their parameters (position, scale, rotate objects etc in case of lights fov radius also ).

Now these were the parameters that I set in horde3d editor. (I use .exe downloaded from
here http://www.informatik.uni-augsburg.de/en/chairs/hcm/projects/horde3d_sceneeditor/ )

1. Now the problem is, I don't know why i can't tune the parameters of lights when i am compiling the solution of game engine (where i integrated the xml obtained from horde3d scene editor) for example if i want to decrease the lights or tune radius or fov from svn (through generated xml) then I can't tune here, i will have to open my scene again in horde3d Scene editor and then edit the scene and then tune parameters and then again integrate that xml with game engine svn.

2. Same is the case with adding an object if I want to add more and more (already given ) wooden crates in the svn i can add
but if for example I want to add a extra wall in the svn i can not add.

Is it possible that i can add a wall and tune light parameters?


Top
 Profile  
Reply with quote  
PostPosted: 01.08.2012, 06:05 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
The editor only manipulates the XML(not sure why you sometimes mentioned svn) files and uses the public API of Horde3D. So if you want to edit the scene directly within a text editor or using the h3d Api functions from within your game code, there is no reason why that shouldn't be possible. BTW. the EXE you downloaded is very much out of date probably. You should do a fresh checkout from SVN and compile it yourself.


Top
 Profile  
Reply with quote  
PostPosted: 01.08.2012, 07:43 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
The editor only manipulates the XML(not sure why you sometimes mentioned svn) files and uses the public API of Horde3D.

1. a. svN for game engine code
b. horde3d editor downloaded as an exe. i mean i didnt compile the project of horde3d editor.

Quote:
So if you want to edit the scene directly within a text editor or using the h3d Api functions from within your game code, there is no reason why that shouldn't be possible.

2. Yes i am also sure that it must be possible but I don't know Why? Even if I delete my added lights it doesn't effect the light effects in the environment.
if i am adding an existing wall as xml e.g

Code:
<Reference tx="-125" sx="50" ty="46" sy="50" rx="0" tz="-185" sz="50" sceneGraph="models/FrontWallLab1.scene.xml" ry="90" rz="0" name="Obstacle" >
    <Attachment type="GameEngine" name="Obstacle" >
    </Attachment>
  </Reference>


Here i am just trying to refer a wall as an obstacle at a specific position . I am giving it a position exactly the same where my wooden box is present but of big size
but i can't see it. i don't even get a message while loading all scene files that if it is loading this file.

I am doing this because of the reason that wooden box is acting abit weird when i am using it as an obstacle infact as i was discussing with u about h3dGetCastRayResult
function here, http://www.horde3d.org/forums/viewtopic.php?f=2&t=1691 for the sake of finding obstacle or wooden box on the way.

so after that i was successful in following that procedure and getting the parent node and i could find transformation using that handle.
I was comparing the moving agents transformation with the object obtained from h3dGetCastRayResult and it was returning me distance to that object
and based on that distance i was setting a threshold to make a decision but i dun know why agent keeps walking into the half wooden crate and then suddenly realises that threshold is over. even if i m setting higher threshold still it didnt work.
But when i was finding distance to objects that i created by myself in horde3d editor, so it was working fine and was realising obstacle at a threshold perfectly so i decided to change wooden box with an wall as obstacle so that may be it works. but i can't add this wall through svn code i dun know why?
i just want to refer a wall at a position with a size. Adding deleteing Lights and objects both are not working in SVN code

Quote:
BTW. the EXE you downloaded is very much out of date probably. You should do a fresh checkout from SVN and compile it yourself.

3. Yes i used that copy long ago for creating 3D scene but now i only want to edit it but still i am trying to download it to use it for myself
and on compilation i am getting some errors . but i dun want to bother for removing those errors as i can download the latest exe if it is available somewhere?
is it available like previous version?


Top
 Profile  
Reply with quote  
PostPosted: 01.08.2012, 08:40 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
How are you trying to remove lights?


Top
 Profile  
Reply with quote  
PostPosted: 03.08.2012, 04:19 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
How are you trying to remove lights?


simply deleting lines from xml for example

Code:
<Light sy="0.302143" lightingContext="LIGHTING" sz="0.302143" col_B="1" name="Light" col_G="1" tx="502.981" ty="370.438" shadowContext="SHADOWMAP" tz="42.1894" shadowMapBias="0.005" rx="-90" ry="0" shadowMapCount="1" rz="-90" col_R="1" radius="1000" fov="90" shadowSplitLambda="0" sx="0.302143" />


Top
 Profile  
Reply with quote  
PostPosted: 03.08.2012, 05:47 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
So you deleted the lines and have reloaded the whole scene and the lights are still there? Are you sure you're working on the right files? Or did you thought the lights will be removed if you change the xml file without reloading the scene? Thats something not implemented in the GameEngine. It does not use any filewatchers for instant reloading.


Top
 Profile  
Reply with quote  
PostPosted: 03.08.2012, 10:14 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
So you deleted the lines and have reloaded the whole scene and the lights are still there? Are you sure you're working on the right files? Or did you thought the lights will be removed if you change the xml file without reloading the scene? Thats something not implemented in the GameEngine. It does not use any filewatchers for instant reloading.


yes i was reloading it but may be i should have removed all lights and then checked but yes as soon as i removed all lights it started working.

Secondly i can add the object also the problem was that i was adding wall object with the coordinates of wooden box while xml that i
got from horde3D scene editor has its own coordinate and other values as scaling etc etc secondly i had to add it with the reference of the same
platform also which incase of wooden box and other agents is not necessary.

Anyways Even whn i am using this constructed wall i don't know why it goes half into the wall and then takes a decision
may be i should use bounding box values which will be more better.

Second and most important as far as i remember once you suggested me using QT for rendering multiple windows.

Atlast I decided to take a chance with QT so how can i integrate it with this game engine and start using the application that i created there.

Thanks Regards Imran


Top
 Profile  
Reply with quote  
PostPosted: 03.08.2012, 11:11 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You can have multiple GL shared contexts that can be used to render different views of the same scene. The GameEngine and Horde3D instance exist only once independent of the number of shared GL contexts.


Top
 Profile  
Reply with quote  
PostPosted: 04.08.2012, 03:10 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
You can have multiple GL shared contexts that can be used to render different views of the same scene. The GameEngine and Horde3D instance exist only once independent of the number of shared GL contexts.


If I didn't get you wrong, you mean multiple GL shared contexts that can be used to render different views of the same scene can not be done by Horde3D game engine.

so as you suggested me earlier that i shall use QT to create such views. Now i have a small program in QT-Creator, through which i am creating 4 windows and in those windows i want to show the different views of the same scene. how can i integrate that small application from QT to horde3D game engine?

If I didn't get you correctly can you kindly explain a little bit more, if you meant it is possible doing it some other way without QT?


Top
 Profile  
Reply with quote  
PostPosted: 04.08.2012, 07:26 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
The windows are never created by the GameEngine or Horde itself, so the creation of OpenGL contexts are always done through other libraries. You can use Qt for it but also can do it with the native plattform API you're using. But that's more complicated probably. Maybe GLFW or SDL have also APIs for creating multiple shared contexts.

The integration of the GameEngine and Horde3D is done the same way as if you're using only a single window. The only difference is that you have to call the rendering function multiple times (for each window once) and switch the current context (e.g. by calling wglMakeCurrent if you're using native Windows API) between the calls.


Top
 Profile  
Reply with quote  
PostPosted: 04.08.2012, 09:47 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
The windows are never created by the GameEngine or Horde itself, so the creation of OpenGL contexts are always done through other libraries. You can use Qt for it but also can do it with the native plattform API you're using. But that's more complicated probably. Maybe GLFW or SDL have also APIs for creating multiple shared contexts.

The integration of the GameEngine and Horde3D is done the same way as if you're using only a single window. The only difference is that you have to call the rendering function multiple times (for each window once) and switch the current context (e.g. by calling wglMakeCurrent if you're using native Windows API) between the calls.


GLFW has the latest version 2.7.6 http://www.glfw.org/ which doesn't support multiple windows, glfw 3.0 will support that but that hasn't been released yet

I used Qt fro creating multiple windows and i am successful in it, but i don't know how can I integrate QT with Horde3D Game Engine ?

in simple words how can i use that simple application in Horde3d game engine code?

do you have any idea?


Top
 Profile  
Reply with quote  
PostPosted: 04.08.2012, 10:16 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
There is a not very up-to-date entry in the wiki about using Horde3D with Qt4 and a working sample in the community branch:

http://hcm-lab.de/public/Horde3D/trunk/ ... orde3D_Qt/


Top
 Profile  
Reply with quote  
PostPosted: 05.08.2012, 11:58 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
There is a not very up-to-date entry in the wiki about using Horde3D with Qt4 and a working sample in the community branch:

http://hcm-lab.de/public/Horde3D/trunk/ ... orde3D_Qt/


That's what i want,.

If i am not wrong this is integrated with Horde3d and not with game engine code?
how can i make Glwidget.h accessible in game engine code?


Top
 Profile  
Reply with quote  
PostPosted: 05.08.2012, 16:52 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You can intgrate the code you want whereever you want. Include the header files and start coding.


Top
 Profile  
Reply with quote  
PostPosted: 09.08.2012, 05:02 
Offline

Joined: 09.02.2011, 17:02
Posts: 83
Volker wrote:
There is a not very up-to-date entry in the wiki about using Horde3D with Qt4 and a working sample in the community branch:

http://hcm-lab.de/public/Horde3D/trunk/ ... orde3D_Qt/

Hi Volker i started using the version that you suggested me to use, I downloaded and for testing i wanted to add
Code:
#include"GL\GLWidget.h"
GLWidget w;

{for example i wanted to make GlWidget object in the definition of render() function} and start using it to create a window but
there are certain errors that i was suggested by programming forums that these questions can be answered only by the people who
regularly use game engine. when i added GLWidget w; in my code i added headers so i was asked to add some headers from QTcreator application
that I already installed separately, For example in Project->properties->configuration properties->VC++ ->Include Directories I have following links
Code:
C:\Program Files (x86)\OpenAL 1.1 SDK\include;C:\QtSDK\Simulator\Qt\mingw\include\QtOpenGL;C:\QtSDK\Simulator\Qt\mingw\include;C:\QtSDK\Simulator\Qt\mingw\include\QtCore;D:\Thesis Documents\Final Version SVN Code WorkSpace\WorkspaceHorde3D\Tools\GameEngine\include\Horde3D;$(IncludePath)

Because I need reference to these files anyways my errors are removed related to include files that i added as i showed you above
My another important point is , In my Project->properties->Linker->Input->Additional Dependencies I have following
Code:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;opengl32.lib;OpenGL32.lib;Horde3D_vc8.lib;Horde3DUtils_vc8.lib;ws2_32.lib;sapi.lib;QtOpenGL.lib;QtCore.lib;QtGui.lib;horde3D.lib;%(AdditionalDependencies)

Now after this when i am compiling my program i am getting these following errors
Code:
Error 1 error C2370: 'H3DRootNode' : redefinition; different storage class
Error 2 error C2011: 'H3DOptions' : 'struct' type redefinition
Error 3 error C2011: 'H3DStats' : 'struct' type redefinition
Error 24 error C2065: 'List' : undeclared identifier   
Error 25 error C2146: syntax error : missing ')' before identifier 'param'
52 IntelliSense: more than one instance of overloaded function "h3dGetOption" has 'C' linkage

There are total 53 errors and. Errors 3 to 24 are of the same type i.e " 'struct' type redefinition " and most errors among 1 to 53 are of same type.
[Just like the mentioned errors]. I suppose that may be because of unintentional adding of two different versions of horde3d files these errors are
coming up. but i really don't know how can i solve this problem.

Because I suppose For QT may be files have been modified and that's why it says that these files are redefined etc etc if yes how will i solve it?


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 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