• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
WiSK said:
So what do I want to know? Anything to make it go faster :) Well, in your hint you suggested that I could somehow predict the moments to split the quadnodes by looking for "drempels" (dunno what that is in English; "bumps?"). But I'm not sure how to determine what kind of values would trigger a split; and where to split; and how much of the neighbouring values to look at; and in which directions would I need to scan.

Sounds too complicated.
Here are some hints:
* you have to do it recursive
* you have to walk over each block (32x32, 16x16, ...) in a left-right, top-bottom fashion.
* You need to split the block you're encoding when a pixel color changes enough to warrant a new block, or when the id of a pixel changes, or when a pixel lies on a border
* don't use 6 bit shading values (remember the decoding process)

That should get you somewhere.
If you want, I can PM you the function that does the encoding... It's only 43 lines (including whitespace). ;)
 
XieChengnuo said:
Well, if it still goes really slow, I won't mind, as long as I can do all my editing, see that it's what I want, and then just leave the computer for a few days while it does the encoding, then I'd be perfectly fine with that.
There's no need to, if you work on small parts of the map at a time. The encoding is pretty fast (at least, it is in my case).
 
WiSK said:
So what do I want to know? Anything to make it go faster :) Well, in your hint you suggested that I could somehow predict the moments to split the quadnodes by looking for "drempels" (dunno what that is in English; "bumps?"). But I'm not sure how to determine what kind of values would trigger a split; and where to split; and how much of the neighbouring values to look at; and in which directions would I need to scan.

Thresholds is the word you're looking for
 
WiSK said:
Idea was useful after all, then? I'm glad :)
A bit... I'm not quite content with the result of the shrinking... Leaves some artifacts. :(
Or maybe I'm just too picky.

By the way: it the game would have included greater zooms then it would have now (lightmap4 and lightmap5) they would have looked like this. :)


export at zoom 1/8, "lightmap4.tbl", 385Kb, click to see real version (this is just a thumb)

export5.jpg

export at zoom 1/16, "lightmap5.tbl"

:D
 
Yeah, you don't think you could hack the game itself to make 'em available, do you? :p
 
Inferis said:
Sounds too complicated.
Here are some hints:
* you have to do it recursive
* you have to walk over each block (32x32, 16x16, ...) in a left-right, top-bottom fashion.
* You need to split the block you're encoding when a pixel color changes enough to warrant a new block, or when the id of a pixel changes, or when a pixel lies on a border
* don't use 6 bit shading values (remember the decoding process)
Ah, okay, this helps quite a bit. Effectively (functionally) it's the same as what I'm doing, only I am fully rendering every possibility before encoding, while you are checking for splits while doing the encoding.

Only one question is: why left-right, top-bottom? I was doing it in the same order as the unpacking (ie right-bottom first).

Inferis said:
That should get you somewhere.
Aye, you da man :)

Inferis said:
If you want, I can PM you the function that does the encoding... It's only 43 lines (including whitespace). ;)
And take all the challenge out of doing it myself?! Thank you for offering, however :D

Inferis said:
A bit... I'm not quite content with the result of the shrinking... Leaves some artifacts. :(
Or maybe I'm just too picky.
I'm guessing Johan was picky too, and that's why he left them out of the game.
 
Inferis said:
A bit... I'm not quite content with the result of the shrinking... Leaves some artifacts. :(
Or maybe I'm just too picky.

By the way: it the game would have included greater zooms then it would have now (lightmap4 and lightmap5) they would have looked like this. :)


export at zoom 1/8, "lightmap4.tbl", 385Kb, click to see real version (this is just a thumb)

export5.jpg

export at zoom 1/16, "lightmap5.tbl"

:D
Really? Don't see any artifacts at all in those great screenies :)

But what are those green lines at the bottom?
 
|AXiN| said:
The rivers in lightmap 5 seem a little wonky, but I could live with that. Do you think you could reintroduce them?
It's not going to happen. EU2 won't display those extra zoom levels unless Johan adds them back in.
 
WiSK said:
It's not going to happen. EU2 won't display those extra zoom levels unless Johan adds them back in.
Unless somebody finds a way to hexedit the EU2.exe so they can be displayed. For all it's worth, it might just be a change from 0x02 to 0x04, for example. ;)
 
In EU1 there were IIRC two more zoom-levels. Both that enabled you to see a larger part of the world than what is possible today. Those zoom-levels were extra nice when you started to own provinces all over the globe and you zoomed out, lied back in your chair, and said to yourself: "Ah, how nice my big global empire looks" :D

However, when we got EU2 these zoom levels were taken away. The official answer was that they looked very bad. I remember that one betatester (now an admin) said they looked like "uiter shite" or something similar.

We were many that posted and said we wanted them but Johan could not (did not have the time) to fix it.

Can it be that you have managed it Inferis? :)
 
*twiddles fingers*

Sooooo... Inferis and WiSK... do you know when you'll be able to get this wonderful utility out?

Don't mean to rush you, but I'm just wondering if we can start setting up threads in the forum on how we would like to change the shape of the provinces :D ...

Keep up the good work!
 
XieChengnuo said:
*twiddles fingers*

Sooooo... Inferis and WiSK... do you know when you'll be able to get this wonderful utility out?

Don't mean to rush you, but I'm just wondering if we can start setting up threads in the forum on how we would like to change the shape of the provinces :D ...

Keep up the good work!
Let me at this point throw a significant bucket of reality-cold water into the faces of those who want a utility that will allow massive changes to the map (or random maps).

It is likely that anything more than minor edits will involve very intensive efforts by anyone making a mod. You are going to have to know what you want the map to look like, you are going to have to decide how to make such a map fit the confines of the game (e.g.: not exceeding the maximum allowed provinces), you are going to have to do the editing (which I do not get the opinion from what I have seen is going to be a "snap"), AND you are going to have to overcome any difficulties along the way.

There will be those with the perseverance; there will be many without it. :D