[Opensim-users] Exporting prims from OpenSim into a popular 3D format - .OBJ, COLLADA, whatever
Toni Alatalo
toni at playsign.net
Tue Apr 10 20:02:33 UTC 2012
On Tue, 2012-04-10 at 19:07 +0000, Miller, Peter wrote:
> There's the freebie Meshtastic and a commercial version on SL Marketplace whose name escapes me but is somewhat more performant. I suspect that neither would function on the scale you require though.
Opensim itself makes meshes from the primdata as a part of the server
side operations. To feed the ODE physics engine with the mesh geom for
collisions.
This is made using the open source PrimMesher lib (by Dahlia originally
AFAIK).
Saving a mesh to OBJ or Collada is quite simple. Would not be an
impossible job at all to implement saving a scene as e.g. OBJ or Collada
in Opensim (e.g. a console command). Or writing a standalone converter
that can read OAR/IAR and generate the mesh geom accordingly. At least
for the basics first. When Lasse wrote primdata -> mesh generating code
for the realXtend Naali viewer here, it reportedly took one afternoon to
port the C# primmesher code to C++ and make it use the OGRE api to
create meshes for display.
For this saving / conversion tool, it would be even simpler as can use
the well known and mature PrimMesher C# lib. OBJ is a very simple (even
simplistic) text file format, and there are libs for Collada and that
xml is not bad to output especially for this limited need just with
normal xml tools either (you don't need for example skeleton bone
structures and skeletal animations etc which are more complex than just
static geometry).
We have been testing alternative client technologies for a browser based
virtual worlds client (see the report draft in
http://www.realxtend.org/webnaali/research/ - there's demos with WebGL
and Flash's new Stage3D). We use existing open source 3d engines there
(GLGE with WebGL and Away3d with Stage3d currently). Neither of those
knows anything about SL prims, so to load existing prim-based
Opensimulator scenes we'd also need to convert them to meshes somehow.
We've been using Collada with GLGE and .OBJ with Flash-AIR/Away3d, so
exactly the same formats that would work for you, work for this
put-scene-to-webbrowser need too. That's why we've given it some
thought, and are interested in working on it soon enough I hope.
If you or someone wants to give a shot I can perhaps help, there are
also many others around who could do this I think (almost any opensim
dev probably at least with a little study).
BTW very cool to hear about the TV production related use from the
original poster -- virtual worlds and movie etc. production can be a
nice mix I believe. (as machinima has of course always demonstrated but
also new ways are there being found)
~Toni
> ________________________________________
> From: Miller, Peter
> Sent: 10 April 2012 20:02
> To: opensim-users at lists.berlios.de
> Subject: RE: [Opensim-users] Exporting prims from OpenSim into a popular 3D format - .OBJ, COLLADA, whatever
>
> ________________________________________
> From: opensim-users-bounces at lists.berlios.de [opensim-users-bounces at lists.berlios.de] on behalf of Gwyneth Llewelyn [gwyneth.llewelyn at gwynethllewelyn.net]
> Sent: 10 April 2012 19:48
> To: opensim-users at lists.berlios.de
> Subject: [Opensim-users] Exporting prims from OpenSim into a popular 3D format - .OBJ, COLLADA, whatever
>
> Hi,
>
> After years of reading how to copy content between SL and OpenSim, as well as doing all kinds of content backup in all possible formats, and reading volumes of information on how to import sculpties and/or meshes developed on application X (name whatever application you wish), I couldn't find anything about exporting prim content from OpenSim (or Second Life, for that matter) to a popular 3D format that could be used by any 3D modelling tool.
>
> There is a reason for this. One of our projects (two OpenSim regions) was seen as good background for a TV production. Now the producers need those buildings in a standard 3D format to upload to their CGI software to do special effects. Since all those objects (except for one or two sculpties) only exist as OpenSim prims, how can I export them to, say, .OBJ, Collada, .DXF, or any similar 3D format?
>
> OAR/IAR are really just meaningful in the SL/OpenSim world. They're completely meaningless for any other 3D software, because they're so closely tied to the way SL/OpenSim store prim/mesh data.
>
> I found a reference back in 2010, where some people had some limited success using GLInterceptor with the OGLE plugin (the website for OGLE has been down since mid-2010, but there are still ways to get copies of it). The idea is the following: when the SL Viewer generates the mesh data for a scene, it sends OpenGL commands, which get intercepted by GLInterceptor, and are written on a file. OGLE apparently "recombines" those commands so that they are mapped to object meshes, which can be saved to any popular format. This allegedly works for simple objects, but I really have no idea — because of the possibility of content theft, all information regarding "success" with GLInterceptor/OGLE is really not much available.
>
> Obviously the best solution would be an OAR/IAR-to-OBJ conversion tool, but if such a tool exists, Google cannot find it :) I suppose it's something worth developing one day, but it would take far, far too much time. As said, the way objects are described in OAR/IAR make little sense outside the SL/OpenSim context. Turning them into real mesh data, in whatever popular format, is a highly complex operation — in effect, it amounts to developing a 3D renderer from scratch that works on SL/OpenSim data! As you all well know, almost every SL viewer out there uses the LL rendering engine. Radegast is one exception. Does it save objects to .OBJ?
>
> So... I know that most of you are only worried about the reverse problem (how to get your fantastic 3D models uploaded via mesh import into OpenSim), but I wonder if anyone actually had the need to do the reverse operation — build in OpenSim, export to .OBJ — and, if so, what tools were used to accomplish that feat?
>
> It would be a pity to be forced to recreate everything from scratch :-( Not to mention the time it takes...
>
> Thanks in advance for any input!
>
> Cheers,
>
> - Gwyn
>
>
> --
> "I'm not building a game. I'm building a new country."
> -- Philip "Linden" Rosedale, interview to Wired, 2004-05-08
>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
More information about the Opensim-users
mailing list