Help! Quake level without texture

Problems building or running the engine, queries about how to use features etc.
Post Reply
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Help! Quake level without texture

Post by limbo »

Hi eveybody,

I designed a simple level with GTKRadiant, compile it into bsp. When I try to view it in Ogre, what I have is only the model, without texture. I don't know how Ogre search the path of texture, and don't know where to find such information. I can't find help in the API.

What I did is editing quake3settings.cfg, set Pak0Location: and Maps:. Infact, I don't know what should the *.pk3 folder contain, I just zip all the output files from GTKRadiant to it. And I set the "Maps" to the directory of .bsp file. Anything wrong here?

Major part of my program is:

void BspApplication::setupResources(void)
{
// Load Quake3 locations from a file
// Load resource paths from config file
ConfigFile cf; //Ogre::ConfigFile; Class for quickly loading settings from a text file.

cf.load("quake3settings.cfg");

mQuakePk3 = cf.getSetting("Pak0Location");//Gets the first setting from the file with the named key
mQuakeLevel = cf.getSetting("Map");

ExampleApplication::setupResources();//Method which will define the source of resources (other than current folder).
ResourceManager::addCommonArchiveEx(mQuakePk3, "Zip");//Adds an archive to the search path for all resources

}

void BspApplication::chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager(ST_INTERIOR);
}
void BspApplication::createScene(void)
{
// Load world geometry
mSceneMgr->setWorldGeometry(mQuakeLevel);
//mSceneMgr->setWorldGeometry("ogretestmap.bsp");
// modify camera for close work
mCamera->setNearClipDistance(4);
mCamera->setFarClipDistance(4000);

// Also change position, and set Quake-type orientation
// Get random player start point
ViewPoint vp = mSceneMgr->getSuggestedViewpoint(true);
mCamera->setPosition(vp.position);
mCamera->pitch(Degree(90)); // Quake uses X/Y horizon, Z up
mCamera->rotate(vp.orientation);
// Don't yaw along variable axis, causes leaning
mCamera->setFixedYawAxis(true, Vector3::UNIT_Z);

}


I'll appreciate any reply!

limbo
User avatar
Harlequin
Kobold
Posts: 35
Joined: Thu Oct 16, 2003 9:29 pm
Location: Germany
Contact:

Post by Harlequin »

Have a look here http://www.ogre3d.org/phpBB2/viewtopic. ... ght=#50210 perhaps it might help.
team-pantheon programmer
creators of Rastullahs Lockenpracht
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Post by limbo »

Hi Harlequin,

Thank you for reply!

I can't open the link in your post. Could you please give me a new link?

limbo
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Post by limbo »

Harlequin,

I read your replies to others about the similar questions as mine. I just wonder how ogre find the texture files for quake level? "quake3setting.cfg" is used to find .bsp file. Does it also point out the path of texture files? If yes, how? I just don't understand it.

And does "resources.cfg" plays a role in this process? It points out the path to media. Shall I copy texture file to media or its subfolders? But how can ogre know with file is the right textures of this particular level?
I'm really confused.

limbo
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post by haffax »

Harlequin's link works perfectly for me.
Your texture-Directory must be added to resources.cfg, but it must be the top directory of the directory your map accesses the textures. Usually BSP textures are expected in a certain subdirectory relative to your map file, e.g. texutres. So after map compiling the bsp file expects all textures inside this texture directory. So if you have a media directory and inside this media directory resides the textures directory you must only add the media directory to your resources.cfg, not the textures directory under media. I hope I didn't express myself to confusing. I usually tend to. ;)
team-pantheon programmer
creators of Rastullahs Lockenpracht
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Post by limbo »

Tanis,

Thanks! I edited resources.cfg and my level has texture now! So excited! :D
Post Reply