Modcraft - The community dedicated to quality WoW modding!

Content creation => Level Design => Topic started by: dess on May 14, 2012, 11:18:34 pm

Title: [SOLVED] Transparent lines in my adt.
Post by: dess on May 14, 2012, 11:18:34 pm
Hello I have a serious problem in my adt, but i don't know the cause of the mistake, the mistake is, my adt have transparents lines and I can see the empty, I attach a photo with the problem. Sorry for my bad english, I'm spanish.

(http://i46.tinypic.com/294iesz.png)
Title: Re: [BUG] Transparent lines in my adt.
Post by: schlumpf on May 14, 2012, 11:27:52 pm
The only way is to smooth the terrain around these points.
Title: Re: [BUG] Transparent lines in my adt.
Post by: dess on May 14, 2012, 11:31:58 pm
No other way? Because this way i already tested. And don't like the result.
Which is the cause of this problem?
Title: Re: [BUG] Transparent lines in my adt.
Post by: schlumpf on May 15, 2012, 12:05:47 am
The problem is that the height map is divided into multiple small height maps. Every height map has a base coordinate. Both, base coordinate and height map consists of IEEE 754 floating point numbers. These have an implied inaccuracy. It is not possible to describe some numbers. For example, above 16777215, there are no odd numbers. There just are none. Also, adding 1.0 and 2.0 might not result in 3.0, but something like 2.99998.

The actual problem here is a combination of the floating point inaccuracy and bad algorithms. For building the height map, all values are taken and minimum and maximum are determined. Then, the base position is set to the minimum and all values of the height map are subtracted by the minimum.

As this is done per chunk, not per whole ADT or even map, coordinates which should be the same, are not. On chunk a, the border is at 0.5 + 0.5, on chunk b, it is at 1.0 + 0.00001. See where this is going?

In the end, unless the programmers come up with a better way of calculating base and height map (actually, there is no real reason to have a base position other than 0.0), there is no way for you to fix this, except for smoothing or modifying the terrain otherwise, until it matches.


For more on floating point numbers, read the articles by Bruce-Dawson of Valve at http://randomascii.wordpress.com/2012/0 ... nt-format/ (http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/" onclick="window.open(this.href);return false;) (and following articles).
Title: Re: [BUG] Transparent lines in my adt.
Post by: Elinora on May 15, 2012, 01:48:27 am
A guy once made an epic epic 10 page  mountain guide on mmowned.. He explained that if you terrain with too many edges, or use flat too much, then this happens.. And as slumf said.. the only way is to smooth it out.. No other way :P or use  linear to make mountains, and always use a brush above 8 in size.. :P
Title: Re: [BUG] Transparent lines in my adt.
Post by: dess on May 15, 2012, 04:06:15 pm
Thanks :)
Title: Re: [SOLVED] Transparent lines in my adt.
Post by: monsune on June 18, 2016, 11:23:30 am
I'm sorry to necro the topic but does it mean there is no way to fix this with offsetfix? Why would this tool exist then?
Title: Re: [SOLVED] Transparent lines in my adt.
Post by: Amaroth on June 18, 2016, 12:51:18 pm
That tool is for fixing offsets of ADTs which were moved (on XZ coords, not on Y - height - coord).
Title: Re: [SOLVED] Transparent lines in my adt.
Post by: monsune on June 18, 2016, 03:01:03 pm
Now i get it. Thank you for this clarification.
Title: Re: [SOLVED] Transparent lines in my adt.
Post by: Amaroth on June 19, 2016, 08:49:53 am
What you can always do about this is going to Assisst menu and using Fix gaps functions. It doesn't fix tiny gaps like this, but all which are even a little bit bigget ir will be capable of deleting properly.
Title: Re: [SOLVED] Transparent lines in my adt.
Post by: monsune on June 19, 2016, 11:16:05 am
Indeed that worked. Not sure why i hadn't seen that option before... many thanks!