simple help

capture

26-11-2005 12:59:58

ok i am new to this add-on. the first problem i am having is in the code for the program because i am making the program in the same directory as the sample, so all the files are the same. Then i use the code
mSceneMgr = mRoot->getSceneManager( ST_EXTERIOR_REAL_FAR );
mSceneMgr->setWorldGeometry( Ogre::String("paginglandscape2.cfg") );

should that be enough to put up the first terrain and make it seeable because when i use it i get a black terrain with no texture it seems.
If this isnt enough code and there is some thing else needed to display the terrain can someone post that code

Captain_Deathbeard

26-11-2005 22:05:20

That is all the code you need, but you will need to play around with the texture settings. I'm having similar problems.

capture

26-11-2005 22:50:57

how come it works in the sample though and what file is the texture settings in

Captain_Deathbeard

27-11-2005 21:13:04

I don't know actually, thats a point. I'm new to this too.
You will find the texture settings in the terrains .cfg file

CrxGames

28-11-2005 00:48:05

I fixed this by using:
VertexProgramMorph=no
and
TextureFormat=SplattingShader

tuan kuranes

28-11-2005 15:43:49

Only need is to have access to the texture map files.
Are you using same resources.cfg that demo uses ?

SplattingShader is a texturemode that can create the texture on the fly ()
so that's why it works. (splatting and basetexture should work too)

Check Ogre.log for missing textures files or so.

dedesite

14-03-2006 20:58:04

Hi,

I'm using all cfg file that use the demo and the terrain is black with my application.

I put a light as the demo and it doesn't change.
CrxGames, you say that your fix your probleme with :

VertexProgramMorph=no
and
TextureFormat=SplattingShader


But where did you put this lines, in the paginlandscape2.cfg??

Because I tried and it doesn't work. I don't understand why so if anybody know?

tuan kuranes

15-03-2006 08:38:39

paginlandscape2.cfg is map lister config file.
terrains config files are in media/paginglandscape2/terrains/
Try changing terrain default map in paginglandscape2.cfg

dedesite

16-03-2006 12:30:04

I don't understand why should I change something in paginglandscape2.cfg whereas all the media I use are the same as the Demo and my .exe are in the same directory. Why the demo works perfectly and not my App?


I know that I'm litte newb in OGRE and PLSM2 but I really don't understand.


However, thanks four your repply ;)

tuan kuranes

16-03-2006 12:45:09

Why the demo works perfectly and not my App?

You'll have to dig trough your code and compare to demo to find out that.

try calling
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
or
ResourceGroupManager::getSingleton().initialiseResourceGroup("PLSM2");

and see what it gives ?

dedesite

16-03-2006 13:03:31

I try to call this two function in my createScene function and it has done nothing... But I see I the API that all the ressources load by this functions must be load after that. But I just load mSceneMgr ->setWorldGeometry( "kosslynlandscape.cfg" ); for the terrain.

I've compare my code to the demo code (just the PaginLandScape.h) and it's almost the same one. I just didn't have create my camera in the same way and I didn't make a viewport.

I found tha in my App, under the terrain, there is au big (min 20X bigger than my terrain) plan in black too. Can it be the texture of my map?

Other things that I don't understand :
- what's is "srand (0);"?

- what do the createGrassMesh() method?

tuan kuranes

16-03-2006 13:39:42

kosslynlandscape.cfg is a paginglandscape2.cfg like, not a terrain.cfg like ?

resources loading should be automatic. was just a stab in the dark.

big plane in black may be just void if you're using a skybox...

srand (0); is random table initialisation. used afterwards in some tree placements.

createGrassMesh() sed afterwards in some grass placements.

What says OGRE.LOG ? no error nor warnings ?

dedesite

16-03-2006 13:50:15

kosslynlandscape.cfg is a paginglandscape2.cfg like, not a terrain.cfg like ?

kosslynlandscape.cfg is exactly the same file as paginglandscape2.cfg

big plane in black may be just void if you're using a skybox...

I'm using a skybox..

srand (0); is random table initialisation. used afterwards in some tree placements.

createGrassMesh() sed afterwards in some grass placements.


OK, but I can't see any grass or tree on the demo, is it normal?


What says OGRE.LOG ? no error nor warnings ?

No problem with the OGRE.LOG.

I will try to put exctally the same code as the PaggingLandScape.h and I'll you if it works. I'm sure that is a stupid mistake, I'm the king of this kind of things...

Thanks for your help.

[EDIT] : Oh I didn't precise that I use CEGUI.

tuan kuranes

16-03-2006 13:53:30

OK, but I can't see any grass or tree on the demo, is it normal?
disabled in terrainlistener.h as it's more testing things than demonstrating vegetation.

dedesite

16-03-2006 14:30:17

I try to with the same code as PaggingLandScape.h and just have the blue sky...

I just modify the code to be compatible with my FrameListener which use CEGUI, so I put a CEGUI renderer. Is it possible that the problem come from CEGUI? Or can it come from my FrameListener which is as ExampleFrameListener? To have a simple application, am I oblige to have a terrainListener?

[EDIT] I try without CEGUI and I have the same blue Sky. So the problem doesn't comme from CEGUI and doesn't come from my Application header, so the problem come from my frameListener...