I’m using unity 3d 2019 to create a terrain and the babylonjs unity exporter to export it.
I watched the getting started video and all seems to work with plane and cube objects. But when i add the terrain it doesn’t appear in the preview. I placed under the cube but there’s only the cube in the preview.
Where am i wrong ?
The classic version DOES NOT fully support terrains. I am working on this feature for the new up coming version
@manrix : I see you are still looking for a way to create a terrain with with textures - and are trying Unity.
Here is an alternative that you might want to look at in Blender 2.80:
- Activate the Blender Landscape addon (comes already installed in 2.80) See this video to give you an idea of its functionality:
Once you have a mesh you like (lots of options to play with), then Texture Paint it using the set up you can find in this video:
The video successfully mixes two textures. When he tries a third texture he crashes. Not sure why computer or state of Blender 2.80 at the time. I have a version that I got last week and had no problem adding a 3rd texture - see image below.
Reading the documentation i understood it was possible to export the terain with up to 12 textures. However i see it exports an heightmap, splat map and textures in the export folder. How can i use the spaltmap to paint the terrain after i create the ground from heightmap ?
@gryff, i’ll look at them. However unity fits better for terrain creation. Blender seems for creating models. Plus my knowledge of blender is null.
Yeah I can get the stuff out of unity just fine.
My problem is the splatmap shader. I had two version one with up to 12 max textures 6 diffuse and 6 normal maps and another using texture atlas … both had issues that I need to work with a shader guru to get that worked out in new version … pinging @nasimiasl
I hope you solve that. Using unity to create a terrain with many textures would be really nice.
how many texture we need add in maximum for support unity shader??
That all depend on if we can get Texture Atlas working… Then i would say lets set max to 12 SPLATS (Textures and Normal Map pairs)
If we have to use separate textures… I would love at least 6 SPLATS (Texture and Normal Map pairs)
Worse case at least 3 SPLATS (Texture Normal Map pairs)
please send me any sample of texture or shader code
Do you mean only 3 textures ? That’s too few. I hope at least 10.
the best solution is texture atlas i guess
Texture atlas is what I want to use. Both you and I looked at this before and we had a bunch of edge seams. We tried the 9 crop image approach as well and you made a function I glsl to try and help but is was way to complicated for me to fully understand what was going on in shader…
I think WebGL 2 has texture2DLod or something like that so we don’t have to use fract function… I think… that’s kinda what I need help in determining… what the best way to handle the exported terrain materials and glsl shader we have to write to handle all that stuff on the Babylon side
will be in 4.1
If we can’t get texture atlas working then we are screwed on the glsl total texture limit… rembember unity has a matching normal… so just for the additional terrains textures using 3 SPLATS … you need 1 texture for splatmap, 3 for terrain textures and 3 for normal map and 1 for lightmap and if using pbr environment you need one more for the reflection texture… on mobile that’s already puts you 1 too many for the iOS which only support 8 max textures per call… or your gonna have to dump one of the textures…
Using a texture atlas we could pack up to 4 splatmaps in one texture atlas and up to 16 1K textures in main texture atlas and the matching normals in another texture… that’s only 3 extra texture to the normal material pipeline your terrain is painted with… albedo or diffuse
Good news thow … looks like @Deltakosh is gonna add some sort of texture atlas support in 4.1 that we can hopefully tap into to solve this terrain splatmaps issue
i have the solution I need make demo
Hey guys, any progress on this ?
for texture atlas Yes but for export more than 12 texture ( that not support in webgl in some mobile device ) no
** solution : that maybe work if we have texture atlas + a tools you can collect other images on one pic
12 textures are enough for me.
I hope the exporter will be updated soon.
Thanks for your work.