Unity 3d exporter missing terrain

i need some more sample of unity export for make it finalize
and that need work on fps too

What kind of samples… Different terrain splatmaps with different number of layers ???

What kind of samples… Different terrain splatmaps with different number or same number

I will use the same set of tile images.
I will simply paint little circles or something and make a terrain with 2 layers, then another terrain with 3 layers… etc up to 12

Gonna take a sec… will upload images ASAP

Yo @nasimiasl

Here goes some simple examples that use 2 - 11 splats:

https://www.babylontoolkit.com/files/Terrains/Terrain2.zip
https://www.babylontoolkit.com/files/Terrains/Terrain3.zip
https://www.babylontoolkit.com/files/Terrains/Terrain4.zip
https://www.babylontoolkit.com/files/Terrains/Terrain5.zip
https://www.babylontoolkit.com/files/Terrains/Terrain6.zip
https://www.babylontoolkit.com/files/Terrains/Terrain7.zip
https://www.babylontoolkit.com/files/Terrains/Terrain8.zip
https://www.babylontoolkit.com/files/Terrains/Terrain9.zip
https://www.babylontoolkit.com/files/Terrains/Terrain10.zip
https://www.babylontoolkit.com/files/Terrains/Terrain11.zip

1 Like

Yo @nasimiasl

UPDATE

I been thinking about the mip map levels and Unity.

Unity has built-in support for Texture2D with full mip chain. So re-wrote the exporter to just use Unity Internal Mipmapping (save me from having to scale image with bilinear filtering to generate the mip levels… Unity handles that internally if using Texture2D with mip chain enable).

I can then PACK the whole mip map chain:

Example 4096K Atlas with 1024K Textures and Full Mipmap Chain (11 total levels):

https://www.babylontoolkit.com/files/Terrains/FullChainTerrain_4096.zip

Example 2048K Atlas with 512K Textures and Full Mipmap Chain (10 total levels):

https://www.babylontoolkit.com/files/Terrains/FullChainTerrain_2048.zip

This should take care for that SHARPNESS when view lod past the original 5 levels… Ought to look great with supporting the whole mip map chain in the Texture Atlas… I would think :slight_smile:

ALSO

Would it help if i made a LOOKUP texture and encoded things like:

1… The rect of each splat in the atlas (vec4)
2… The tile/scale and offset of the main texture splats (not the mipmaps)

Because i cant see how you can reliably get the texture from a Unity Packed Texture Atlas and it seems to me that you would need to the know the tile and offset values for each splat (they can be different) for proper tile wrapping

Hi.
Any news on next version of the exporter ?
Thanks.

I’m waiting on @nasimiasl help for the shader.

Ok. I hope it will be solved. I start to have fun with unity. :slight_smile:

Yo @nasimiasl … Any word on that texture atlas shader code ???

hi sorry i don’t find a chance to continue this yet

@MackeyK24, does terrain problem affect the generation of navigation mesh ? I tried to create a nav mesh but it isn’t exported. Can you help me ?

Can send me scene with nav mesh setup.

Are you sure your baking the nav mesh ???

Yes, i baked it. I don’t know if i’m doing something wrong, but i don’t see the generated nav mesh in the assets folder. I see the blue navigation layer on the terrain in unity editor but no file is generated when baked. Am i missing something ?

Edit. Maybe i found the problem. I let you know if i solve.

Its bakes the nav mesh as geometry in the the scene… I think is called NavigationMesh

By defaults it is invisible but you can use the inspector to show it.

The whole point is to bake that nav mesh in Unity… It gets exported in the scene like any other cube or whatever… you can use scene.getMeshByName(“NavigationMesh”)

then use youe babylon.navmesh API to build your nav mesh nodes again the actual NavigationMesh then you can plot shit out using the navmesh API :slight_smile:

I installed a package called microsplat and the navmesh.unity file is placed there, maybe that’s the problem.
Currently i’m using the unity exporter to export only some things like heightmap and navmesh. Than i create the babylon scene manually.
How does the exporter create the navmesh ? Does it create a .babylon file ?

yes… it create a .babylon scene file. with the mesh data inside as a native BABYLON.Mesh

1 Like

Ok, i understood. I thought it was exported as a separate .babylon file. Thanks.

Tried to export a simple scene and import it in the babylon sandbox. I get the error o.h.Instantiate(…) is null.

Dunno… Send me your scene…

BYW… The sandbox does not support any metadata type functionality … but it should at least render the raw geometry…

Anyways… package up and send me a .unitypackage of your scene and i take a look at it :slight_smile: