Page 10 of 23

Posted: Sun Aug 19, 2007 2:34 pm
by grunt
I would like to see this as part of the wrapper as well.

Posted: Sun Aug 26, 2007 5:46 pm
by FlyingIsFun1217
Hey!

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

FlyingIsFun1217

Posted: Mon Aug 27, 2007 12:01 am
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

Posted: Mon Aug 27, 2007 12:48 am
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.

Posted: Mon Aug 27, 2007 1:21 am
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

Posted: Mon Aug 27, 2007 6:32 am
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?

Posted: Mon Aug 27, 2007 7:44 am
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?

Posted: Mon Aug 27, 2007 11:24 am
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

Posted: Tue Aug 28, 2007 1:59 pm
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.

Posted: Tue Aug 28, 2007 9:45 pm
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

Posted: Tue Aug 28, 2007 10:15 pm
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.

Posted: Tue Aug 28, 2007 10:18 pm
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.

Posted: Tue Aug 28, 2007 10:37 pm
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

Posted: Wed Aug 29, 2007 6:43 am
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");

Posted: Wed Aug 29, 2007 10:53 am
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