Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Full Prim importer - How to do

property Resistance
Registered User
Join date: 19 Nov 2005
Posts: 10
03-24-2006 08:14
Hi all, i thought i cross post something i outlined in the feature forum here as it seems people look for an importer of full primitives versus the facet based obj import.

A working approach is the following:

1/ Choose an external 3D editor with capability to create own editable 3D objects (MAX in my case).

2/ Analyze the behaviour of the primitives in SL and remodel them as objects in the external editor. As example: I represent the SL BOX prim in Max as a cube of which i substract a cylinder, triangle or box depending on hole size and shape. Then i substract another polygon for cut begin-end and apply a pre defined modifier stack to this to represent the other box properties. All this with a tool panel that is comparable to the object tab in SL. I can then use the same parameters i use in SL to modify the custom object.

3/ In the external editor define how the SL style objects will be saved and create an export function for a whole scene. Like for the box in MAX, save the object parameters as floats in a text file.

4/ Copy the file to a notecard

5/ Read the notecard and reproduce the external editors scene by using llSetPrimitiveParams(...) using the attributes stored i nthe notecard for each successive prim.

6/ view the result

This also works with UV coordinates yet some artefacts of Sl are not reproducable in MAX for instance. This is a result of the inaccurate placement of vertices when transforming basic prims in SL.

The workload here is not on the LSL side of life, but on the editors side of scripting. The LSL of this is fairly simple.

As caveat i found, that due to the restrictions of this method, especially in texturing precision, it is faster to build directly in SL. I can yet see good use of this when designing hard to edit structures like jewlery. Here yet a full set of external editor objects with almost all editable prim attributes would be needed to work efficiently.

Another caveat is that you are not able to import existing models, you have to build for SL "from scratch". Importing existing models would be the target of the obj facet importer, yet create prim heavy stuff.

The pro of this method is that you work on the primitive level directly, have a powerful editor at hand and import full primitives, not primitives as substitute for facets.

As remark: There are of course several ways to export prims from SL to such an external editor.

Have fun :)

PS: Busy bulding atm. If you have questions, please im me when i am online in sim :)
Trep Cosmo
Registered User
Join date: 3 Mar 2005
Posts: 101
03-24-2006 13:43
Alright, here's an idea that I'm suprised the elite coders of SL haven't picked up on:

Write a plugin for a 3D package to export prims.

Now I know all 3D packages have some form of primitives. They pretty much all have the basic prims we have in SL. So why couldn't an exporter be written that'd simply write out a plaintext file describing the primitive?

Before y'all go crazy on me and complain that not everyone can afford $10000 uber 3D packages, what about Blender?

Is this something that's doable?
_____________________
"There is no 'I' in team, but there is a 'Me' if you scramble it." -- House
Thraxis Epsilon
Registered User
Join date: 31 Aug 2005
Posts: 211
03-24-2006 15:25
You would be better off modifying a Quake map editor for that purpose. As they work with brushes. (QUARK might be a good start). The biggest issue would be to provide for the Prim style that SL uses in a quake style map editor.
property Resistance
Registered User
Join date: 19 Nov 2005
Posts: 10
03-24-2006 17:44
Hi Trep :)

From: Trep Cosmo
Alright, here's an idea that I'm suprised the elite coders of SL haven't picked up on:

Write a plugin for a 3D package to export prims.

Now I know all 3D packages have some form of primitives. They pretty much all have the basic prims we have in SL. So why couldn't an exporter be written that'd simply write out a plaintext file describing the primitive?

Before y'all go crazy on me and complain that not everyone can afford $10000 uber 3D packages, what about Blender?

Is this something that's doable?


That is what i wrote my post about. It is doable and i have done it in a small scale, i.e. only with box and sphere prim and only with a limited set of modifiers.

There are also various ways to export prims or structures from SL to offline applications :)

Thraxis, hi :) - i completely agree with you, an ideal client for using the method i proposed is any open source 3D editor :)

Have fun :)
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
03-24-2006 18:34
From: Trep Cosmo
Alright, here's an idea that I'm suprised the elite coders of SL haven't picked up on:

Write a plugin for a 3D package to export prims.

Now I know all 3D packages have some form of primitives. They pretty much all have the basic prims we have in SL. So why couldn't an exporter be written that'd simply write out a plaintext file describing the primitive?

Before y'all go crazy on me and complain that not everyone can afford $10000 uber 3D packages, what about Blender?

Is this something that's doable?
Check post #7 in this thread, complete with screenshot from Blender:
/8/ad/80195/1.html
Trep Cosmo
Registered User
Join date: 3 Mar 2005
Posts: 101
03-24-2006 19:38
From: DoteDote Edison
Check post #7 in this thread, complete with screenshot from Blender:
/8/ad/80195/1.html

Yeah, figured Jeffrey Gomez is workin' on it. Since he was the one that made the importer script I was referring to. lol
_____________________
"There is no 'I' in team, but there is a 'Me' if you scramble it." -- House
property Resistance
Registered User
Join date: 19 Nov 2005
Posts: 10
03-24-2006 23:40
Thanks for posting the link, i only knew of the obj importer. More research could have saved me some time and avoiding this newbie mistake :)

Thanks again :)