Editing silkroad Height Map

04/11/2018 14:57 gigola123#1
Hello everyone,

Some years ago I was working on Silkroad Map, I figured out how collision work ect.. And 3 days ago I discovered [Only registered and activated users can see links. Click Here To Register...] work (Recreating Sro in Unity) and I was like, why not use all my work for import it into Unity, so my tool convert all sro map into .xml and then I created a Unity extension for import those data I get this into Unity: (Region 64ac so 100/172).

[Only registered and activated users can see links. Click Here To Register...]

After editing:

[Only registered and activated users can see links. Click Here To Register...]

And ingame:

[Only registered and activated users can see links. Click Here To Register...]

As you can see final render isn't the same :D

But when I change it manually I got this:

[Only registered and activated users can see links. Click Here To Register...]

Which look better than Unity change.

My main question is: Someone know from where it can come ? That there is a part of the texture which get destroy ? It's look like it's from the zone2 of nvm.

And my tool calculate the height map from .m and then convert it to .m and to nvm and it's seem that only the .m got problem with when I move with my char everything is working well.

And sure I'll release everything open souce when it'll be working ! People will be able to load all sro map on unity, change object location + colission. The only thing which I can't do for the moment is the "ground" colission because I don't see how I can make this editable from unity haha, just learn how unity work 2 days ago.

I hope that someone know the problem :D
04/11/2018 17:49 DaxterSoul#2
It's hard to pin-point the exact problem from the screenshots, but I'll write down some things you should consider checking.

The NavMesh (.nvm) stores a single heightmap with 97x97 vertices.
The MapMesh (.m) stores 6x6 heightmaps (blocks) with 17x17 vertices

This means the vertices at the edges need to match the vertices at in adjacent heightmaps (both for blocks and regions) to avoid cracks.

You may need to adjust your exporting accordingly.

The texture get's "destroyed" because the difference in height between the adjacent vertex is very high.
In modern games this is often resolved with a technique called [Only registered and activated users can see links. Click Here To Register...]. As you can't really implement this into Silkroad, you're left with what Joymax provided.
Gallery

You might end up writing your own terrain system like I did, which brings its own problems.

Gallery
04/11/2018 18:38 gigola123#3
Quote:
Originally Posted by DaxterSoul View Post
It's hard to pin-point the exact problem from the screenshots, but I'll write down some things you should consider checking.

The NavMesh (.nvm) stores a single heightmap with 97x97 vertices.
The MapMesh (.m) stores 6x6 heightmaps (blocks) with 17x17 vertices

This means the vertices at the edges need to match the vertices at in adjacent heightmaps (both for blocks and regions) to avoid cracks.

You may need to adjust your exporting accordingly.

The texture get's "destroyed" because the difference in height between the adjacent vertex is very high.
In modern games this is often resolved with a technique called [Only registered and activated users can see links. Click Here To Register...]. As you can't really implement this into Silkroad, you're left with what Joymax provided.
Gallery

You might end up writing your own terrain system like I did, which brings its own problems.

Gallery
Thank you for your answer !

Yeah I got it, I made a system which skip always the X(17) last point of each block for the nvm (which it wasn't a good idea, it was only for test the render).

But yeah If I understand well, the texture get destroy because there is not "calcule" with the nearest block ?

So if in a block we set "manually" 15*15 points and the points on edge then should be an average with the "nearest block".

I'll try to do that with my actual system, but I get it now, I understand from where the problem can come ! Thank you very much :)

Edited:

Thank you very much Daxter !!!

I didn't think about this solution which was so logical ! Like I say I do some calcule, it's not perfect for the moment, had some little free time to work on it, I'll optimise that ! Have to fix problem when 4 blocks touch each other and then everything will be fine ^^ here some preview:

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

And here some fun with it:

[Only registered and activated users can see links. Click Here To Register...]

But in theory, when you change 1 region, you've to change all srop map at once and this get harder for my computer to load all sro map haha

Thank you very much for your help !!!
04/12/2018 08:20 DaxterSoul#4
You don't need to load all regions. Load a 3x3 grid and when moving the camera you load/unload regions (known as streaming).
05/06/2020 11:31 btbaotrung90#5
Can you share demo map for I learn?
06/22/2020 08:52 alex_beko#6
Hi, can you share heightmap?
06/23/2020 03:15 gigola123#7
Hey, this thread is really old haha, you can check this: [Only registered and activated users can see links. Click Here To Register...] on the navmesh tool you can generate random heigh with "random-height" command (Look the third video). You can take a look on src of tool if you want ^^