Jump to content
  • 0
vykimo

High level mapping's question (Quadtree)

Question

Hi everybody,

I searched many times about how to fix black textures and ghost models in custom map.

 

Since the new update of the exe (thanks to new prontera), it seems that the way that how they support maps have been updated.

I mean that, today, it looks like there is no more black texture but rather a jerkily walking of the character around the map (problem half solved then).

 

Concerning the ghost models (what I mean is the models who are not present when you're loading too far from them. AND they don't appear when you approch them : for instance, the church place leaves a blank with only shadows), the problem is still there.

 

I know all the tips possibles.

Hexa : 0109 which don't support quadtree and 0201.

 

The problem is that, with new prontera models, I can't use version 586 of Browedit (it crashs). And then, I can't save my map with the correct models saving (as mentionned in PinkPanther Aerie's post : https://rathena.org/board/topic/53281-guide-aeries-guide-for-browedit/?hl=quadtree)

 

2) Why I've got missing models when I'm IG?
 This happens when you use the quick save. The quick save don't calculate each models per quadtree
but make a whole one, fatest yes, but occure some random vanish models.
You should always use the classical Save, by the way take of your
BrowEdit version, some of them only does quick save (like version 620).
For be sure about your version, check your console during the save :

 

Somebody have an idea to solve my problem of blanking models? To save my map with the correct formula for models?

 

Please give me some details concerning Quadtree (more technical things than : Quadtrees are a division of the map in small square for make a faster loading of the map).

Thanks!

Edited by vykimo

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hmm, you could edit my downgraded newprontera map version instead : http://www.mediafire.com/download/7hcz6u9vl4vjhb4/newprontera.grf (this GRF contains all the new models as well, allowing you to use them in other maps if you need to).

 

It can be loaded and saved just fine in BrowEdit 586. The church may look weird in the editor, but it will look fine ingame (I had to cut it in multiple parts).

 

Otherwise... if you want to know more about quadtrees... here goes. In a RO map, quadtrees are cubic areas that determine wheter or not 3D items should be drawn. A quadtree node consists of 4 vectors, namely :

Max, Min, Range, Center

where Range = (Max - Min) / 2        // Length from the middle of the cube to the extremities

where Center = (Range + Min)        // Center of the cube

 

Which gives you 12 values (Max.X, Max.Y, Max.Z, Min.X, Min.Y, etc).

 

The values max and min correspond to the max/min height of the objects (or most likely parts of objects)/water/ground found in this cube. Let's say you walk near it, the client will start drawing all the items found inside it, but those only! When the client renders the scene, all the objects not found within the player's visible cubes will be skipped to make the whole process faster. This is why sometimes you see black spots, it's... basically an unloaded chunk.

 

Now, why is it called a tree? That is because the cubes are of various sizes, sort of. The first quadtree node, the root node, is the cube that contains the entire scene with all the items. This cube is then cut in 4 smaller pieces, making 4 new smaller quadtree nodes. The process is repeated until your tree is 5 in depth :

depth | amount

0 | 1

1 | 4

2 | 16

3 | 64

4 | 256

5 | 1024

 

This will give 1365 quadtree nodes. 1365 nodes * 4 vectors * 3 values (XYZ) * 4 bytes = 65520 bytes of data for the entire quadtree, which is appended directly at the end of the file. The tree traversal type, when reading the nodes, should be in pre-order. Normally, a map is 1000 by 1000 (in the game's world coordinates) and its centered. BrowEdit doesn't show you the real values, it uses a different coordinate system. Anyway, this gives you the following first node in most quadtrees (Y is the 'height') : 

Min = {499, 0, 499}
Max = {-500, 0, -500}
Range = {499.5, 0, 499.5}
Center = {-0.5,0, -0.5}
 
If you want more information, well... search on google, there are plenty of resources available ;].
Edited by Tokeiburu

Share this post


Link to post
Share on other sites
  • 0

Thank you for your answer about quadtree.

Concerning my map now, I don't have problem with prontera but with a custom map with prontera's models. This map can be openned into BrowEdit620 (it's a bit laggy but it works) but the BrowEdit580 crashes while openning of the map...

I think its a problem with models..

Share this post


Link to post
Share on other sites
  • 0

Well... If you copy the model files in newprontera.grf and replace yours with them, it... should work! The models have been 'downgraded' to support more clients (from 2010 onwards - should be working fine in BrowEdit 586 as well). The new prontera map files (.rsw, .gnd, .gat) don't cause any issues (their format hasn't been modified at all).

 

The only model you can't easily copy is the church one. If that doesn't work, I'm afraid you'll have to upload your custom map (with the problematic models) so that people can locate the issue.

Edited by Tokeiburu

Share this post


Link to post
Share on other sites
  • 0

Ok thanks, I'll test it right now. BTW what do you mean by "downgraded"? Models' polygons were lower? Or definition, precision was affected? (I'm a bit reticent)

 

EDIT : The opening/saving works with your models. Btw, Browedit display this kind of message (in case it reminds you something) :

 

(...)
Info: [01:58:28] Calculating model 429 out of 1575 (%)
(...)

 

EDIT2 : However, you completly solved my problem with your grf... Thank Tokeiburu, I like when people are efficient like you. God Save you. ;)

Edited by vykimo

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.