Updated: 23 June 2021

A world in Sansar by Mijeka Munro

Möbius John Difool
Möbius John Difool

What would happen if the original “Gone City” Opensim pre-build, made freely available by Ruben Haan (google “gonecity.oar”), would be imported to the preferred 3d editor of your choice (either via DAE or FBX). And then, from there, enhanced by means of physically based rendering, texturing, emission, design, expansion, interactivity, questing and more, suitable for import in Sansar (you probably agree the original design bears evidence of being abandoned at some point and therefore is an excellent choice for a starting point).

That’s what i, Mijeka Munro, intend to do with this project. And you’re welcome to follow/explore my efforts as they progress.

Status: 01-08-20

The “Gone City Prime Millennium” world is Base Template for now, while i try to figure out how to convert OAR to DAE/FBX. Goal is to reassemble the OAR in Blender.

Update: 01-08-20 23:05

I found OARConv (http://www.nsl.tuis.ac.jp/xoops/modules/xpwiki/?OAR%20Converter), to be able to convert the OAR to DAE. It has a Win GUI option. Unfortunately i got errors on every attempt to convert (maybe missing jpeg2000 lib or conflict with win7 => win10)?

It primarily is developed for Linux, so i installed Windows 10’s support for Linux Ubuntu terminal. And successfully, strictly, followed this tut: (https://herzstein.dev/en/how-to-convert-an-oar-to-dae-files/). (I also would like to recommend exploring other content on mr. Herzsteins site, as he has very interesting tuts!)), ultimately giving me the DAE folder with DAE for every single primitive, textures folder as well. So now i am on the search for a DAE batch import for Blender. Also ready to move the files from Ubuntu terminal prison to the easy powers of win10 files system and explorer.

In my research i also found this (https://github.com/Maxwolf/Multimap.OARConv – but, too late to ease my efforts), which also leads to (http://maxwolf.github.io/Multimap/). Edit 11-28-20 11:25: This Github has been shut down.

I post this here as it might could be of interest for any looking to collab on OAR import.

Update: 01-09-20 00:39

I found that a simple command in Linux Ubuntu terminal (“explorer.exe .”), will open up a new instance of explorer enabling me to easily batch copy all DAE, phantom (primitives without physics) and texture files from the terminal to my Blender data path – done! ?

Update: 01-09-20 03:18

I found a python script on the interweb for Dae batch import in Blender:

import os
import bpy

# put the location to the folder where the Dae's are located here in this fashion
path_to_obj_dir = os.path.join('x:\\', 'Users\\Your\\Path\\')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in '.dae'
obj_list = [item for item in file_list if item.endswith('.dae')]

# loop through the strings in obj_list and add the files to the scene
path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.wm.collada_import(filepath = path_to_file)
Gone City - First Blender Import attempt
Gone City – First Blender Import attempt

Sadly, after successfully importing all primitives i found that:

  • The primitives do maintain the sim coordinates relative to the world origin point (<0,0,0>).
  • The primitives do maintain x,y,z rotation.
  • The primitives do maintain primitive type (cube, cylinder, torus, aso..)
  • The Oarconv tool does not maintain textures in materials!
  • The Oarconv tool does not maintain the primitives x,y,z size! ?

I also found the IO Guru (https://blendermarket.com/products/io-guru), that has batch functions.

Update: 01-11-20 17:20

I remembered that the initial conversion of the OAR resulted in a couple of subfolders and one of those with XML files for each primitive. As the XML file data is human readable, it could theoretically be possible to examine and identify the primitives x, y, z size parameter. And I found it (as being: )! So, it should be possible to either find a python script that reads and imports OAR XML into Blender or write a python script on my own.

Update: 01-12-20 16:30

My efforts went nowhere and it seemed that I was stuck! ?

But over the course of a night’s sleep, I came to think of the good old FBX 2013 converter program, which is now well on it’s way to disappear deeper and deeper into Autodesk’s download archive structure, but most likely should be stored in every meticulous designer’s download path, so as it is in my case (it increasingly gets more and more useful)! It’s also possible to load up a batch of files and convert in one go.

So, my idea was to convert DAE to FBX (as i found many interweb talking about blender DAE import being somewhat defunct (2.79b), and i saw that DAE import i another tool using correct import standards would work! ?
I made another folder for the FBX and converted the DAE files into that as FBX files. (I’d most probably be importing only primitives with the “Primitive” leading label, as the others are mostly 3’rd party multi-object items!)

Then i tampered with my python batch import script to support batch import of FBX files:

import os
import bpy

# put the location to the folder where the fbxs are located here in this fashion
path_to_obj_dir = os.path.join('x:\\', 'Users\\Your\\Path\\')

# get list of all files in directory
file_list = sorted(oslistdir(path_to_obj_dir))

# get a list of files ending in '.fbx'
obj_list = [item for item in file_list if item.endswith('.fbx')]

# loop through the strings in obj_list and add the files to the scene
for item in obj_list: path_to_file = os.path.join(path_to_obj_dir, item)
	bpy.ops.import_scene.fbx (filepath = path_to_file)

Notice the importance of the change in line 15 for the fbx import to work correctly!

To my surprise it worked with the extended benefit of material colors and textures imported in the corresponding positions as well – Yay!:

Gone City - Second Blender Import attempt
Gone City – Second Blender Import attempt

Already looking good! So, now there is some raw material to work with in Blender. The upcoming tasks are the following:

  • Use the same procedure to import the non-physical primitives from the “Phantoms” sub-folder (I’d most probably be importing only primitives with the “Primitive” leading label, as the others are mostly 3’rd party multi-object items!).
  • Eyeball emerging single shaped structures and merge them to meshes via boolean operations join them peace by peace (with a preceding “remove doubles” as Opensim/SL has two sets of geometry on top of each other, in every prim. (I’m, to this date, still uncertain why that is?)) and thereby establish useable shapes (in other words turn the primitives into mesh for optimized Sansar import). (So, this is where i once again, as so many times before, am forced to realize that i need to do intensive manual work, to be able to optimize the use of vertici to an absolute minimum in any complex shape. I claim that there is no more effective method than the human brain for this specific task. I’ll also soon add a video highlighting my “prim to mesh shape” workflow).
  • The boolean operations help keep the texture UV in place! (I’ll have to correct them on the larger surfaces, as i want to preserve those. The smaller surfaces are often covered by adjacent geometry so there is mostly no need for correction). ?
  • Turning existing textures into PBR (diffuse-, normal-, roughness- and metallic maps) such as we are accustomed to use in Sansar. Eighter by finding/using replacements or designing from scratch.
Gone City - Homed in on the nice bar
Gone City – Homed in on the nice bar

Before attempting to import the non-physical primitives i realized that those would block the view to eyeball the existing structures and therefore i decided to import in a second blend file (Also, because the, up till now, imported amount of primitives have already an impact on Blender performance. That will of course change along the path of converting primitives into mesh, as there will be les objects then!) ?

Update: 01-13-20 00:25

Selected the flooring of the plateau with the nice bar (named “Cafe floor”) as my first multiple prim selection to convert into a single shaped mesh. In the image i already joined 5 segments and removed the now obsolete “inner” topology. As you can see, I parented to have some easy hide/unhide option in Blenders outliner ([CTRL + LMB] on the parent object’s eye icon and [CTRL + LMB] on the parent object’s object icon to select/deselect all in that hierarchy):

Update: 01-26-20 19:51

Gone City - First mutliple prim to mesh shape selection
Gone City – First mutliple prim to mesh shape selection

I got a bit side tracked lately, as i needed to work on the design, theme and css of this website. So i lost some of the latest updates and have to rewrite them. But i managed to edit a short video on how i work with Blender to turn the now readily imported prims into easy manageable chunks of Sansar compatible mesh objects! (1010.66 – Just a reminder to self)

Update: 02-02-20 15:37

I started to import the phantom prims, and thought my custom fbx batch import script wouldn’t work anymore (but the issue was that i had optimized my file-path structure a bit since last edit). So the new file path just needed to be updated in the script as well.

So, along with this, i already had reached out on the interweb for advice. I stumbled upon this: https://blenderartists.org/t/import-multiple-fbx-files/692391. And from that to this: https://blenderartists.org/t/fbx-bundle/1102475. And finally this: http://renderhjs.net/fbxbundle/.

It’s “FBX Bundle”, a Blender 2.79 addon (not available for 2.8 yet). It can batch import (FBX, OBJ and 3DS) and export objects in bundles. It is very tool extensive, when it comes to exporting object bundles: Support for gITF, Unity and Unreal. Can draw grease pencil “fences” around your setup bundles with padding. Automated pivot placing, modifiers (offset, copy, merge (yes, auto-merge groups of meshes into one bundle-mesh), additional simplified geometry collider mesh (yes, useful for Sansar physics/collision component), offset, copy, LOD, path renaming, even vertex color based ambient occlusion (not supported in Sansar). This is easily a must have for Unity/Unreal users!

This is a great addon in conjunction with the Autodesk FBX converter if you want to automate batch import of dae or other formats into blender! No need to copy paste the above mentioned python code anymore just install the addon into Blender and save your config. A guide on installing is also included on the “FBX Bundle” addon page. ?

UPS – Well, here is the previously promised YT tutorial witch is highlighting my tidios manual work-flow, converting SL/Opensim prim objects into Sansar supported mesh shape (Youtube/Vimeo videos still don’t work in my lightbox, though! Workaround: Click on the up arrow in the lightbox popup to go to youtube. I’m currently working on a fix):

The OAR import results in two sets of prim mesh occupying the same sets of coordinates (space). Seams to me the double is the collision mesh(?) Unfortunately the “Remove Doubles” doesn’t always get rid of the extra vertices, as some are offset far enough from each other to avoid the initial Blender set threshold for double vertices recognition! So either:

  • I could find out how set a more suitable threshold for my “Remove Doubles” operation.
  • Perform a tidios manual merge of predicted vertices (eg go into vertices mode, shortcut “a” (ensure to deselect all vertices) => “b” (box select) and eyeball drag-select vertices (You probably only see one. Therefore, “Limit selection to visible” must, of course, be deselected, and be careful not to, accidentally, box-select unwanted vertices from other areas in the 3d space) => “ALT + m” (open merge popup menu) => “LMB” (select “Merge at Center”)), as i don’t see no other 100% working option to remedy this for now. This has to be done on every imported mesh, so another batch operation is clearly needed (again i hunt for a suitable Python script on the interwebs! 

Overlapping faces

If you ever imported mesh assets from the interwebs into Sansar, converted or not (eg Sketchfab, TurboSquid, CGTrader..). That same double vertices phenomena might bother you! Your imported object in Sansar might show with similar artifacts as you see in the “Overlapping faces” image:

Status: 02-06-20 22:03

New plan – new direction: Recently, I have compared various reactions and recommendations on Sansar’s discord server and the work processes needed to achieve my goals in relation to what I’m actually getting out of the effort.

Basically, I have come to the conclusion: While most of the available material is not to be used directly as objects, but more is meant as a source of inspiration, then it is not worth the effort of going thru such amount of manual and time consuming hassel!

Instead, I will begin to outline / model a new labyrinthine multi-level cyber city, based primarily on the “Gone City” model theme and one of my main sources of inspiration: Möbius’ Incal cities.

I still want to maintain the idea that people can follow developments closely by logging into the “Gone City Evolution” world in Sansar. So it will still stay online, and reflect my progress.

This website uses cookies. By continuing to use this site, you accept our use of cookies.