How to run Xorekis' Tutorials with Ogre 0.15.1

Problems building or running the engine, queries about how to use features etc.
Baldrake
Halfling
Posts: 63
Joined: Tue Apr 13, 2004 1:09 am

How to run Xorekis' Tutorials with Ogre 0.15.1

Post by Baldrake »

Xorekis' tutorials are an excellent place to start when getting familiar with Ogre. However, they appear to have been written for an earlier version of Ogre. Here I run through a set of deltas that you can make to Xorekis' tutorials to make them compatible with Ogre 0.15.1 and Visual Studio .Net 2003. I don't myself know enough about Ogre (yet) to know if these are the best solutions to updating the tutorials, but they do work, so I hope they are of use to others.

TUTORIAL PACK 1

Tutorial 1:
  • (Page 4) After completing the other steps of tutorial 1, open the file C:\OgreTutorials\bin\debug\ogre.cfg in a text editor, and change the option "Full Screen" to have the value "No". This wil make it easier to debug programs.
Tutorial 3 (Page 7):
  • (Visual Studio .Net 2003) The appropriate "C/C++" tab will not appear until you have entered some C++ code. You can achieve this simply by doing Tutorial 4 before Tutorial 3.
  • (Visual Studio .Net 2003) The most important thing to do is to set "C/C++|Code Generation|Enable C++ Exceptions" to "No". If this is left as the default "Yes", Ogre's exceptions will replaced by generic unknown exceptions, making debugging very challenging.
  • (Visual Studio .Net 2003) The given paths should be "../../OgreNew/OgreMain/Include;../../Common", and so forth, adding an extra ".." before all paths to OgreNew in the rest of the tutorial
TUTORIAL PACK 2

Tutorial 7:
  • (Page 7) Do not follow the instructions for creating the "terrain.cfg" file. The specified file contents are not correct, and will cause ogre to raise exceptions. If you followed the instructions in Tutorial 1, you will already have a terrain.cfg file, and this one will be adequate for the tutorial.
  • (Page 8) Disregard the instructions to modify the ScaleX/Y/Z values in Terrain.cfg. These attributes are no longer used. Your running program will not look like the graphic in the tutorial; don't worry, you will fix this in Tutorial 8.
Tutorial 8:
  • (Page 10) Change the call to "attachCamera(mCamera)" to "attachNode(mCamera)".
  • (Page 11) In the call to "setPosition(Vector3(4000,500,4000))", the value "Vector3(750,200,300)" will give better results.
  • (Page 15) Note that your output has a black band in first-person mode, and so does the screen shot on this page.
Tutorial 9:
  • (Page 18) The code at the top of this page is missing the declaration "float rotX; float rotY;"
  • (Page 19) The calls to "roll", "pitch" and "yaw" require Radian parameters, not Real's. Fix this with, for example, "mControlNode->roll (Radian (Degree (mfRoll * evt.timeSinceLastFrame)));".
  • (Page 19) Similarly, change the first argument in the assignments to qRoll to "Radian (Math::AngleUnitsToRadians(mfShipRoll))". Perform the analogous modification to the assignment to qPitch.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

This is great work, nice one fella!

I've not looked at it in detail, but in the last two points, you should be able to simplify those calls. If mfShipRoll and mfRoll are measured in degrees then you should just be able to pass them to things like "roll" as Degree(mfRoll). Likewise if you're measuring them in radians you can just do Radian(mfShipRoll).

Although methods like Node::roll take Radians as a parameter, there are implicit conversions available that will be used if you try to pass a Degree value, so there's no need to explicitly convert it.

Maybe tutorials like this would benefit from being converted onto the Wiki, so that anyone can make any fixes the find are required?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

I agree, I'd welcome someone making Wiki pages of the existing tutorials - any volunteers?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

Yes. I'll do it. Had been on my list anyway. Besides, I think i would be useful to make a build FAQ inside the wiki. I've already made a list with common problems. Sometime this week it will be done.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

You absolute star!
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

The first tutorial pack has been converted: http://ogrewiki.digitalsentience.com/in ... _Tutorials. The second pack will be added later this week.

I'll look them through tomorrow whether I find some errors and to improve the layout.

The more eyes look on it the better. (hint, hint) 8)

I also started the BuildFAQ sections: http://ogrewiki.digitalsentience.com/index.php/BuildFAQ. There are many more questions that are repeatedly asked. If you know one add it please.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

Thanks tanis :)
User avatar
Mindslaver
Gnoblar
Posts: 21
Joined: Sun Dec 12, 2004 5:53 pm
Location: United States

Post by Mindslaver »

For tutorial 8, I think it is supposed to be attachObject(mCamera), not attachNode(mCamera).
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

That's true, mindslaver. I have not yet applied those proposed changes. When I do, I'll revise the changes and the text. Sometime next week probably. Btw: I have converted the second tutorial pack too, yesterday. So it is complete now.
team-pantheon programmer
creators of Rastullahs Lockenpracht