Library: 3D Model Importer (Beta and Disclaimer)
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
09-30-2005 21:39
Hm. I originally saved this myth for IM, but let me debunk it publicly. The script itself (the one I posted, anyway) is limited by the size limit of the script itself. This was intentional, for exactly the reasons described (automated prim bombing). Of course, a few people, like Chris (above), have released notecard-driven versions. These place the cap much higher for data, from ~4k (data plus script itself) to a a full 16k. Now, 16k of data isn't a heck of a lot. Even with masterful compression, you can only fit a few hundred prims in one iteration of the script, not several thousand unless you're trying very hard to hurt a sim. The original version of the script also prevents those prims from crossing sim boundaries after talking with Xylor about XyObject. To give you an idea, the largest model I have been able to import was 950-some prims, and took around 7 - 9 scripts (and two hours of my time formatting) to import. Long story short, the only way to feasibly do something like this is to rez several copies of the object on purpose, which *would* be prim bombing. Bombing itself is actually not too hard for most people to figure out, requiring a simple while(TRUE) and rez operation. Counterpoint, this is not the first (or last) tool of its kind. Always use discretion, both in using the tools provided as banning those trying to ruin your good time. As with most of my scripts, I've done everything possible to prevent abuse and keep the script open and free short of not writing it at all. If you spot a bug or a glaring flaw in my code, please bring it to me personally. You may even be entitled to a reward if you do. 
_____________________
---
|
Saaph Pasternak
Registered User
Join date: 28 Nov 2005
Posts: 1
|
Doesn't seem to work for me.
12-06-2005 03:52
I have created a Cube Prim with this code 3 files another cube called Prim Face, and 2 notecards vertices and faces (filled with example files). What I get is 119 Prim Face Cubes all on top of one another in the center of Facemake cube.
It doesn't seem like the Prims are being moved to proper places.
Can't see what I am doing wrong. This is the same result as I got for the original List based version.
Gregg
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
12-10-2005 14:57
Saaph: In the original (posted) version of these scripts, there is a minor bug. The vertices and faces need to be separated by a single space only, and max at six decimal places. For example: // Note these coordinates are made-up for sake of example // Don't try using the actual numbers
v 12.000001 1.555555 8.067582
f 2/2/2 3/3/3 4/4/4 Chris, the author of the notecard version, had the same problem. It's a small bug that could potentially be fixed with llParseString2List, and something I'll fix in a future version of this script I plan to write. 
_____________________
---
|
TonyRockyHorror Hauptmann
two-for-one special
Join date: 5 Nov 2005
Posts: 76
|
01-10-2006 16:09
i want to see screen shots of something rezzed IN GAME using this!
|
Varka Doesburg
Registered User
Join date: 12 Dec 2005
Posts: 1
|
01-12-2006 17:35
Okay, had a good mess around with these scripts this evening. Had good success from the version 2 script, once I worked out that 3dsmax does not export OBJ's correctly... I've found the best way of getting an object into SL is by converting it with Milkshape. Export it from 3d studio max in 3DS format, then import into Milkshape. Then export as .OBJ, copy-paste the relevant stuff, and you're away! This is going to be good, especially as I can now import models from games (Doom 3 anyone?  One more question - any bright ideas on texturing these things? Still simpler to UVW unwrap, then individually upload textures for each face? An automatic alignment script would be cool. I'm getting the hang of scripting, but alas it's going to be a pain working out how to do the required actions in SL. Anyway... thank you very much for this truly great script! Thanks, Varka
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
01-14-2006 14:08
From: Varka Doesburg One more question - any bright ideas on texturing these things? Still simpler to UVW unwrap, then individually upload textures for each face?
An automatic alignment script would be cool. I'm getting the hang of scripting, but alas it's going to be a pain working out how to do the required actions in SL. Yeah - I tried. Prim warp was preventative to UVs uploading properly. Sorry!  Glad you liked the script.  Re, Luci: Link to jEdit fixed. Thanks! I thought I checked that....
_____________________
---
|
Luci Sullivan
Registered User
Join date: 15 Nov 2005
Posts: 9
|
01-16-2006 15:08
Actually, it's www.jedit.org not .com. Just a heads up for anyone that was looking for it. 
|
Yonatan Pierterson
Registered User
Join date: 25 Dec 2005
Posts: 1
|
Doesn't seem to work for me either
01-19-2006 12:21
Hiya
I tried this script with the example faces and vertices data, but I am still getting the same problem as Saaph Pasternak did. I get a big number of cubes on each other, and nothing else. Also, I receive a message from SL daying that "Objects in parcel are unable to be created because the parcels they are being created on are full. Notifications from this region are temporarily deactivated."
What is this supposed to mean?
|
Yonatan Pierterson
Registered User
Join date: 25 Dec 2005
Posts: 1
|
Does not work for me either
01-19-2006 13:04
Hi
I get the same result as Saaph. I am using the example notecards, and I get the following message from SL: "Objects in Bora are unable to be created because the parcels they are being created on are full. Notifications from this region are temporarily deactivated."
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
01-22-2006 10:49
From: Yonatan Pierterson *
What is this supposed to mean? It means you're trying to "import" an object that has too many prims for the parcel you're working with. Check the land you're on by clicking the name of it on the top of the screen. Because every face becomes one prim (or more), this is only the sort of toy to be using in sandboxes or rather large sims unless you know what you're doing. It's far from perfect, so the syntax you're using might be affecting the import. I'm in the process of rewriting the whole shebang as part of another project of mine. Please stay tuned.
_____________________
---
|
Horseman Schnook
Registered User
Join date: 22 Dec 2005
Posts: 4
|
02-01-2006 15:04
I dig the script and hope to work on one that will work with Maya. I am currently studing scripting in college and thought of creating a mel script for importing before I found yours. Great work and keep up the cool stuff.
|
metaissance Maladay
Registered User
Join date: 11 Mar 2006
Posts: 10
|
03-15-2006 09:41
Hi Jeffrey,
SL Noob here. Was just trying to figure out how to do this and see you have already done it (import script from Blender). Any luck with the nurbs?
Anybody made an attempt at a simple custom OpenGL based modeler for SL that would export and import scripts?
Meta
|
Shuya Serf
Registered User
Join date: 30 Apr 2006
Posts: 11
|
O dear
05-07-2006 03:26
Hey guys, what i can see looks to be really good and interesting, i also have been modelling in various 3d programs and have been wondering if something like this exsisted. Now that i have found it, i have no idea how to use it  im new to SL and not quite sure how to get this script working. The instructions on the script confuse me alot and was wondering if some one could give me a step by step guide from the beginning. Cheers 
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-30-2006 17:28
Hmm. It seems like a ton of effort is put into parsing the format in LSL itself, but it would be a lot easier just to have the user convert to an LSL-friendly format ahead of time before pasting. It would be incredibly easy to do the following text conversions (for example) outside SL: "v x y z\n" -> "<xTrunc, yTrunc, zTrunc>,\n" (where 'xTrunc' is the x-coordinate truncated to six decimals) "f v1/v2/v3\n" -> "[v1, v2, v3],\n" If you think people would have dififculty doing this, you could even write an incredibly simple Perl script to do it and host it on some webserver. Once you require that small feat from the user, your LSL will trim down to only the essentials that are peculiar to SL (i.e. rezzing boxes, converting the coordinates of triangle vertices into prim parameters, and doing the actual prim manipulation).
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
Eliminate OBJ Specific Parsing
07-30-2006 17:30
Hmm. It seems like a ton of effort is put into parsing the format in LSL itself, but it would be a lot easier just to have the user convert to an LSL-friendly format ahead of time before pasting. It would be incredibly easy to do the following text conversions (for example) outside SL: "v x y z\n" -> "<xTrunc, yTrunc, zTrunc>,\n" (where 'xTrunc' is the x-coordinate truncated to six decimals) "f v1/v2/v3\n" -> "v1, v2, v3,\n" If you think people would have dififculty doing this, you could even write an incredibly simple Perl script to do it and host it on some webserver. Once you require that small feat from the user, your LSL will trim down to only the essentials that are peculiar to SL (i.e. rezzing boxes, converting the coordinates of triangle vertices into prim parameters, and doing the actual prim manipulation).
|
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
|
10-11-2006 18:46
Ok, is this a program or a script and if it is a program, the link is gone, so where do I download it?
|
Spider Mycron
Registered User
Join date: 25 Oct 2006
Posts: 133
|
10-25-2006 16:15
HI , even thanks is not fair to you .. you just did such a wonderful great job, i'm going to try it and thanks alot ... keep up and let us know if any new update 
|
Spider Mycron
Registered User
Join date: 25 Oct 2006
Posts: 133
|
10-25-2006 16:19
hi, alot of Thanks to you is not fair , i'm very impressed to get this and you just do a very great jpb, let us know please if you kindly make any new update ...
will try this script soon
Thanks so much
|
Indigomontoyaa Cagney
Registered User
Join date: 18 Dec 2006
Posts: 1
|
i agree tutorial
12-18-2006 15:02
Hey i agree i am getting a little lost of where to put these scripts in SL so perhaps someone that is kind and knows what they are doing can put together something real quick to show us what to do!
|
Taz Sterling
Registered User
Join date: 8 May 2006
Posts: 0
|
Jeffery Gomez you're a Genius
01-28-2007 13:41
you're a Genius Jeffery
|
Khons Ra
Registered User
Join date: 12 Jan 2007
Posts: 1
|
error question
02-09-2007 06:11
I was trying out the Omega notecard version of jeffery's script and keep getting an error of
ex: Facemaker: Error: Vertex -125 required by face on line# 0 is not defined in the vertex notecard.
Is there something I'm missing that I needed to insert on "line# 0" before the data input, or is it simply because the number values aren't matching up?
|
Khons Ra
Registered User
Join date: 12 Jan 2007
Posts: 1
|
error question
02-09-2007 06:21
I was trying out the Omega notecard version of jeffery's script and keep getting an error of
ex: Facemaker: Error: Vertex -125 required by face on line# 0 is not defined in the vertex notecard.
Is there something I'm missing that I needed to insert on "line# 0" before the data is input or is it simply the number values aren't matching up?
|
Khons Ra
Registered User
Join date: 12 Jan 2007
Posts: 1
|
notecard version error
02-09-2007 07:52
I was trying out the Omega notecard version of jeffery's script and keep getting an error of
ex: Facemaker: Error: Vertex -125 required by face on line# 0 is not defined in the vertex notecard.
Is there something I'm missing that I needed to insert on "line# 0" before the data is input or is it simply the number values aren't matching up?
|
luci Cortes
Registered User
Join date: 17 Feb 2007
Posts: 1
|
02-18-2007 09:02
ok i've spent the last hour fiddling with this with no luck .. i've made a simple tube in blender .. exported to obj .. i use text pad to macro the faces and verts ... make a card called faces - paste the faces in make a card called vertexes - past the verts in ( with and without the vn 's ) make an obj called Prim Face make an object ( i called it face maker ) put the notecard objcreation code ( v3.1 ) in the facemaker put the 2 notecards and the Prim Face obj in the facemaker when i click the facemaker , it wiggles around a little , then i get the "facemaker compleate" but no tube  concidering this post started well over a year ago i'm guessing that much better ver of the script is out their , but i'm stumped.
|
Slobeck Tuncsik
Registered User
Join date: 30 Dec 2006
Posts: 1
|
In case people didn't know:
02-20-2007 00:02
there's currently a 1.0 release of a script called "primBuilder" for Blender - a very powerful, if a bit odd, open source 3D package... blender can be got from blender.org and the primbuilder comes from sourceforge. I've been messing with it, and it's definitely a nicer way to make things. There's an in-world importer that is being given away by the author. You just build, save, open the file in a text editor, and cut and paste it into a note card in SL, then drop the note card on the importer, and the object rezzes. -- not to detract from this effort. I'd rather be able to just model and import obj's, but each poly as a prim? That's gonna be murder on the sims. I hope this can develop though, good luck!
|