-Please mention anything that looks wrong.- What this tutorial shows you how to do- -Create the basic stuff in World Machine- -UV it in Blender- -Get the distant terrain in game with textures- _________________________________________________________________ What tools and resources are needed- -Blender -World Machine, preferably not the free version that is capped at 513x513 pixels -the attached zip - medaifire link for those with attachment problems http://www.mediafire.com/download/af8cgl100zt1n5s/distant_terrain_stuff.zip What preexisting knowledge is needed- -no Blender experience -some World Machine experience -some Beamng map making experience _________________________________________________________________ Examples of distant terrain- _________________________________________________________________ First, we will start in World Machine. Instead of trying to explain this aspect, I believe that it would be best for you to look at how things fit together. Therefore, the World Machine file used to generate the distant terrain shown in the picture at the top of this post is included in the attached zip. However, some things should be noted. For a distant terrain, 3 files are needed from world machine. ---Please note the file names and formats shown in the pictures. If you would like for your textures to work with the material.cs included in the attached zip, you will need to keep the current names. -the first of these files is the mesh output. -the second is a bitmap output of the image generated by the normal map maker. -the third is a bitmap output of your terrain's texture. For the sake of simplicity, this tutorial simply uses the basic coverage macro to create this texture. To generate the above files, you will need to build your world with two different resolutions. -First, build your terrain on a high resolution such as 4096x4096. You could build your terrain at 512x512, but you wouldn't get a very nice product. After your terrain has been built, export the second and third things mentioned above. -Second, build your terrain on a low resolution such as 64x64. After your terrain has been built, export the mesh output mentioned above. -Now, you should have a normal map, a texture, and and an .obj. _________________________________________________________________ Secondly, we will run it through Blender. -Start by deleting the default Blender things and importing the exported .obj from World Machine. -Usually, the imported .obj will be off by 90 degrees. Right click on the mesh, hit r, hit x, type -90, and hit enter. The .obj will now be level. -Enter edit mode. -Change the viewing perspective to Ortho by clicking the view/view Perspo/Ortho. -Change this windows view to "top." -Open up a second screen in blender using the button shown in the picture. -Change this new window to the UV/Image editor. -Create new material in the upper right and name it "distantmacro." -Open the terrain texture created in world machine by clicking image/open image. -Scroll out with your mouse to see it like this. -Reenter edit mode in the left window. -Bring up the texture in the left window. -Click "A" on your keyboard over the terrain texture to select it. It should become a bright orange. -Now, on the left window, click mesh/ UV unwrap... /Project from View (Bounds). -Change the shading on the mesh to smooth. -Export the mesh in the .dae format. Select "include uv textures" and "copy." For now, the export location doesn't really matter. Just export it to some place that you can remember. My documents folder is a pretty bad example of such a place. _________________________________________________________________ Lastly, we will get our distant terrain into Beamng. -This section of this tutorial is based on the idea that your map is a wip. Therefore, your map should be sitting unzipped in documents/BeamNG.drive/mods/levels/yourlevel'sname -Create a file named "distant" under documents/BeamNG.drive/mods/levels/yourlevel'sname/art/shapes -Place the Blender .dae, the normal from World Machine, and the texture that bender tossed out in this "distant" folder. Please note that my .dae is named "untitled." -Also, place the material.cs and detaildistant.png that are included in the zip at the end of this tutorial in your "distant" file. -Open Beamng and enter your level. -Place the .dae in your map. You will need to scale it up. Personally, I prefer up-scaling the distant terrain in Beamng, but this scaling could also done in Blender. -Be happy! You should have a distant terrain now.
Thank you so much Ouerbacker. I can't wait to get home and give this a shot. The 90 degree thing was giving me fits! EDIT: As is normal I ran with a map I'm working on and the 64X64 mesh stops scaling well before even approaching the dimensions of a 4096 map. I presume the 64X64 mesh was specific to this tutorial and I can go with a 256 or 512 mesh? I will also look into scaling up in Blender. Overall I like this and it's a great path forward for me.
The 64x64 is more of specific thing. However, it alone is around 7000 triangles. Keep in mind that the normal texture will fake most shadows and details. Could I see what your world machine file look like? I might be able to offer some better advice after I see it.
If you want to go a step further I suggest you import your actual terrain into the blender file and then match up your distant terrain to the edges of it. You can also do a top down screenshot ingame and use that to blend the visuals together more.
Got the T3D scaling figured out, not paying attention as usual. Diffuse and normal maps look quite nice at this point. Would collision on this mesh be a tax on performance?....not that it matters just curious.
This does not directly answer your question, but at least one or more of the backdrop meshes used in Hirochi Raceway have collision turned on.
Welp, I never thought of that. Suppose I could turn on visible mesh collision and see for myself eh? Thanks!
You're welcome, but I mis-spoke. It's East Coast USA which I was thinking of. It may also be true that Hirochi Raceway is like that, but East Coast USA definitely has collision turned on for at least one backdrop mesh.
If you're interested in further optimization, you could look into using Blender's retopo tools to make the topology a little more sparing, and only add detail where you need it.
A much easier way to make a distant terrain is to import a heightmap, enlarge the terrain's square size, and move the terrain you want to be contactable to the bottom of the scene tree. However, this tutorial is very detailed and helpful.
This sort of thing can have it's advantages over using an additional terrain: no foolishness with the terrain manipulation tools deciding to edit/highlight the wrong terrain collision! (eg you can make bounding walls outside you terrain, city streets, whatever...) no heightmap restrictions means that you are free to create overhangs, tunnels, etc - stuff that's currently impossible with a heightmap terrain in BeamNG.drive. There are probably other good things that I haven't thought of. I'm excited and happy to see this tutorial. It covers many things I'm not familiar with.
I'm pleased the distant terrain demising line can barely be noticed. Thanks again Ouerbacker! Having a ton of fun with this and I can't wait to test all the ideas others have posted.
The difference between 64K and 128K is jaw dropping. Both have the same 4096 maps. 64K left-128K right.
The 128K was purely an experiment and a fun one at that. Regardless, the file size is a ridiculous 133MB or so for that one object. That mesh is 32K (4.1MB) polies versus 7.9K (1.3MB) for the 64K (according to Blender). The big deal in my mind is the outrageous file sizes of the textures at 4096. As .png's the diffuse and normal maps are around 60MB EACH, I assume a conversion to .dds with compression could help? Noobing here. I do gotta' say though, that 128K distant terrain scaled to 16184X16184 looks really nice.
I'm not too knowledgeable on these matters, but I'd imagine that 64K terrain could look a lot better with some good normal mapping.
The 4096 normal map is quite detailed and seeing how it handled a more detailed mesh (double in this case), was the goal with the 128K terrain. From what I've seen a 4096 normal map would be good enough to cover a mesh detail that matches or perhaps rivals the mesh density of a regular drivable 4096x4096 map. I have no idea what that density would be except to say a distant terrain could theoretically have the same detail as a 4096 Trynelgren and you wouldn't be able to tell the difference....except for the two IBM Watsons in the back yard running it. The 64K mesh is meant to hold down CPU usage while providing a basic look of distant terrain. Doing that with a 4096 texture is excellent for long range vistas and quite adequate for the effect it provides. I just had to take it further and into 'sillyville'. Hope this makes sense.