To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.announceOpen lugnet.announce in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Announcements / 930
     
   
Subject: 
L3P v1.3 20010120
Newsgroups: 
lugnet.announce, lugnet.cad, lugnet.cad.ray
Followup-To: 
lugnet.cad
Date: 
Sun, 21 Jan 2001 05:41:29 GMT
Highlighted: 
!! (details)
Viewed: 
5257 times
  

As you can read in "The motive to L3P" it was Lutz Uhlmann's LGEO
library (or rather its incompleteness) that inspired me to get started
in the LDRAW business. It resulted in my L3 (Lego+Ldraw+Lars) project,
which has spun off L3P and L3Lab. The whole idea of L3P was to generate
the MISSING parts on the fly. However, as it turned out that L3P could
generate ALL parts with a reasonable result, I decided to release it
before taking the next natural step of using the LGEO parts.

Back in August 1999 Lutz Uhlmann agreed that L3P could reference his
high quality LGEO POV parts. He promised to send some info regarding
the binary format of the element table files. However, I have not heard
from him since then, despite several mails.

But since he did consent that L3P could reference the LGEO parts,
and since many users have requested it, I've decided to update L3P
now anyway. So, with a little hacking I've managed to tweak L3P
to use LGEO parts whenever possible. The missing parts are generated
on the fly like today.

You now get the best of both worlds: high quality POV parts and
L3P's support for automatic camera positioning, primitive substitution,
MPD files, TRANSLATE, ROTATE, SCALE, TRANSFORM meta commands,
extended colors (direct colors), etc.

Besides the LGEO support several nice features have been added, read on:

Support of LGEO parts
---------------------
To use the LGEO parts you must do three things:
1) download the LGEO parts,
2) tell L3P where they are located, and
3) tell PovRay where they are located.

Like LDRAW, LGEO also has a set of primitives. Non-LGEO parts generated
on the fly will use some of the LGEO primitives rather than the L3P
primitives (POV equivalents).
Currently the following are used:
   stud.dat    lg_knob
   stud2.dat   lg_tech_knob
   stud4.dat   lg_plate_cylinder
Additionally the L3P studlogo is dynamically added to lg_knob, so it
appears on LGEO parts too when rendering with -q3 (QUAL=3),
see the -q<n> Quality option.

I found out that we (mis)use stud4.dat by scaling its height by 5 in
bricks! (and other factors in other parts). LGEO uses lg_plate_cylinder
and lg_brick_cylinder and we should use two different studs in LDraw too.

Primitive primitives (grin) like cylinders and discs are OK to be scaled,
but studs should never be scaled - or they cannot be substituted correctly...
The stud4.dat's in 3001.DAT (Brick 2 x 4) look funny now, because the
rounded corner gets scaled by 5...


1) You can download the LGEO parts library here:
http://www.el-lutzo.de/lego/lgeo.html
The latest part seems to be from September 23 1999, but there are 842 parts.
Install (extract) the LGEO files to your harddisk in e.g. c:\L2P.
There will be a subdirectory named LGEO containing the POV .inc files
(include files) and some table files .tab meant for L2P.

2) L3P needs to know where it can find the three files, L2P_ELMT.TAB,
L2P_COLR.TAB and L2P_PTRN.TAB, which contain info on the LGEO elements,
colors and patterns. The three files are typically located in the
directory named LGEO.
You can tell L3P where the LGEO directory is located either by setting
the environment variable LGEODIR or by adding a line to ldraw.ini.
If LGEODIR is not set, L3P looks for ldraw.ini in C:\Windows (or the
directory specified by the environment variable WINDIR). If found,
L3P uses the LgeoDirectory setting in the [LDraw] section.
L3PAO can handle this for you.

3) You must also tell PovRay where to find the LGEO include files:
in POV-Ray for Windows v3.1 select "Edit Settings/Render" in the
"Render" menu. Then type +Lc:\L2P\LGEO in the "Command line options"
box and click the "Set but don't Render" button.

Now you should be all set to take advantage of the high quality
LGEO parts. I've tried to overcome some of the bugs in L2P and
in the LGEO parts. Also transparent LGEO parts are scaled a little
bit to avoid coincident surfaces. The QUAL flag is supported to
substantially speed up test renderings, see the -q<n> Quality option.
The LGEO colors are darker than L3P's colors.
You can add extra light sources if you want.


-cla<x>,<y>,<z>  Camera look_at Coordinates
-------------------------------------------
The camera will look at <x>,<y>,<z> rather than at the center of the
model's bounding box. This option only works if you also specify the
camera's location, either by an absolute position using -cc<x>,<y>,<z>
or by a relative position (relative to the new look_at position)
using -cg<la>,<lo>,<r> where r > 0.
The -cla option doesn't affect light sources.

-pov  Launch PovRay upon successful writing of POV file
-------------------------------------------------------
If you add the -pov option L3P will try to launch PovRay with the POV
file just generated. L3P simply runs "start povfile.pov" which works
on at least Windows 98 and NT, I haven't tested others.
This also works for other extensions than .pov; if you run
"l3p model result.txt -pov" L3P will launch Notepad with result.txt.

-upd  Check L3P's homepage for newer version
--------------------------------------------
If you run "l3p -upd" it will launch your Internet Browser with a
special page, where you can read if you have the latest version.
No automatic update takes place, you'll have to download a newer
version manually, but of course you'll find links to the newest version.

Vast number of new primitives
-----------------------------
Additional POV equivalents for primitive substitution: stud6.dat,
And for any N: ringN.dat, rinN.dat, 1-4ringN.dat, 1-4rinN.dat,
2-4ringN.dat, 2-4rinN.dat, 1-4conN.dat

New search path
---------------
The search path for DAT files has been changed from
  1. Inside the document if it is an MPD
  2. The current directory (from where L3P is started)
  3. %LDRAWDIR%\P
  4. %LDRAWDIR%\PARTS
  5. %LDRAWDIR%\MODELS
  6. The document's directory (the directory of the main model)
to
  1. Inside the document if it is an MPD
  2. The document's directory (the directory of the main model)
  3. %LDRAWDIR%\P
  4. %LDRAWDIR%\PARTS
  5. %LDRAWDIR%\MODELS
where LDRAWDIR is the LDraw directory.
See the thread in lugnet.cad.dev "Searching for parts"
http://news.lugnet.com/cad/dev/?n=5504

-sc  StepClock, add "#if (clock > n)" at steps
----------------------------------------------
The -sc option is for those who want raytraced instruction images.
L3P can support POV-Ray's built-in animation capability by testing
the clock variable at steps in the model: L3P will identify "0 STEP"
lines and insert conditionals like this:

      object { _3001_dot_dat ...
      object { _3297_dot_dat ... // [DAT lines in step 1]
      object { _6015_dot_dat ...
   // 0 STEP
   #if (clock > 1)
      object { _3001_dot_dat ...
      object { _3297_dot_dat ... // [DAT lines in step 2]
      object { _6015_dot_dat ...
   #end
   // 0 STEP
   #if (clock > 2)
      object { _3001_dot_dat ...
      object { _3297_dot_dat ... // [DAT lines in step 3]
      object { _6015_dot_dat ...
   #end
   // 0 STEP
   #if (clock > 3)
      object { _3001_dot_dat ...
      object { _3297_dot_dat ... // [DAT lines in step 4]
      object { _6015_dot_dat ...
   #end
   :
   :
L3P will print out the number of steps in the model, e.g. 8.
You can now generate the instruction images by:

   wine -- L3P.EXE -sc -o car.dat
   povray +I car.pov +O car.png +FN +W400 +H300 -J +KFI1 +KFF8 +KI1 +KF8 +D +A

The output images will be named car1.png, car2.png, ..., car8.png.

The StepClock option was added on suggestion from Fredrik Glöckner,
who supplied the command lines above. He said:
"These are UNIX style command line options. I really have no idea
what this looks like in the Windows world. Check the manual."

New rubber color
----------------
While awaiting the discussion about "0 TEXTURE RUBBER" another rubber
color has been added: color 375 (256+16*7+7) is used for grey rubber.
Color 256 (256+16*0+0) is still used for black rubber.

l3p -check
----------
Model title (first comment in DAT file) and Author now printed when
in check mode.

Color 24
--------
The only instance of a linetype 1 with color 24 was the neck-mark of
the minifig torso. POV has no notion of a "reverse" color when you
reference another object. Or when you inherit a color (linetype 3 and 4).
And neither have other programs that you export DAT files to.
The mark has now been removed and added in the correct color to each
decorated torso.
So, color 24 is now considered illegal for linetypes 1,3 and 4, see the
thread in lugnet.cad.dev "Colour 24 in non type-2 lines (was Updated
S\973S01.DAT)"  http://news.lugnet.com/cad/?n=4950

Conditional POV code generation
-------------------------------
I have taken the liberty to introduce 4 new keywords to the DAT file format:
   0 L3P IFPOV
   0 L3P IFNOTPOV
   0 L3P ELSEPOV
   0 L3P ENDPOV
I had been playing with the idea of embedding POV code in the DAT files
since 1998. It was triggered by the 2473 Brush Car Wash, which
unfortunately uses lines. This is poor design, it should have used
cylinders, which will look correctly if you zoom in.
For rendering the 6649 Street Sweeper I converted the lines to POV
cylinders and put the above conditionals around.

You can have a look at the POV-friendly 2473 Brush Car Wash in the thread
in lugnet.cad.ray "Re: Is there some pov-ray friendly version of car wash
brush part?"  http://news.lugnet.com/cad/ray/?n=656

However, I was reluctant to put it into L3P, because I believed LGEO was
the proper solution to this kind of problem. But after several mails,
Chuck Sommerville made me put into L3P v1.2 - unofficially though.

The POV code embedding can however supplement LGEO and find use in many
cases, so I hereby announce it. I think Chuck Somerville has explained
it rather well in a lugnet.cad.ray posting, so with kind permission from
him I'll quote him on the subject:

From the thread in lugnet.cad.ray "L3P user primitive substitution"
http://news.lugnet.com/cad/ray/?n=596

<quote begin>
Awhile back, I persuaded Lars Hassing to add a feature to L3P.
I wanted the ability to substutite POV language commands in the
comments of a .DAT file that could be used in place of the DAT
primitives when rendering through POV. This would allow users to
add native POV commands that could render better than the triangles
and polygons defined in DAT files. Since the commands are inbedded
in comment fields, and only recognized by L3P, they have no effect
of any other tools. Lars was waiting untill I tested the commands
to announce the feature. The good news, is you probably already
have the ability to use these features. He built them into
Version 1.2 20000616.

The commands are
0 L3P IFPOV
  Conditional section begin
  Begin POV statements in comment statement fields

0 L3P IFNOTPOV
  Conditional section begin
  Begin DAT statements

0 L3P ELSEPOV
  Switch between above section modes

0 L3P ENDPOV
  Terminate conditional section

After running L3P, you can see in the POV file conditionals like if(0)
or if(1)
To see the alternate version for comparison, just change the constant
in these conditionals.

If you don't understand any of this, don't worry, I am following this
post up with some examples. Remember to get L3P V1.2 or latter to use thse.

-Chuck
<quote end>

L3P still produces the normal object references and meshes in an IFNOTPOV
section, but puts a conditional around it.

-enp  exclude non-POV code generation (L3P IFNOTPOV)
----------------------------------------------------
Chuck Sommerville requested another option to suppress the unused .dat
commands when using the L3P IFPOV commands. He likes the idea of his
POV files getting smaller as well as better ;-)
So, the -enp option will leave out the normal object references and
meshes in an IFNOTPOV section, as well as the conditionals.

Bug fix
-------
Only make seams if part is not scaled. If a part was exceptionally
scaled the seams became too large.


Please enjoy and play well:
http://home16.inet.tele.dk/hassing/l3p.html

Thanks to Bram Lambrecht and Fredrik Glöckner for beta testing.
And to Jeff Boen for updating L3PAdd-On (coming shortly :-)
/Lars
PS. Linux version to follow, as well as an L3Lab update.

   
         
     
Subject: 
RE: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.ray
Date: 
Sun, 21 Jan 2001 07:40:14 GMT
Viewed: 
1662 times
  

First of all, thanks for the new version!  You've really worked hard to make
this a wonderful utility!

Lars C. Hassing writes:
-sc  StepClock, add "#if (clock > n)" at steps
----------------------------------------------
The -sc option is for those who want raytraced instruction images.

For anyone who plans on making raytraced instructions, may I suggest the
following:

1)  Uncomment the "orthographic" keyword in the camera {} block.
    This will get rid of the perspective in the images (equivalent
    of infinite focus)
2)  Use 3 shadowless light sources, one directly to the side of the
    model, one directly in front, and one directly above.  Adjust the
    brightnesses of the lights by changing the color:
      color rgb 0.5  // half-bright white light
      color rgb 2.0  // double-bright white light
    Adjust the brightness of the lights until you get good edge contrast.
3)  Remove reflections from all the colors.
4)  If desired, use MegaPOV to add edgelines

Anyone have any other suggestions?
--Bram


Bram Lambrecht
bram@cwru.edu
http://home.cwru.edu/~bxl34/

    
          
      
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.ray
Date: 
Thu, 25 Jan 2001 08:35:40 GMT
Viewed: 
1728 times
  

Almost sounds like a metaphor. "Infinite Focus".  If u get it, u get it.
:)

Mike


In lugnet.cad, Bram Lambrecht writes:


    
          
     
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.ray
Date: 
Fri, 26 Jan 2001 03:26:34 GMT
Viewed: 
1674 times
  

For anyone who plans on making raytraced instructions, may I suggest the
following:

1)  Uncomment the "orthographic" keyword in the camera {} block.
   This will get rid of the perspective in the images (equivalent
   of infinite focus)
2)  Use 3 shadowless light sources, one directly to the side of the
   model, one directly in front, and one directly above.  Adjust the
   brightnesses of the lights by changing the color:
     color rgb 0.5  // half-bright white light
     color rgb 2.0  // double-bright white light
   Adjust the brightness of the lights until you get good edge contrast.
3)  Remove reflections from all the colors.
4)  If desired, use MegaPOV to add edgelines

Anyone have any other suggestions?
--Bram

May I suggest that this be added as an option in L3P?  (I know that's asking
a lot considering all the work that has already gone into the app, but I
think the section at the top where you can define some globals about the
rendering would be a perfect place to put a "render as instructions"
settings and use it to set these things.

P.S.  Thanks for a wonderful conversion tool (L3P Rocks)

   
         
     
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad
Date: 
Sun, 21 Jan 2001 15:52:39 GMT
Viewed: 
1486 times
  

Ummm ... that's good news, isn't it? However, my head is spinning already.
Could you please re-explain? ;)

Primus BuS
ComStar

LEGO Mechcommander: www.go.to/LegoMC

   
         
     
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad
Date: 
Mon, 22 Jan 2001 05:11:26 GMT
Viewed: 
1348 times
  

First off thanks for the great utility...

Is anyone else having trouble using this?  Maybe I'm too dumb to figure all
the text out... I have downloaded V1.3 and have downloaded the LGEO files
needed as well but I'm wondeirng where do I put the LGEo files and how do I
get L3P and POV to know where they are at.  I read the L3P a bunhc of time
but I still do not get it.  Also I am using L3PAO  do I need to reconfigure
that?  I think not since it is reading the same L3P.exe as before excpet
that it is now version 1.3.  The oly think I have notcies that L3PAO does
NOT let you do is use the LGEO command.  There is no option for this and you
can not type it into the commad line box.  So this makes it useless if you
want to use the new LGEO files correct?

Thanks...

BTW my POV Ray, LDraw, and L3P are located at:

C:\Program Files\LEGO\POV Ray
c:\Program Files\LEGO\LDraw
c:\Program Files\LEGO\L3P

Ahui Herrera

   
         
   
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Fri, 16 Feb 2001 19:30:21 GMT
Viewed: 
2168 times
  

Lars,

Awesome.  I tip my hat to you and Lutz.  :-,

I don't mean to complain, in fact I am currently trying to figure out a
solution anyways, but I thought I'd raise these issues and see if anyone
else has figured it out already.  Basically, some LGEO pieces are not
directly compatable with the LDraw parts library and need some tweaking to
come across properly after L3P-ing.

The inconsistencies I have found so far:

<part:3149> hinge 2x5 base in LDraw becomes <part:3145> tipper end after
l3p+lgeo

<part:3942> cone 2x2 becomes <part:3943> cone 4x4 afterwards, as well.
Renaming lg_3942.inc to lg_3943.inc doesn't work btw

<part:4588> brick 1x1 round with fins doesn't exist in clear in lgeo, so
there's some parsing problems with the POV file...weird

<part:6536> technic axle joiner perpendicular ends up rotated 90 degrees on
the part's y axis after l3p+lgeo

It's fairly easy to fix these by hand in the POV file, but I'm not so sure
how to fix the overall situation.  Changing either the LGEO library or the
LDraw parts library would most certainly break existing models, and
requiring L3P to handle these on a piece-by-piece basis would get to become
a headache for Lars.  Unfortunately, the latter is the best solution I can
think of so far.

Actually, another possibility is for L3P to incorporate some kind of
external lookup table, in a file which can be maintained separately from the
L3P binary.  Perhaps a simple mapping from LDraw to LGEO with part number
changes and translation matrix -- any parts not mentioned in the table would
just go through as they do now, which would keep the table down to a
managable size.

Anyway, I love the changes you've made to L3P Lars; incorporating Lutz's
LGEO parts has really spiffed up my microfig collection.  :-,

Cheers,
- jsproat

   
         
   
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Fri, 23 Feb 2001 01:33:12 GMT
Viewed: 
3571 times
  

Sproaticus wrote...
Lars,

Awesome.  I tip my hat to you and Lutz.  :-,

I don't mean to complain, in fact I am currently trying to figure out a
solution anyways, but I thought I'd raise these issues and see if anyone
else has figured it out already.  Basically, some LGEO pieces are not
directly compatable with the LDraw parts library and need some tweaking to
come across properly after L3P-ing.

The inconsistencies I have found so far:

<part:3149> hinge 2x5 base in LDraw becomes <part:3145> tipper end after
l3p+lgeo

<part:3942> cone 2x2 becomes <part:3943> cone 4x4 afterwards, as well.
Renaming lg_3942.inc to lg_3943.inc doesn't work btw

Are you sure you have got ALL updates installed properly?
My L2P_ELMT.TAB is from 31-12-99 and the latest part is
lg_3873.inc from 23-09-99.

BTW, you can use the -d option to L3P to see the contents of LGEO's
*.TAB files: "l3p -d -lgeo somefile.dat | more"

<part:4588> brick 1x1 round with fins doesn't exist in clear in lgeo, so
there's some parsing problems with the POV file...weird

Yes, Lutz forgot the lg_4588_clear in that file...

<part:6536> technic axle joiner perpendicular ends up rotated 90 degrees on
the part's y axis after l3p+lgeo

It's fairly easy to fix these by hand in the POV file, but I'm not so sure
how to fix the overall situation.  Changing either the LGEO library or the
LDraw parts library would most certainly break existing models, and
requiring L3P to handle these on a piece-by-piece basis would get to become
a headache for Lars.  Unfortunately, the latter is the best solution I can
think of so far.

L3P already has one exception: it adds a missing texture
"texture {lg_black}" to pattern lp_0008.inc used in lg_3626p01,
the Minifig Head with Standard Grin Pattern :-)
But, that's not the way to go...

Actually, another possibility is for L3P to incorporate some kind of
external lookup table, in a file which can be maintained separately from the
L3P binary.  Perhaps a simple mapping from LDraw to LGEO with part number
changes and translation matrix -- any parts not mentioned in the table would
just go through as they do now, which would keep the table down to a
managable size.

No, Lutz Uhlmann should be alerted and fix his files. Otherwise also L2P
would suffer from the same mistakes...

I also have a list of errors:
lg_0711.inc: "#declare lg_0709_clear" should be "#declare lg_0711_clear"
lg_6081.inc lacks lg_6081_clear
wrong offset in z  lg_6832.inc  Windscreen  4 x  4 x  1
lp_0008.inc: missing "texture {lg_black}"
lg_cyan, lg_tan, lg_orange, lg_clear_brown, lg_clear_neon_orange are
missing in L2P_COLR.TAB

Lutz should also consider making a new version of L2P_ELMT.TAB,
preferably in text rather than binary.
The current format is inadequate for a conversion table between
DAT filenames and LGEO filenames: He only uses an integer for the
DAT file number (again, try: "l3p -d -lgeo somefile.dat"), which cannot
handle all our letter suffixes properly.
But I've already suggested that to him long ago...

Anyway, I love the changes you've made to L3P Lars; incorporating Lutz's
LGEO parts has really spiffed up my microfig collection.  :-,

Thanks.
/Lars

   
         
   
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Fri, 23 Feb 2001 19:51:06 GMT
Viewed: 
3131 times
  

In lugnet.cad, Lars C. Hassing writes:
Are you sure you have got ALL updates installed properly?
My L2P_ELMT.TAB is from 31-12-99 and the latest part is
lg_3873.inc from 23-09-99.

Huh.  I downloaded the complete set, but my L2P_ELMT.TAB is from 25-1-1999.
The other timestamp is off too.

I figured this could be an old LGEO install, but I tried again on a fresh
machine and I still have the older files.

Exactly which file did you download to get the latest stuff?  I'm getting
mine from http://www.el-lutzo.de/lego/zips/lgeo.zip as linked from
http://www.el-lutzo.de/lego/lgeo.html

Cheers,
- jsproat

   
         
   
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Mon, 26 Feb 2001 11:59:29 GMT
Viewed: 
3128 times
  

Sproaticus wrote...
In lugnet.cad, Lars C. Hassing writes:
Are you sure you have got ALL updates installed properly?
My L2P_ELMT.TAB is from 31-12-99 and the latest part is
lg_3873.inc from 23-09-99.

Huh.  I downloaded the complete set, but my L2P_ELMT.TAB is from 25-1-1999.
The other timestamp is off too.

I figured this could be an old LGEO install, but I tried again on a fresh
machine and I still have the older files.

Exactly which file did you download to get the latest stuff?  I'm getting
mine from http://www.el-lutzo.de/lego/zips/lgeo.zip as linked from
http://www.el-lutzo.de/lego/lgeo.html

Yeah, Lutz does write:
"Download the Lgeo POV-Ray Library (548kB) containing 636 parts
from all updates including #14. New users should get this.
If you already have all stuff until including update#13,
just get the update #14 below."

But if you scroll a page down you'll find Update #15 (138kb)  :-)
/Lars

   
         
   
Subject: 
Re: L3P v1.3 20010120
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Mon, 26 Feb 2001 16:47:40 GMT
Viewed: 
3558 times
  

In lugnet.cad, Lars C. Hassing writes:
Yeah, Lutz does write:
"Download the Lgeo POV-Ray Library (548kB) containing 636 parts
from all updates including #14. New users should get this.
If you already have all stuff until including update#13,
just get the update #14 below."

But if you scroll a page down you'll find Update #15 (138kb)  :-)

D'oh!  D'oh!  D'oh!

Thanks.  :-,

Cheers,
- jsproat

 

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