Hello all, First off, I am attempting to convert an older Rigs of Rods map into BeamNG. I have all of the correct permissions as far as I can tell and it is only going to be a private project for the time being. Secondly, I'm only interested in converting the actual terrain, not the buildings or anything else. I am currently taking the .raw file and converting it using ImageMagick to a .png file for use in BeamNG where I am able to load it into the game in F11 mode, save it as a file, and drive around. Where I'm having issues is with the map surface resolution. After it is converted into BeamNG the surfaces are either too bumpy or everything is too tall/short. How do I determine what the proper .raw file's dimensions (1024x1024, 256x256, etc) or heightmap scale (1, 256, etc) is in RoR so that I can do a 1:1 scale import into BeamNG? Has anyone out there converted RoR terrains over? I am struggling with getting this problem solved before I jump into the work of texturing the terrain. Please help.
You're just going to have to eyeball it as far as I know. Take a screenshot in ror and then compare it. L3DT can alter the height very accurately, just keep changing and then previewing the changes in 3d until it matches. That's how I'd do it.
RoR has the map dimensions in the .cfg (0.39 or earlier) or .otc (0.4) file of the map. PageWorldX/Z or WorldSizeX/Z is the physical size in meters. MaxHeight/WorldSizeY is the height from black to white in the heightmap. Using the same height value should work in BeamNG. The rest depends on the heightmap resolution. If you have a 1025 pixel heightmap and 3000 m scale for example, 3000/1024=2.93 for Meters Per Pixel when importing in BeamNG should have the same result.
So i've opened the [mapname].otc file (.40 version). Shown below: # the amount of pages in this terrain # 0, 0 means that you only have one page Pages_X=0 Pages_Y=0 # the heightmap images # 0.0 means x=0, y=0 -> first page HeightmapImage.0.0=mapname.raw Heightmap.raw.size=1025 Heightmap.raw.bpp=2 Heightmap.flip=1 # The world size of the terrain WorldSizeX=512 WorldSizeZ=512 # the factor with what the heightmap values get multiplied with WorldSizeY=11 # sets the amount of layers defined below Layers.count=1 # the blending layers # Layers.X.size = size in meters of the texture on the terrain # Layers.X.diffusespecular = texture with the following format: RGB = diffuse, A = specular for specular mapping # Layers.X.normalheight = texutre with the following format: RGB = normal, A = height for parallax/bump mapping # Layers.X.blendmap = the blend image to use # Layers.X.blendmapmode = the channel of the blend image to use, valid channels: R G B A # speciality of layer 0: it does not blend, all other layers will be blended on top of this one Layers.0.size=512 Layers.0.diffusespecular=mapname.dds Layers.0.normalheight=mapnamenormal.dds # Sets the default size of blend maps for a new terrain. This is the resolution of each blending layer for a new terrain. default: 1024 LayerBlendMapSize=512 # disableCaching=1 will always enforce regeneration of the terrain, useful if you want to change the terrain config (.otc) and test it. Does not cache the objects on it. disableCaching=1 #optimizations # Minimum batch size (along one edge) in vertices; must be 2^n+1. The terrain will be divided into tiles, and this is the minimum size of one tile in vertices (at any LOD). default: 17 minBatchSize=65 # Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65. The terrain will be divided into hierarchical tiles, and this is the maximum size of one tile in vertices (at any LOD). default: 65 maxBatchSize=129 # Whether to support a light map over the terrain in the shader, if it's present (default true). LightmapEnabled=0 # Whether to support normal mapping per layer in the shader (default true). NormalMappingEnabled=1 # Whether to support specular mapping per layer in the shader (default true). SpecularMappingEnabled=1 # Whether to support parallax mapping per layer in the shader (default true). ParallaxMappingEnabled=0 # Whether to support a global colour map over the terrain in the shader, if it's present (default true). GlobalColourMapEnabled=0 # Whether to use depth shadows (default false). ReceiveDynamicShadowsDepth=0 # Sets the default size of composite maps for a new terrain, default: 1024 CompositeMapSize=1024 # Set the distance at which to start using a composite map if present, default: 4000 CompositeMapDistance=4000 # the default size of 'skirts' used to hide terrain cracks, default: 30 SkirtSize=30 # Sets the default size of lightmaps for a new terrain, default: 1024 LightMapSize=1024 # Whether the terrain will be able to cast shadows, default: 0 CastsDynamicShadows=0 # Set the maximum screen pixel error that should be allowed when rendering, default: MaxPixelError=3 # dump the blend maps to files named blendmap_layer_X.png DebugBlendMaps=0 What It Means: What that means is that after I convert the .raw into a .png I should crop it from 1025x1025 to 1024x1024? When I import the heightmap into BeamNG I should put the height scale to 11 and because the world size is 512x512 ... meters per pixel should what?
BeamNG heightmaps are in powers of two, so crop or resize to 1024x1024. Meters per pixel should be 0.5.
So just to clarify, I should crop to 1024x1024, meters per pixel should be .5, heightmap scale should be 11 and it should import correctly? - - - Updated - - - I have successfully imported the terrain into BeamNG and have taken the mapname.dds and mapname_normal.dds and applied it as a texture to the whole map as well, though everything seems shifted a good 2-5 meters, almost as if the terrain file itself it slightly too large for the texture. So far I haven't had much success with realigning the texture to the map terrain as it seems to have stretched slightly relative to the terrain itself. Any thoughts? Lastly, it was not originally in my plans but is there any way to easily import objects from Rigs of Rods maps into BeamNG maps? If so, is there an easy way to keep them in the same positions on the terrain as they were in RoR, or is that not possible?