New Tiled Terrain Scene Node [works with Irr 1.5]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
grunt
Posts: 96
Joined: Tue Aug 17, 2004 9:14 pm
Contact:

Post by grunt »

I would like to see this as part of the wrapper as well.
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

Hey!

I figured I'd give it a second try. Seems that your source is down though (404).

FlyingIsFun1217
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

FlyingIsFun1217 wrote:Hey!

I figured I'd give it a second try. Seems that your source is down though (404).

FlyingIsFun1217
The part that was down was the link on your homepage.
The one in the first post is up.

I have added ShTlTerrainSceneNode.o to the makefile's EXTRAOBJ= section, and it recognized and compiled it. Hope it works this time :)

Thanks!
FlyingIsFun1217
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

Alright, everything compiles (get 14 errors, but it's better than no compilation).

Thanks!
FlyingIsFun1217

ps: This is for linux, in case anybody else is trying the same.
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

Just thought it might be related to the Tiled Terrain Scene Node, since this doesn't show up in the regular terrain demo.

It seems that I get really weird grainy-ness on the textures of the terrain far away.

Image

Any idea what this might be from?

FlyingIsFun1217
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

FlyFF, I have seen this happen somewhere before. Try to set the detail texture after the colour or make sure you are calculating the normals. Also do not render in between calculating normals and other things.

Oh wait are you just running the demo?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

BlindSide >> I think he is trying to compile demo source under Linux.


FlyingIsFun1217 >> It is realy werid. I was just recompiling demo on my computer to be sure, but here everything is working fine. If I recall right hibrid was able to compile it under linux.

Did you tried to compile under Windows?
What version of Irrlicht? ...Demo was compiled under 1.3 and I was not using 1.31 yet.
What happen if you change texture for your own?
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

arras wrote:It is realy werid. I was just recompiling demo on my computer to be sure, but here everything is working fine. If I recall right hibrid was able to compile it under linux.

Did you tried to compile under Windows?
What version of Irrlicht? ...Demo was compiled under 1.3 and I was not using 1.31 yet.
What happen if you change texture for your own?
I did compile it under linux, that was actually what it did on the provided example, compiled on linux.

Compile under Windows? No, that I have not tried. If it matters, your precompiled example works just fine in Windows :)

Yep, I am using 1.31.

I'll see what changing the texture manually does :D

Thanks so much!
FlyingIsFun1217
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Well I have managed to get the same effect several ways. One of them was rendering inbetween calculating the normals and setting the texture. Either way it appears that the filtering might be getting set to point filtered or something, so try changing this manually somewhere, or try forcing the material type to DETAIL_MAP after you have set everything.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

BlindSide wrote:Well I have managed to get the same effect several ways. One of them was rendering inbetween calculating the normals and setting the texture. Either way it appears that the filtering might be getting set to point filtered or something, so try changing this manually somewhere, or try forcing the material type to DETAIL_MAP after you have set everything.
Isn't that done in the demo?
If it isn't, I'll try adding that and see if it changes anything :)

Thanks!
FlyingIsFun1217
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

There was some strange issue Eigen was having with textures, you can find whole discusion on page 2 of this topic. Folowing code seemed to solve things for him:

Code: Select all

video::ITexture *txt = driver->getTexture("Media/dirt_x_43.bmp");
terrain->getMaterial(0).Textures[0] = txt;
instead of

Code: Select all

terrain->setMaterialTexture(0, driver->getTexture("media/dirt_x_43.bmp"));
at line 223 in main.cpp

please try that.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can also write the first variant in one line. However, the first option will set only the first material's texture, while the second will set all materials' first texture.
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

hybrid wrote:You can also write the first variant in one line. However, the first option will set only the first material's texture, while the second will set all materials' first texture.
Isn't it a pointer to a texture retriever, followed by...
What is it followed by?

Just trying to kinda learn the code :)

FlyingIsFun1217
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

You need pointer only if you going to work with it. Irrlicht keep track of texture internaly, probably by video driver.

This is code hybrid probably had in mind:

Code: Select all

terrain->getMaterial(0).Textures[0] = driver->getTexture("Media/dirt_x_43.bmp");
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

arras wrote:You need pointer only if you going to work with it. Irrlicht keep track of texture internaly, probably by video driver.

This is code hybrid probably had in mind:

Code: Select all

terrain->getMaterial(0).Textures[0] = driver->getTexture("Media/dirt_x_43.bmp");
I'll try this and see what I get :)

FlyingIsFun1217
Post Reply