Modcraft - The community dedicated to quality WoW modding!
Content creation => Level Design => Topic started 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)
-
The only way is to smooth the terrain around these points.
-
No other way? Because this way i already tested. And don't like the result.
Which is the cause of this problem?
-
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).
-
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
-
Thanks :)
-
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?
-
That tool is for fixing offsets of ADTs which were moved (on XZ coords, not on Y - height - coord).
-
Now i get it. Thank you for this clarification.
-
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.
-
Indeed that worked. Not sure why i hadn't seen that option before... many thanks!