L3DT users' community
Large 3D terrain generator

Unity tiling

Got a problem or need advice?

Unity tiling

Postby Dimlos » Tue Apr 28, 2015 12:38 am

Hello, I'm new to L3DT, I have the 90 days tirals and I'm enjoying the software :)

I'm having a problem:
Image

I saw that this guy had the same issue and managed to fix it, but he did not explain how:
viewtopic.php?f=4&t=2869&p=10704&hilit=tiling#p10704

I spent a long time trying to find a way.

I'm exporting an heighmap 8192x8192 by using the "export overlapped tiles" option.
I tried both 2048 and 2049 but none of them worked for me, I still see this line in Unity.

I did not find the pluggin that Onkelpoe was talking about, the "unity exporter plugin", that seems to fix the problem.

Thank you.
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby h4voc » Tue Apr 28, 2015 5:59 am

Hi Dimlos,

too bad i dont know the "unity exporter plugin" and cannot help you in this case. You´ll have to wait for Aaron.

But what i like to know is your workflow, because i am working with unity too and i do not have this kind of a Problem with heightmap exports.
Are u using any plugins/assets for your Terrain? Version of Unity?


Thanks!

best regards,
h4voc
User avatar
h4voc
Member
 
Posts: 22
Joined: Thu Apr 09, 2015 1:50 pm

Re: Unity tiling

Postby Dimlos » Tue Apr 28, 2015 1:10 pm

Hello,

I'm using Unity 5.0.0f4.

I wanted to make a 5x5 map in unity using 25 terrain that are 2000x2000 units each.
But I realised that unity didn't really like importing 2000x2000 (for terrai nraw import) textures so I changed to 2048.
So now I'm at 4x4 because if I resize the heighmap in L3DT to 10k*10k, some pixels are streched and it ends up in unity as a flat streched plane near the edge on some of the tiles.

I did not try to scale up the whole heighmap in L3DT before rendering the tiles.

I am using L3DT Pro 15.01 dev build.

I created a new project this way:
Designable map => Width and Height to the max, I did not split the map there or checked edge wraping, I left the Horizontal scale to 10 (I changed it later after the map was rendered to 1 for testing purpose).
Then, HF/DM ratio to 64, chose a Tropical climate and set the parameters I needed and I rendered a Design and an Heighmap.

In order to split the map in several 2k maps I first used the regular export tool with "Split map into tiles" checked. I tried both 2048 and 2049 tiles.
When I tried those textures in unity the gap was huge.

I tried later with "Export overlapped tiles" with both 2048 and 2049 and the result was better (seen screenshot of the first post). The program asks me to resize the map each time for a few pixels, seems normal to me.

Thank you for your answer. :)

EDIT:

Also I can't find a way to open raw files and save it in photoshop.
I tried several ways to do it but none worked, when I save it with photoshop the map is glithched.
I open in photoshop my raw file, he sees it as a 8bit file sadly.
I see that there are 2 alphas, I try to modify both of them and save as a raw file, interlaced or not, and open it in L3DT to see the result, and it is a mess.
I tried to change the file to greyscale and then change it to 16 bits but it doesn't matter, the problem is the same, it's a different mess^^.
Is there a way to modify a map generated in L3DT in Photoshop and save it?
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby demi » Tue Apr 28, 2015 9:24 pm

It is not Unity it is the blend of the edges of the texture. I see this is most engines that do texturing for the terrain. To get rid of it requires you to export a full size texture and then make the mosaic.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Re: Unity tiling

Postby Dimlos » Tue Apr 28, 2015 10:07 pm

The first thing i did is export the full texture, but I can't make the mosaic in photoshop because it seems like photoshop destroys the file.
Any tutorial on how to keep a raw texture working even after photoshop came in the process?
I can't open a 16bit raw, it imports it in 8bits with 2 alpha channels and it looks like he can't manage both.
Thank you for your answer :)

EDIT: I think that know where to search now, i'll edit my post again if I find how to do it. I'll be right back.
EDIT2: I really can't find a way to open L3DT raw files in photoshop in 16 bits, he wants me to open in 8 bits, even if I saved in L3DT as 16-bits unsigned full scale.
Then I obviously lose information and the saved file from Photoshop is crap.
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby demi » Wed Apr 29, 2015 2:08 am

Try Gimp I am not sure but I think it does raw 16 bit
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Re: Unity tiling

Postby h4voc » Wed Apr 29, 2015 7:46 am

Hi Dimlos,

at first thank you for the workflow. When i am back from work ill try to reproduce your steps.

Regarding the photoshop problem. I searched hours for this and did not find any real solution to open .raw files in photoshop that are not made with photoshop. Maybe gimp will work. Ill give it a try later.
However the whole photoshop thing (if working) is a solution for small terrain mosaics. But i see my self facing 7500 tiles files which i do not want to stitch by hand :shock: :lol:

So why i do not have the problem with unity is pretty easy. I use a plugin for the terrain. It is called TerrainComposer (currently ~45$). It is a very powerful tool to create Terrains in unity and seems to work pretty well with L3DT. I am doing some test with unity + terraincompoer + L3DT to find an easy, fast and stable workflow of created huge terrains and use them in games.

It seems that TerrainComposer is able to interpolate the mesh between 2 or more heightmaps files. TerrainComposer is also able to split 1 Heightmap over 4( or any other numer) of Unity TerrainTiles. It can use the exported Alpha maps ets.

It is a really great plugin and worth every $.

Ok ill reply as soon as i had time to re do your workflow.
I think it is a problem some engine have because of the missing Interpolation of heightmap files. But it can be solved by either the:

* then engine
* Manual modifing (PS, gimp, external programms)
* a plugin
* the TerrainGeneration program (L3DT), using overlapping tiles (which seems not helping here?)

I think ill have a closer look to the export options like overlapping + importing this files to unity.

best regard,
h4voc
User avatar
h4voc
Member
 
Posts: 22
Joined: Thu Apr 09, 2015 1:50 pm

Re: Unity tiling

Postby Dimlos » Wed Apr 29, 2015 1:44 pm

Thank you a lot for taking the time to do these test :)
I'll talk about it to my co worker.

Yes overlapping tiles does not solve the problem in my case.
I'll look for puggins and check out the one you are talking about.
If i find one that is free and works for me I'll come back and post my feedback.

Thanks again :)

EDIT: I downloaded a cracked version (10/04/2015) in order to test it before buying it to see if it can fix my problem.
The problem is still here even with this pluggin.

Here is a screenshot:

Image

Here is a link with 2 tiles that should fit perfectly:
https://mega.co.nz/#!xEs32bhA!KjhjWJ09U ... u816DjbmVI

I don't understand why it is taking me so much time to make a line dissapear it's really frustrating.
There is something wrong in my map, I don't know. My co worker tried it too and the line is still there.
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby h4voc » Wed Apr 29, 2015 8:07 pm

Hi Dimlos,

ok i did some testing:

Here are the results and the workflow:

First i created a new Unity3D Project and a new L3DT Project.

In L3DT i created a new blank design map. Painted some terrain and generated the HM.
(Settings: 1024 map sized, mosaic tiled)

Then i exported 2 types of maps:
  • First i used the "Export overlapped tiles" Fileformat: RAW, Tile size: 513. I proceeded the warning of resizing the map to 1025.
  • Then i exported the HM the normal way: Export active map layer, Settings: split map into tiles, resize for export ecked to 1025, in the next screen u can select the file format RAW, i choose tile size 513.

After that i imported the exports to my unity project.

I created 4 terrains and applied the raw maps to them. I did this 3 times:

First Result: Imported Overlapped Exported Tiles:

Overlapping_Topview.PNG

Overlapping_Sideview.PNG


No seams or glitches

Second Result: Imported Normal Exported:

NormalTiled_PureUnityEngine.PNG


you can see the seams/glitches. the terrains are not connected

Third Result: Imported the Normal Exported with TerraimComposer and used a the TerrainComposer Function "Stitch":
NormalTiled_TerrainComposer_StitchingFunction.PNG


no seams or glitches


This shows that it is possible to import both types of exported maps to unity without any glitch or seam. Both L3DT and Unity3D(with plugins) have the features to make this possible. Only the Unity3D only test failed.

I think there is something wrong in your map or export settings. I hope this helps.

best regards,
h4voc
User avatar
h4voc
Member
 
Posts: 22
Joined: Thu Apr 09, 2015 1:50 pm

Re: Unity tiling

Postby demi » Wed Apr 29, 2015 10:14 pm

I was trying to tell you to make a seamless map with no tiles first then export the maps and textures as a mosaic. If you make it mosaic the borders have the first and last Colum pixel darkened. The work around is to grow the tile by two and remove the first and last column.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Re: Unity tiling

Postby Dimlos » Thu Apr 30, 2015 12:03 am

I did the exact same thing as you.
New project and everything (I tried to create a new project with mosaic tile checked and not checked, both didn't work in unity):

It is a 1024 that has been "overlapped exported" at 513 tiles (2x2).
I can see the line clearly at some places and not in other places.

Image

In your exemple, how does it look with the same color everywhere?

Edit: I think I'm going to make a video to show you how I do that.
It's getting on my nerves that I make a stupid mistake somewhere and I'm loosing my time and yours.
I'm sorry.
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby demi » Thu Apr 30, 2015 1:39 am

I don't think you will ever get 100% seamless. It happens in all these engines to some extent. The reason is the meshing engine has minor variance. Higher end engines like Bigworlds, Cry and Unreal do a better job because they scale the terrain so those minor mismatches are not as visible BUT they are still there and due to splatting the textures they get blended away most times.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Re: Unity tiling

Postby Dimlos » Thu Apr 30, 2015 1:53 pm

Here is the video, sorry that I'mn ot used to talk in English.

https://www.youtube.com/watch?v=UNUaL3UbKx0
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Re: Unity tiling

Postby demi » Thu Apr 30, 2015 9:11 pm

Dimlos wrote:Here is the video, sorry that I'mn ot used to talk in English.

https://www.youtube.com/watch?v=UNUaL3UbKx0


Well I see the problem. I know it well ...

It does this weather you export it as overlapping or standard mosaic. The ONLY fix is to make the entire thing including textures, splat maps and so on as one piece and then split them after all calculations have been processed.

I am deaf BTW.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Re: Unity tiling

Postby Dimlos » Fri May 01, 2015 2:25 am

I'm sorry I didn't know you were deaf ><.

I have a raw texture of 8k that I exported 3 days ago with I guess everything inside but I couldn't open it in photoshop without losing a lot of informations.
So, I need to take that texture and split it in another sofware?
If photoshop couldn't do it (I switched to 16bits with Adobe Camera Raw but it didn't solve the problem, can't open those textures in 16bit), I have NO idea on what software could. By searching on google for 16 bit raw, only Photoshop comes.

Thank you for you help. At least now I know it does not come from a setting I missed or missunderstood.
Dimlos
Member
 
Posts: 10
Joined: Tue Apr 28, 2015 12:32 am

Next

Return to Help and support

Who is online

Users browsing this forum: No registered users and 9 guests