To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 9830
9829  |  9831
Subject: 
Re: Lego XML?
Newsgroups: 
lugnet.cad
Date: 
Wed, 30 Apr 2003 00:32:45 GMT
Viewed: 
887 times
  
In lugnet.cad, Gary Thomas writes:
Well actually I was thinking more along the lines of describing a model in
terms of it's parts, but not a full 3d description like X3D.  Something like
this (sorry, this looks terrible without a monospaced font):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE model SYSTEM "http://brick-xml.sourceforge.net/DTD/brick-xml.dtd">
<model>

<info creator="Gary Thomas" date="04/02/2002" title="Test MOC">
   Long description, blah blah blah blah.
</info>

<part id="3001" color="#FF0000" x="0" y="1" z="3"/>

<!-- optional transform attribute uses matrix transformation -->
<part id="3001" color="#FFFF00" x="2" y="1" z="3" transform="matrix(1 0 0 0 • 1 0 0 0 1)"/>

<!-- optional transform shows a rotation about the x axis -->
<part id="3003" color="#000000" x="1" y="9" z="0" transform="rotate(90,0,0)"/>

<!-- color uses optional alpha channel -->
<part id="3005" color="#FFFFFFAA" x="6" y="0" z="0"/>

</model>

Wow, that is pretty cool.  A person could write a 20-line Perl program to
transmogrify that into .ldr format pretty easily, and vice-versa.

So in theory, it's still compatible with ldraw/lgeo parts, etc.

Waycool.

BTW, how do people feel about specifying colors in hex RGB format?  I'm not
particularly comfortable with RGB unless it's a linear (e.g., non-gamma-
corrected) RGB color space.  Perhaps we could define multiple alternative
ways to specify a color?  By LDraw color ID, by RGB value, by LEGO internal
color number, etc.?

On that note, maybe someone can help me work out an XML output specification
for the colors on LUGNET's LEGO Color Reference:

   http://guide.lugnet.com/color/

I'm gearing up to do a 1.1 release of this soon and I want to publish all the
POV-Ray color files, and it'd be easy to output the color data in XML form as
well.  I think XML might be a nice way to list multiple color names too.  For
example, RM00 in the chart is called Magenta by some people and Dark Pink by
others; VB03 is called Purple by some people and Violet-Blue or Blue-Violet
by others.

--Todd



Message has 1 Reply:
  Re: Lego XML?
 
(...) I've thought about this, because most LDraw-programs (ie, LDLite, L3Lab, MLCAD, L3P, ldglite, LDView?) provide a way to code color-values directly in some RGB method. My issue is that different systems (computer systems, graphics systems) (...) (21 years ago, 1-May-03, to lugnet.cad)

Message is in Reply To:
  Re: Lego XML?
 
(...) Well actually I was thinking more along the lines of describing a model in terms of it's parts, but not a full 3d description like X3D. Something like this (sorry, this looks terrible without a monospaced font): <?xml version="1.0" (...) (21 years ago, 29-Apr-03, to lugnet.cad)

16 Messages in This Thread:







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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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