Page 1 of 1

Interacting with terrains? (or paged terrains)

Posted: Fri Feb 25, 2005 9:29 pm
by epchristi
Can someone please give me a general overview (or point me in the direction to look) on how to interact with terrains?

For instance:
1. Draw grid-lines over a given terrain
2. Place objects correctly in a terrain
3. Mouse interactions with objects in the terrain

I looked at the terrain sample application, and I can get it to work. But everytime I try to do something with it .. (like creating objects, etc.) I lose everything including the terrain.

Also.. with the terrain sample application and tutorial.. I don't see how I could create a terrain with multiple textures easily. Do I need to use one of the tools like FreeWorld to create my own terrain and "texture map" to go along with it? It would be nice to automatically generate terrains and their corresponding heightmaps and texture maps.

Lastly, are there any sample applications/games available? Is there a repository of small games that show "all the pieces working together"?

Thanks for any help.. I have very new and just working through the tutorials right now.

Posted: Fri Feb 25, 2005 9:52 pm
by Tommy
Have a look at Clay's great intermediate tutorials in the Wiki. I think he covers all your topics there.

hth
Tommy

Re: Interacting with terrains? (or paged terrains)

Posted: Fri Feb 25, 2005 10:04 pm
by Baldrake
epchristi wrote:Also.. with the terrain sample application and tutorial.. I don't see how I could create a terrain with multiple textures easily. Do I need to use one of the tools like FreeWorld to create my own terrain and "texture map" to go along with it? It would be nice to automatically generate terrains and their corresponding heightmaps and texture maps.
The great thing about hanging around here is that I only know one or two things, but I get to keep saying them again and again. It makes me feel erudite. ;)

The terrain scene manager does not allow you to easily do multiple textures on a single terrain, but it is possible using a vertex shader inside a custom material. (This is called splatting - you start with a single base texture and "splat" other textures on at your desired locations.) The paging landscape scene manager does support splatting. The differences between these two are written up here.

Posted: Fri Feb 25, 2005 10:06 pm
by epchristi
I looked at these .. did you have one in mind specifically. It could be because I am too new to the architecture at this point. None of them showed me how to basically setup and interact with the terrain. (that I could see.) I will keep reading. Perhaps I started off using the Terrain sample code and it doesn't really do what I am looking for and I tried modifying it. I noticed it doesn't use the scene manager I should likely be using, as I read about those this afternoon.

And now I just read the second reply.. and yes.. I was starting to come to the conclusing I couldn't use the scene manager I was. Thanks for the pointer.

It would be nice if someone out there had a sample "move a guy around a terrain" example. :) Perhaps I need to be the one to do that, if I can piece all this stuff together. :)

Posted: Fri Feb 25, 2005 10:14 pm
by Baldrake
Xorekis' tutorial has a simple "fly a guy around a terrain" example" which might help...

Posted: Fri Feb 25, 2005 10:24 pm
by Lucky_Luciano
I learned a lot from these two marvellous tutorials made by Clay.
- RaySceneQueries and Basic Mouse Usage
- Mouse Picking (3D Object Selection) and SceneQuery Masks

Posted: Sun Feb 27, 2005 9:18 pm
by sywave
hi,
I try the second cley culver's tutorial but there is a little problem... with the version 1.0 of ogre, the file ogrerenderer.h is missing... I try to copy the folder from the old version ^^ but it's not working...
so i searched tutorial to learn how to place, select item on terrain... have you an idea where i can find this ?

Posted: Sun Feb 27, 2005 11:00 pm
by neocryptek
The CEGUI Ogre renderer has been moved to 'ogrenew\Samples\Common\CEGUIRenderer' as of v1.0 final.

-N30

Posted: Sun Feb 27, 2005 11:19 pm
by sywave
oh thx a lot ! the name of the calss has changed too ! that's why i didn't find it