Terrain falloff problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Terrain falloff problem

Post by pfrancke »

Help, I'm new to this, but I'm having great fun and success. Here's my problem... I use addTerrainSceneNode (like in the 12example prog). In fact (to make sure I didn't mess up) I go back to that example and the only change I make is I load in my bmp file for the terrain, and my texture file. The terrain bmp is 256 square and the texture is 1024 square, just like the example's files. And everything works fine EXCEPT, the right edge, my terrain plummets lower. It is like the right edge got bent downwards with a ruler. The entire right edge seems to have the same elevation (zero) while the rest is AOK. I figure it is a problem with my elevation bmp. It is 8bit bmp 256x256 out of photoshop.

Any help from much appreciated!!!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

This is a known bug and will be fixed in 1.5.1.
For the moment you can either apply the fix posted here, or get the latest Irrlicht source from SVN.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

bitplane, Thank you!!! I kept looking and looking and couldn't figure it out.

I tried to apply the fix and I goofed up my code -- couldn't re-compile. I got 11 errors like d3d9.h include file not present. So I'll just need to re-copy the libraries to proceed.

When will the new release come out? And BTW, you guys do incredible work!!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Thanks :)

You'll need to install the DirectX SDK if you want to compile with D3D9, but if you can just comment out the line in IrrCompileConfig.h if you don't need it.

There's currently no date planned for a 1.5.1 release, but based on previous releases I would guess it will be no sooner than March/April.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

I commented out the dx8 and dx9 in the config file and recompiled and am very happy to say that your bug fix was perfect (but you knew that).

How brave (read foolish) must I be to download the DirectX SDK and try to compile that in. I'm running the code opengl now and I can absolutely see a framerate hit. I dropped from 160 fps down to around 27... Should I be happy or should I be brave? Advice from anyone much appreciated - I'm a baby at this...
sjb
Posts: 19
Joined: Tue Dec 23, 2008 10:35 pm
Location: Sweden

Post by sjb »

What are you compiling in?

If you use MSVC 9.0 you don't have to be brave at all. Download latest SDK. Install. Open MSVC and it will have added the libs and includes itself. :)

Go for it
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

I'm using Visual Studio 2005 (which I think translates to MSVC 8.0)
sjb
Posts: 19
Joined: Tue Dec 23, 2008 10:35 pm
Location: Sweden

Post by sjb »

Well. I'm not sure if it does it automatically. But all you really need to do is download the SDK, install it. Try to compile, if it works, hooray. If not, then you prob just need to add the include and lib directories (under Tools->Options) once they are added the project will probably compile.

I'd try it out. Even if I was new :)
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

Thank you for your encouragement and guidance. I'll give it a shot then!!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The current 1.5 terrain loader has a bug and created 32bit indices even for 256x256 heightmaps. You could try latest SVN versions of the 1.5 branch, where not only this issue is fixed, but also VBOs are enabled for terrain. Should boost the performance to unknown values.
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

Thank you sjb and hybrid.

FWIW, I downloaded the November DirectX SDK (438MB at 11KB/sec - it took a long time). And I un-commented the two directX include statements in the config file. I re-compiled and got 5 errors, it couldn't find the directx8 include files. (it found the directx9 files though).

So I got directx9 working fine - am guessing that the 8 wasn't supported anymore (this one goes all the way to 11 I think..) I'm happy to be without 8.

Thank you everyone for helping me on my journey!!

One residual question, I'm game for compiling the latest SVN version of the 1.5 branch (I said that like I know what I'm talking about). I'm not at all familiar with sourceforge procedures, so with that in mind, how might I most easily find and download the latest SVN version of the code?

Thanks!
Piet
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Read the bug forum FAQ about SVN, the SourceForge description about SVN, the Wiki page about SVN dirs, and download TortoiseSVN :)
pfrancke
Posts: 17
Joined: Thu Jan 01, 2009 3:06 am

Post by pfrancke »

Hybrid!! Thank you. You gave me everything that I needed. It took a little bit of fooling around, but between "just trying it" and reading what you referenced - I had Success!!!!!

Thanks again.
Piet
Post Reply