Page 1 of 1

Long range terrain approximation

PostPosted: Sat Jun 18, 2011 16:53
by benajamin
I tried it out and it looks promising, but a lot of the polygons are white, especially those approximating the higher parts of the hills. I didn't notice any related errors being printed.

PostPosted: Sat Jun 18, 2011 18:35
by SachielMF
I had a crash repeatedly when walking to a certain direction in a freshly generated world. After a restart I was several blocks away again, so it probably wasn't able to save my location correctly. Tried again several times and it always crashed with "This application has requested the runtime to terminate...". On the other hand, I don't think I had any white textures. And it seems to go pretty heavy on my system as the cooler's slowly turning up to full speed. I barely noticed it with older versions.
Cool concept, though. Didn't expect a kind of LOD system in this sort of game.

PostPosted: Sat Jun 18, 2011 19:34
by Fishkilleur
benajamin wrote:I tried it out and it looks promising, but a lot of the polygons are white, especially those approximating the higher parts of the hills. I didn't notice any related errors being printed.


Me too :

Image

PostPosted: Sat Jun 18, 2011 19:56
by Nocte
I think this is caused by farmesh.cpp line 364. Since the section has a comment that says "Add some trees if appropriate", my guess is that it should have been green instead:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
c = video::SColor(255, b*107, b*134, b*51);


However, I think it looks better if you comment the whole section (358-400) out:

[img=Screenshot]http://lh5.googleusercontent.com/-RDuiPxjaMNE/Tf0CJJ2nNhI/AAAAAAAAANs/CTL2IcFrUGo/Screenshot-Untitled%252520Window.png[/img]

PostPosted: Sat Jun 18, 2011 23:12
by celeron55
It looks like the new background tree texture (treeprop.png) is drawn as a plain white texture... seems quite strange. I can't think of any solution right now. Will have to investigate further some day.

PostPosted: Sun Jun 19, 2011 00:11
by Nocte
Gah, I missed that setMaterial call. :P Well it's pretty easy to fix then, treeprop.png wasn't added to the repository.

PostPosted: Sun Jun 19, 2011 07:20
by benajamin
I would suggest that for sectors that have already been generated (and are within some distance), you texture the farmesh polygons with an image taken from a top-view map. However, it would be best to ignore water for the map, since it can look really strange to have blue on a slope. In fact, water should probably be done as a separate set of polygons, since the surface of water is almost always level and also because it would be nice to have an approximation of the sea floor as well.

PostPosted: Sun Jun 19, 2011 08:39
by celeron55
Wrote a bit more about the subject: http://celeron.55.lt/blog/?p=275

PostPosted: Sun Jun 19, 2011 08:57
by benajamin
I think this feature is really awesome and agree that it make exploring easier and more fun. I am eager to see how far you can take it!

PostPosted: Sun Jun 19, 2011 09:25
by Fishkilleur
Yes it treeprop.png file missing in the data.
If I take a picture of a tree on the internet and I rename it "treeprop.png", here's what happens:

Image

PostPosted: Sun Jun 19, 2011 09:41
by celeron55
Uh oh, I seemed to forget to add it to the repo...

Added it now, and updated the link to the current version of the source in here: http://celeron.55.lt/blog/?p=268

PostPosted: Sun Jun 19, 2011 09:55
by neko259
Cuold you make antialiasing or something similar? So that that polygons from long range woult look more smooth, like hills.

PostPosted: Sun Jun 19, 2011 10:41
by benajamin
I just tried out the new version and it works very nicely. It really makes the world feel larger and fuller. Thanks for all your hard work!