DotSceneOctree Source & Tutorial Now Available

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

DotSceneOctree Source & Tutorial Now Available

Post by Proton » Thu Nov 20, 2003 1:27 am

I haven't been able to add it to the ogreaddons section of the cvs yet. Until I get it figured out here is the source code. (just extract it to your 'ogreaddons' folder)
*EDIT* Newest files are available from the ogreaddons section of the CVS *EDIT*

And here is a tutorial (with sample data) on how to use this version of the dotsceneoctree compiler / scenemanager plugin.
http://www.icetecstudios.com/public/OgreTest/Tutorial/

Keep in mind that it is still a work in progress....

Let me know if you run into any problems.
Last edited by Proton on Mon Nov 24, 2003 3:18 am, edited 1 time in total.
0 x
-Proton

trekker
Gnoblar
Posts: 3
Joined: Tue Oct 29, 2002 5:28 am
Location: Dallas, TX
Contact:

Post by trekker » Thu Nov 20, 2003 2:01 am

Thank You! :D
0 x

User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
Contact:

Post by psyclonist » Thu Nov 20, 2003 4:12 am

Great news!
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Thu Nov 20, 2003 7:36 am

Very much appreciated. This is great for those of us trying to catch up a little to you guys. Thanks for the time you spent explaining. I just opened up the page but I need time to work through it.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Thu Nov 20, 2003 2:36 pm

Nice work mate, much appreciated! I need to set aside some time to play with all the great stuff you guys are doing in ogreaddons... :)
0 x

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Fri Nov 21, 2003 1:25 am

Thanks to Sinbad's help, the dotsceneoctree code is now in the ogreaddons section of the CVS :D .
0 x
-Proton

Guest

'ST_DOT_SCENE'

Post by Guest » Fri Nov 21, 2003 4:36 pm

I seem to be missing a needed def, I'm using Ogre .12.1 source, any help?
D:\ogrenew\dotsceneoctree\PlugIns\DotSceneManager\src\DotSceneManagerDLL.cpp(14) : error C2065: 'ST_DOT_SCENE' : undeclared identifier
Error executing cl.exe.

Thanks
0 x

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Fri Nov 21, 2003 8:44 pm

You are right I forgot a step :oops:

You need add that definition to the list of available scenemanagers in Ogre itself.

I will add that piece to the tutorial when I get home. For now:

From the main Ogre Project open up the file:
OgreSceneManagerEnumerator.h

You will see the following scenemanagers are already defined:

Code: Select all

enum SceneType
{
         ST_GENERIC,
         ST_EXTERIOR_CLOSE,
         ST_EXTERIOR_FAR,
         ST_INTERIOR
};
Just add the definition for the DOT_SCENE scenemanager to this list so that the file looks more like this:

Code: Select all

enum SceneType
{
         ST_GENERIC,
         ST_EXTERIOR_CLOSE,
         ST_EXTERIOR_FAR,
         ST_INTERIOR,
         ST_DOT_SCENE
};
I am not sure if this is the best way to do it, it means you need to recompile everything (including OgreMain). But it works :)

Let me know if you run into any other problems.
0 x
-Proton

Guest

Additional Change

Post by Guest » Sat Nov 22, 2003 4:07 am

Thank's Proton, you set me in the right direction, I also had add a change to SceneManagerEnumerator.cpp and a "Winter-Skybox" material is needed to run the demo without changes.

SceneManagerEnumerator::SceneManagerEnumerator()
{
// Create default manager
mDefaultManager = new SceneManager();

// All scene types defaulted to begin with (plugins may alter this)
setSceneManager(ST_GENERIC, mDefaultManager);
setSceneManager(ST_EXTERIOR_FAR, mDefaultManager);
setSceneManager(ST_EXTERIOR_CLOSE, mDefaultManager);
setSceneManager(ST_INTERIOR, mDefaultManager);
setSceneManager(ST_DOT_SCENE, mDefaultManager); // ADD FOR DOTSCENE
}
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Sun Nov 23, 2003 8:04 pm

I have been trying to get the example to work.

On line 244 of sceneoctre:
if( NewMaterial->addTextureLayer( MatTexStr ) == NULL){
I get this error:
error C2039: 'addTextureLayer' : is not a member of 'Material'
and indeed it does not appear as a member of ogre::material
0 x

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Mon Nov 24, 2003 3:16 am

Just noticed that myself. There was also another problem with the renderable virtual functions.

I updated the code, the most recent version should be in the CVS (assuming I updated it correctly).

Try downloading the newest version and let me know if you run into any problems.
0 x
-Proton

sicman the spiffy
Gnoblar
Posts: 5
Joined: Fri Oct 17, 2003 3:04 am
Contact:

Post by sicman the spiffy » Mon Nov 24, 2003 5:40 am

[edit] dumb question
Last edited by sicman the spiffy on Mon Nov 24, 2003 6:52 am, edited 1 time in total.
0 x
------------------------
Signature Goes Here

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Mon Nov 24, 2003 6:30 am

Just noticed that myself. There was also another problem with the renderable virtual functions.
Part of my challenge is that I tried creating a new project in VC++ 6 (i prefer ide to 2003). I cannot get the 3 projects to build.

For example the demo_dotscene i created has unresolved external symbol DotSceneManager::addWorldGeometry

And the plugin dll still has errors like:
C2259: 'SceneOctreeRenderable' : cannot instantiate abstract class due to following members:

Does it work for others using latest cvs of ogre and addons?
0 x

sicman the spiffy
Gnoblar
Posts: 5
Joined: Fri Oct 17, 2003 3:04 am
Contact:

Post by sicman the spiffy » Mon Nov 24, 2003 6:58 am

slicky, let me know how tha goes. i attempted to make a VC 6.0 project file for it was well, and i havent been able to build any of it :/ i even have a vc 7.0 project file converter, but it requires the .sln file. if proton could send me the .sln file i can easily convert it, that shoudl solve most of our poblems
0 x
------------------------
Signature Goes Here

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Tue Nov 25, 2003 2:31 am

Slicky, those errors you mention are the ones that I got rid of.

The problem seems to be versions in the CVS.
I checked out the ogreaddons as anonymous, and got a copy that gave the errors you mentioned.
Then I checked out the same ogreaddons using my sourceforge username and I got the new copy which compiled correctly.

I could tell it was the new copy by looking at dotsceneoctree /PlugIns/DotSceneManager/include/SceneOctreeRenderable.h

The declaration for getWorldTransforms should end with a const like this:

Code: Select all

virtual void getWorldTransforms( Matrix4* xform ) const;
I am going to start including some type of version label in future releases.

Until then I am not sure how you would get the most recent version without a sourceforge account. I am checking into it.

Also, in theory there should be no difference in compiling on VC6 or VC7.
0 x
-Proton

User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ » Tue Nov 25, 2003 3:11 am

The anonymous CVS server is generally 24 hours behind the developer CVS server.
0 x

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Tue Nov 25, 2003 3:28 am

Thanks _mental_ :)

So it should be syncing up within the next few hours, by tomarrow for sure.
0 x
-Proton

sicman the spiffy
Gnoblar
Posts: 5
Joined: Fri Oct 17, 2003 3:04 am
Contact:

Post by sicman the spiffy » Tue Nov 25, 2003 4:53 am

vc 6 and vc 7 are very different.. at least in the way they save their project files. VC 7 can open and use VC 6's, but VC 6 cannot open VC 7. you have to use a project converter for it, but it only converts the .SLN files, not the .vcproj files. anyone happen to make it work with VC 6?
0 x
------------------------
Signature Goes Here

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Tue Nov 25, 2003 6:17 am

Still trying to get it working on VC6++. I am trying to first get the dll to work. Here are my current errors:
--------------------Configuration: Plugin_Dotscene - Win32 Debug--------------------
Linking...
Creating library Debug/Plugin_Dotscene.lib and object Debug/Plugin_Dotscene.exp
LINK : warning LNK4049: locally defined symbol ""public: __thiscall Ogre::DotSceneManager::DotSceneManager(void)" (??0DotSceneManager@Ogre@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall Ogre::DotSceneManager::~DotSceneManager(void)" (??1DotSceneManager@Ogre@@UAE@XZ)" imported
DotSceneManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const Ogre::DotSceneManager::`vftable'" (__imp_??_7DotSceneManager@Ogre@@6B@)
Debug/Plugin_Dotscene.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Plugin_Dotscene.dll - 2 error(s), 2 warning(s)
0 x

sicman the spiffy
Gnoblar
Posts: 5
Joined: Fri Oct 17, 2003 3:04 am
Contact:

Post by sicman the spiffy » Tue Nov 25, 2003 7:30 am

nope, i get a lot of other errors too. im curious why no one includes either DSW or SLN files with their projects, as i would love to help solve these sorts of problems by converting the VC 7 projects to VC 6.
0 x
------------------------
Signature Goes Here

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Tue Nov 25, 2003 3:23 pm

You are right those linker errors are caused by differences in the project files.

I didn't upload a sln file since I just added the vcproj files to the main ogre sln. I will create and upload a solution file for just this addon when I get home. Since CVS takes a while to sync up, I will also post it for download off the web.
0 x
-Proton

User avatar
Proton
Halfling
Posts: 41
Joined: Tue Apr 22, 2003 2:34 am
Location: Alberta, Canada
Contact:

Post by Proton » Wed Nov 26, 2003 2:45 am

I just uploaded a .sln file to the root of ogreaddons/dotsceneoctree in the CVS.

Until that becomes available you can download from here (Right-click save as):
http://www.icetecstudios.com/public/Ogr ... ution1.sln

sicman, if you do convert the sln file to a VC6 compatible format I would appreciate if you could email it to me so I could add it to the CVS.
doug@IceTecStudios.com

Hope this helps. If not just let me know. :wink:
0 x
-Proton

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Wed Nov 26, 2003 4:47 am

I finally just got it to work under VC6. I have the 3 projects that I will email now to Proton that will hopefully help others. I spent a lot of time trying to get this to work. I think a lot of the time was with cvs sync issues. Even today I had to sync ogre again before it would build with no errors.
0 x

sicman the spiffy
Gnoblar
Posts: 5
Joined: Fri Oct 17, 2003 3:04 am
Contact:

Post by sicman the spiffy » Wed Nov 26, 2003 8:04 am

that was close.. i think you had 3 projects in that solution file? problem with that is it looks for the 3 seperate project workspaces... for the DSP files (VC7's vcproj files). i need the .SLN files for each seperate project... Plugin_octree, demo_ , and whatever the third thing is, since making a SLN file of 3 projects just references the other 3 SLN files :? damn Microshaft and its inability to be backwards compatible


im glad to see slicky got it workign at least :) sorry i wasnt much of a help
0 x
------------------------
Signature Goes Here

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Wed Nov 26, 2003 8:46 am

Proton got my files and should add a link. I don't have absolute paths etc (I think) so it should be not too hard to get it to work. The 3 dsp's I sent go in the same folders as the existing vc7 proj's (for consistency). You can also create a blank workspace and pull them all in.

Thanks for the work on this plugin Proton. I have a long way to go to learn how to pull all of Ogre together. I was able to create a few basic meshes and export them and convert into a new scene files. I got them to display replacing the testscene (the lights remain since they were separate).

I have to find out how to export multiple meshes instead of one at a time (if possible). Also, I haven't got any materials to appear yet. I need to read how to get that data in there.
0 x

Post Reply