Hey I've decided to split my time between pythong and pyogre. I'm done with the basic tutorials out my book.I went to donload psyco, and the download link was broken. Is there another place that I can download this from?
Also on that note. If I want to start working at a scene putogether that I can walk arond in, what other tools should i download and start playing with. I have 3ds max7, but I'm under the impression that I need to use ofusion for my maps. What else should i start working at? If you could guys could just give me a shove in the right direction that would be awsome
Ok well I didnt even make it out of the first python tutorial. I was reading the python tutorial and I cut and pasted this code. (below) its supposed to be a sample I guess. When I compiled it it didnt work. I'm curious when I extract the pyogre zip into my python24 folder do i just leave it in the pyoger folder or is the contents of the pyogre folder supposed to be dropped into the python folder?
from pyogre import ogre
if __name__ == '__main__':
ta = TutorialApplication()
Heres the error i got
Traceback (most recent call last):
File "C:\Python24\basic_1.py", line 2, in -toplevel-
ImportError: No module named SampleFramework
Also I tried to run a couple of the demos out of ogredemo folder and
they wouldnt work. If its all the same to you guys I'm ganna keep my questions to this thread so that i'm not spamming the heck out of this forum. I can also start posting in the help forum if that would be a better place to ask simple questions since this section seems less frequented.
By the pyogre.zip folder, I'm assuming you mean pyogre-1.0.6-0.zip. You should only be using this if you intend to compile pyOgre yourself. For windows there are pre-packaged installers for python23 and python24:
- pyogre-188.8.131.52.py23.exe or pyogre-184.108.40.206.py24.exe depending on your version of python
2. Double click on pyogre-220.127.116.11.py2x.exe to install
Double click vcredist_x86.exe to install
You will now have dir structure similar to:
[python-path]\Lib\site-packages\pyogre # ogre dll's \ pyogre & pycegui modules
[python-path]\pyogre\ogre_demos # ogre demos
[python-path]\pyogre\cegui_demos # pycegui demos
[python-path]\pyogre\tutorials # pyogre tutorial
[python-path]\pyogre\tools # pycegui mesh viewer
where python-path is e.g. C:\Python23 or C:\Python24
3. Extract the media demo_media.zip to [python-path]\pyogre
[python-path]\pyogre\media # pyogre media
4. Before running the demos / tutorials, double check that resources.cfg
in each dir points to the media dir:
# Resource locations to be added to the default path
5. If your encountering problems with the DirectX plugin check here:
For the "SampleFramework" error you can't find SampleFramework.py. You should copy that and the *.cfg from [python-path]\pyogre\ogre_demos to the directory your running from. After doing so edit the resources.cfg file to point to your media directory.
Much easier just to create and run your demos from [python-path]\pyogre\ogre_demos until you become familiar with the set up.
For other errors whilst running the demos check the Ogre.log file. It is created in the same dir that you run from.
Also remember your indentaion when writing python code:
from pyogre import ogre
if __name__ == '__main__':
application = TutorialApplication()
except ogre.OgreException, e:
Hey thanks it actaully a little of each. I didnt have the directX stuff installed, and I wasnt saving into the ogre demo folder. Does the pyogre tutorials cover creating/ teaking a *cfg file? I'll do some googling if they dont.
Check the C:\Python24\pyogre\ogre_demos\resources.cfg file. Everything should be setup. All you should need to change, if your running from another directory other than the demos, is the main path in resources.cfg. The path should be relative to your applications dir, e.g
- running from pyogre\ogre_demos ../media
- running from C:\Python24 pyogre/media
The ogre.cfg stores the config info you selected when starting the demos, e.g:
Render System OpenGL Rendering Subsystem
Colour Depth 32
Display Frequency N/A
Full Screen No
Video Mode 640 x 480
Sometimes it get's a bit funny if that is not there.
For the terrain.cfg:
Hey I worked through the beginner tutorials in pyogre, and I have a couple of questions about design ( I can post these out to the content creators if need be)
I was wondering when desining a level say a open room with a box and a cylinder. If i'm not intending to move the items indavidually and they are going to be static would i be better off creating the whole scene (in max7) in one mesh. When exporting my mesh will my max lighing follow w/ the export?
Also I was wondering about setting up a first person view mode where the camera/view followed at a given height off of the terrain. Does the pyogre wiki cover information like this somwhere?
Also I tried dropping a mesh into the folder that had all of the other mesh files, and tried to load it up in ogre and didnt really have any luck so i guess i was curious as to where this information was.
How/where should I begin to research this?
I think if i can get rolling with this i should be off and running for a while.
Thanks your for the help so far.
1. What exporter are you using for max7?. Never used max 7 before. Maybe you should check with content creator.
2. The information is in resources.cfg. This file let's ogre know where your media files are such as meshes, overlays,zips etc. SampleFramwork.py loads the resources.cfg file, stores the locations/paths of your media and initialise the resouces via initialiseAllResourceGroups (i.e. parses scripts such as materials etc).
Check out SampleFramework.py to see how it's done:
Also for more details:
Now when you create an entity/ scenenode Ogre knows what/where 'yourmeshname.mesh' is and any material associated with it (assuming the material script / textures are in your media dir), eg:
node = sceneManager.rootSceneNode.createChildSceneNode()
entity = sceneManager.createEntity('head', 'yourmeshname.mesh')
For your particular problem post the code of how you created your entity/node. Have you copied accross your material scripts and textures to media's dir materials/scripts and textures to materials/textures.
3. The TerrainDemo.py demo shows the camera/view following at a given height off of the terrain using RaySceneQuery.
Awsome. I think i'm just exporting wrong. I am modeling in max 7, and i was trying to export with the tool in the downloads section. It looks like ofusion is the way to go. I was having problems with figuring out how to get textures, lighting etc to show up in the ofusion window erlier. I'll go post around over there adn see what i can come up with. What it comes down to is its a ton of information to take in at once and I have to keep bouncing back and fourth between learning to model, and learning to program. I'm never sure if its my model being weird, or my lack of programin skills.
I was looking at the resources *cfg file and I was wondering what the [bootstrap] means at the top. More out of curiosity than out of needing to know.
If I wanted to create a folder where all of the python code, meshes, media etc was located how would I structure it. When I read from the resources cfg here it just says
If I wanted to say save everything to this directory
Could I get away with just adding the sampleframework.py to this folder along with the cfg file, and then change the resource cfg to mirror where the files are at?
Or is it more technical than that?
Once again Thank you for the help I'm learning a ton.