.

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
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

.

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 1 time in total.
RhavoX
Posts: 33
Joined: Tue Jul 04, 2006 7:27 pm

Post by RhavoX »

I hope that this will be implemented in the next Irrlicht release :P.
Teh Uber-Pwner xD
lordcool
Posts: 15
Joined: Thu Jul 13, 2006 8:33 am

Post by lordcool »

very nice! Spintz!
but StaticMeshData isn't in Irrlicht 1.2...

I hope, too. the next Irrlicht release.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 1 time in total.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 2:06 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I'll add this method in the next days. I simply lost this thread from my view, and I did not bother searching as long as no one requested it again. Now that several people asked for it it is much easier to find and I'll put it in :D
ComputerWhiz
Posts: 3
Joined: Thu Oct 19, 2006 9:15 pm

Post by ComputerWhiz »

Hey Spintz...quick question...

I just implemented the code you provided for GetHeight in the Irrlicht 1.1 source code I downloaded, and when I use it to update the camera's Y position relative to the camera's movement, it looks choppy.

Does your code account for the slope of the terrain when calculating the height? To me, the actual code looks like it does...or tries to...but it's just not working for me the way I thought it would.

Or, would it be possible that the camera is updating the Y axis and that's what's making it look choppy? I'm using the FPS camera scene node.

Thanks.

[EDIT]

I should mention that I'm using Irrlicht.NET CP to do this (I added the necessary code to the IrrlichtW and Irrlicht.NET CP libraries.)

[/EDIT]
Lynxeye
Posts: 17
Joined: Thu Jul 27, 2006 12:19 pm
Location: Germany
Contact:

Post by Lynxeye »

Oh yes a very usefull method. Now, after I forced myself to have a deeper look into Irrlichts source and add something, I found this a very good method. Because I have thousands of getHeight calls to place my grass. Doing this with the standart way the load time increased drastically, but with this it works very fine!

Thanks!

[Edit] But it doesnt work like it should. There are too high tolerances in calculation of the height to use it in a real game scenario. In many situations the grass is circa 1m above the terrain. In other cases it is under the terrain layer. Thats realy anoying...
Lynxeye
Posts: 17
Joined: Thu Jul 27, 2006 12:19 pm
Location: Germany
Contact:

Post by Lynxeye »

I've found the Bug!

You have to swizzle the values for the bilinear interpolation!
If you imagine the values are in that order:
#######
# c # d #
#######
# a # b #
#######

you have to send it to the interpolation in that order:
#######
# b # a #
#######
# d # c #
#######
Post Reply