To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10835
10834  |  10836
Subject: 
Re: 3ds Max Import Script
Newsgroups: 
lugnet.cad.dev
Date: 
Sun, 4 May 2008 08:47:41 GMT
Viewed: 
10046 times
  
   What I did find was in the File Format Specification, under the section on Line Type 1:

“Sub-files can be located in the LDRAW/PARTS sub-directory, the LDRAW/P sub-directory, the LDRAW/MODELS sub-directory, the current file’s directory, a path relative to one of these directories, or a full path may be specified. Sub-parts are typically stored in the LDRAW/PARTS/S sub-directory and so are referenced as s/subpart.dat, while hi-res primitives are stored in the LDRAW/P/48 sub-directory and so referenced as 48/hires.dat.”

To restate this, the LDraw system has a standard directory structure like this:
LDRAW/
|--- MODELS/
|--- P/
|    |--- 48/
|--- PARTS/
     |--- S/
And your importer should search the directories for subfiles in this order:
  1. LDRAW/PARTS
  2. LDRAW/P
  3. current directory
There is also some information about different “types” of files in the parts library at File Types FAQ.

Does this help?

Steve

Hi Guys, thanks for the feedback, what I’ve done is basically take both suggestions and merge them.

Basically what I’ve observed so far is that not all parts in the “Parts” folder have the LDRAWORG meta tag (which denotes the type of file, part, primitive etc...). So I’ve basically said at this moment, if it is an “LDRAWORG Part” or the source files lives in the PARTS\ folder then it is “brick” primitive and needs to be “welded” into a single mesh object. This can significantly reduce the vert count and make max run A LOT smoother.

For example, part 3005 (1x1 Brick) takes 942 ploys and 1512 verts to construct (the vert count is so high because of the lines, each line has 24 verts :P) in its primitive form. When the overlapping verts are welded, I get 1393 verts instead, saving some 200 verts. Doesn’t sound like much, but it adds up quick. Plus, max can handle the “joined” elements much better. The car model use to crash max after awhile, now, it’s smooth as...

It also makes it easier to manipulate and apply animation constraints to many of the parts.

I can’t wait to rig a mini fig...but I have quite a bit more work to do before I get there...unwrapping and texturing are on the list somewhere there...



Message is in Reply To:
  Re: 3ds Max Import Script
 
(...) Hi Shane, This sounds like an interesting project. And useful. :) (...) I think any user of autodesk tools has cursed their name at some time or another. ;) (...) And, if you wanted, you could replace some of the imported "primitive bricks" (...) (16 years ago, 3-May-08, to lugnet.cad.dev, FTX)  

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR