two questions: Physics and Landscapes

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
jAyTeA
Posts: 36
Joined: Wed Sep 06, 2006 7:50 am
Location: Hattorf am Harz, Germany

two questions: Physics and Landscapes

Post by jAyTeA »

Hello everybody,

i have two questions. The first one could be a little bit newbish.
I have a big terrain with the CLMTerrainSceneNode (about 100km²)
Now I want to have a more detailed Colormap for it. At the moment im using a 2048x2048 texture, but when i use a bigger one (4096x4096), the terrain is just white with the detailmap on it.
Now i want to know if its possible to use bigger colormaps without splitting the terrain in several pieces, because then i have to change a hell lot of classes. :(

The second question is about physics. Im using the irrlicht collision-response-animators at the moment, but i want to change to a real physics-engine. My problem is, that i don't want to integrate the terrain in the physicengine to save a lot of processing time. Is there a physics-engine, with which i can use the terrains height-animator? I have tried it with newton, but it didn't work for me.

Thanks in advance for any help!
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

At the moment im using a 2048x2048 texture, but when i use a bigger one (4096x4096), the terrain is just white with the detailmap on it.
Each graphics card has a limit on the maximum texture size. For some cards the limit it 2048x2048. It is very possible that the problem you are seeing is caused by this limit.

Travis
jAyTeA
Posts: 36
Joined: Wed Sep 06, 2006 7:50 am
Location: Hattorf am Harz, Germany

Post by jAyTeA »

hmm, ok, then i think i'll splitt up the terrain.

But does anyone have an answer for my 2. question?
I want a physicengine because my playermodel don't move correct inside of modelled houses.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

To answer your second question there is something simple you can do with terrain which is send a ray vertically up and down from your node and test for the collision and position it there. Its not good for jumping or anything tho lol. Also what problem are you having with newton?
jAyTeA
Posts: 36
Joined: Wed Sep 06, 2006 7:50 am
Location: Hattorf am Harz, Germany

Post by jAyTeA »

My problem with the Terrain and Newton is, that i don't want to integrate the terrain in Newton! I want use the simple Terrainheightanimator for it.
But when i use newton without the terrain it sets my playermodel under the terrain. even if i animate the node after the newton::update
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes thats what i did, I did not integrate terrain into newton but I used irrlicht collision for the terrain and used irrlicht to check for interesction of terrain. You can then make a simple newton body for the player and all other objects and they will collide and slide along terrain.

Here is how to test intersection and place node there:

Code: Select all

    line.start = Node->getPosition()+vector3df(0,50,0);
    line.end =  Node->getPosition()-vector3df(0,1000,0);
    if (Manager->getSceneCollisionManager()->getCollisionPoint(line, selector, intersection,tri))
    {
		Node->setPosition(intersection + vector3df(0,5,0)); // You can adjust vertical position here.
    }
 
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Irrlicht terrain with newton runs well. There was several examples about this 6 momths ago, but I can't point any links. Just search the forum.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

etcaptor wrote:Irrlicht terrain with newton runs well. There was several examples about this 6 momths ago, but I can't point any links. Just search the forum.
Actually i found it did not run very well with character control, it kept falling through the terrain after some time of walking. This can maybe be fixed by running in debug mode and have a bigger physics entity.
jAyTeA
Posts: 36
Joined: Wed Sep 06, 2006 7:50 am
Location: Hattorf am Harz, Germany

Post by jAyTeA »

@BlindSide: I already have an animator for the terrain height. So that is not the problem. My problem is, that the objects are falling through the terrain, even if i set their Y-position after updating newton!

whatever, at the moment im working on tiling the terrain, but it doesn't work as i thought, so it will need some time until i can test Newton again.
Post Reply