I wanted to make the creation of varregions easier so I added some parameters to the ‘load oar’ simulator command. But, while I was in the area, I got a little carried away.
For varregions, ‘load oar’ now has a ‘–displacement “<x,y,z>”’ parameter. This displaces all of the objects and the terrain from the oar file when loading them into the new region. For instance, say you have four OAR files from four adjacent 256x256 regions (oar00.oar, oar01.oar, oar10.oar, and oar11.oar). You create a new 512x512 varregion named ‘bigregion’. The following commands place the four regions of objects, terrains and parcels into the new larger region:
change region bigregion load oar oar00.oar load oar --displacement "<0,256,0>" --merge --forceterrain --forceparcel oar01.oar load oar --displacement "<256,0,0>" --merge --forceterrain --forceparcel oar10.oar load oar --displacement "<256,256,0>" --merge --forceterrain --forceparcel oar11.oar
Note the new “–forceterrain” and “–forceparcel” parameters. “–merge”, used by itself, is for merging together the objects from multiple OARs. Merging also suppresses the loading of terrain and parcel data which is just what you want when merging objects. But, if loading multiple OARs to create a new, larger region, the terrain and parcel information must be loaded. Thus the new parameters.
While I was in the neighborhood, I also added ‘–rotation degrees’ and ’–rotationcenter “<x,y,z>”’. These apply a rotation to all the objects in the OAR file before they are displaced and placed in the new region. The rotation center is relative to the original OAR and defaults to “<128,128,0>”. At the moment, the rotation is applied only to objects and not the terrain or parcels.
Say you have a 512x512 region named ‘bigregion2’ and an oar file with buildings named ‘buildings.oar’ which is from a 256x256 region. The following places the buildings big region rotated 30 degrees without modifying the terrain:
change region bigregion2 load oar --merge --displacement "<128,128,0>" --rotation 30 buildings.oar
The caveat to all this is that it is only in the ‘varregion’ source branch. More testing will make it get into the master branch quicker so test and file those manti.
And have fun with those OAR files.