Lego bricks

From ZENotes
Jump to: navigation, search

Background info: PC running Arch Linux up-to-date; nvidia proprietary drivers (sorry) with TwinView; most knowledge fished from http://www.ldraw.org and http://www.hassings.dk/l3/l3p.html

Contents

DOES NOT WORK

ARCH December 2010

l2rib native linux doesn't output useable files for renderman, pixie, 3delight

pixie is just a viewer, and a pale one at that

3delight installs in /opt, misses everything it needs to work

ldview 4 and 4.1 crash, or fail to display model properly

LeoCAD segfaults all the time; build is with no issues, but can't indert a piece on the board.


U10.10

LeoCAD doesn't compile on Ubuntu 10.10 with the appropriate requirement for lbpng, zlib, libjpeg + GTK2 and OpenGL/libGL.so

somehow OK

Arch December 2010

ldview 3.1 is OK after manually linking absolutely all needed libraries by hand

l3p works if and only if export LDRAWDIR=/home/jarch/bin/ld/ldraw was done beforehand (need to find a way to get this permanent)

Examples of code are:

./l3p ./models/car.dat 

from the ldraw folder

just works

MLCAD under wine, with about any version, on any Linux machine I ever tried. Always works.


U10.10

LDView is ok from .deb, needs just one dep.

Notes

The basic LDraw views can be represented by these Latitude,Longitude pairs: 
Front=0,0 Right=0,-90 Left=0,90 Back=0,180 Over=90,0 Under=-90,0. 
The 3D view can e.g. be 45,45 or 30,45.


Workin' like this:

[jarch@DC266 ldraw]$ rm 850.png && rm 850.pov && l3p -cg35,-15 -b1 ./models/850.ldr -sw2 && povray 850.pov -H600 -W800 -B -visual DirectColor && display 850.png

lexicon

CG(xxx),(xxx),(xxx)=Orientation -b(xx)=background ca(xxx)=focal lens -f=shadows, ground nocolor, sky follows -b(x) color -q(xxx)=Level of Details, quality

lc(xxx),(xxx),(xxx),(0,xxx),(0,xxx),(0,xxx),=lights position and colour in RGB

Background

Bloat

Orientation: sample -cg35,-15,-50

Quality

Lights: -lc30,120,0,0.996,0.675,0.906

render recipes

Indeed full 90° up, object facing 'south', all straight.

 l3p -cg90,-00 -sw0 -b0 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor 

Cool frontal aggression.

 rm 850.png && rm 850.pov && l3p -cg335,-00 -sw0 -b5 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor && display 850.png

Delirious Cam Focale

 l3p -cg335,-00 -b5 -ca100 ./models/850.ldr && povray 850.pov

Shadows, reflexions, sky, delirious camera angle and focal: its too much.

 l3p -cg340,-225 -ca100 -f -b7 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor && display 850.png

Oops, 'set the level of details a bit too low I think...

 l3p -cg45,-45 -ca10 -f -b0 -q00 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor && display 850.png

Adding some colour to light

 l3p -cg00,45,-50 -lc30,120,0,0.996,0.675,0.906 -f -b7 -q4 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor && display 850.png

A quite passable play at colours

  l3p -cg344,35,-5 -lg25,135,00,0.996,0.675,0.906 -lg60,270,-10,0.400,0.400,0.800 -fg -b7 -q4 ./models/850.ldr && povray 850.pov -H600 -W800 -visual DirectColor && display 850.png

Cool Warm/Cold light:

 l3p -o -b7 -fg -q10 -cg30,35,-25 -lg60,0,999,0.3,0.3,1 -lg05,90,80,1,0.3,0.5 -lg05,90,80,0.5,0.15,0.25 -lg80,180,999,0.3,0.3,1 -lg80,270,999,0.3,0.3,1 ./block.ldr

The L3P -h file

L3P (Linux) v1.3 20021201  (C) 1998-2002 Lars C. Hassing  lch@ccieurope.com
Usage: l3p [options] modelpath [povpath] [options]
 -b[<color>] background color, default color is 0, -b gives 0.3,0.8,1
 -c<color> default part color, default color is 7
 -bu bumps
 -sw<w> seam width, default is 0.5
 -f[<type>][<y>] floor at <y>, default y is just below model
 -cg<la>,<lo>[,<r>] camera globe position, default is 30,45,0
 -cc<x>,<y>,<z> camera coordinates (location)
 -cla<x>,<y>,<z> camera look_at coordinates
 -ca<a> camera angle, default is 67.38 degrees
 -lg<la>,<lo>,<r>[,<color>] lightsource globe position, default color is 15
 '-lc<x>,<y>,<z>[,<color>] lightsource coordinates, default color is 15
 -ld always use default lightsources
 -l use positions and colors of light.dat files as lightsources
 -lgeo use LGEO parts wherever possible
 -p don't substitute any primitives in the P directory with POV equivalents
 -q<n> quality level 0..3, default is 2
 -w<n> set warning level 0..3, default is 0
 -sc StepClock, add "#if (clock > n)" at steps
 -enp exclude non-POV code generation (L3P IFNOTPOV)
 -o overwrite POV file if it already exists
 -check check modelpath for errors, Warning level is default 1.
        modelpath may be a directory, which is checked recursively.
        If no modelpath given all files in P and PARTS are checked.
 -dist<d> warn about non-coplanar quads with distance greater than <d>
 -det<d> warn about non-coplanar quads with determinant greater than <d>
 -stdout redirect stderr to stdout, must be first argument
 -pp print primitives, prints a list of the primitives having POV equivalents

<la> latitude, 90=N=-y, -90=S=+y. <lo> longitude in xz, 0=-z, 90=E=+x, -90=W=-x
<r> is radius. If not specified for camera it will be as close to model as
possible, if negative then camera will be -<r>% further away. If zero for
lightsource, the camera distance is used. You can specify many -lc/lg options.
<color> is an LDraw color (including extended colors) or <r>,<g>,.
If povpath is not specified or is a directory, it will be modelfilename + .pov
See also l3p.txt and http://www.hassings.dk/l3p
(or http://www.ldraw.org/download/software/l3p)

L3P (Linux) v1.3 20021201 (C) 1998-2002 Lars C. Hassing lch@ccieurope.com

links

L3PAO by Jeff Boen (Onyx). L3PAdd-On is a graphical user interface for L3P. 
http://l3pao.malagraphixia.com 
http://www.ldraw.org/download/win/l3pao
POV-Ray. The Persistence of Vision Raytracer is a high-quality, totally free tool for 
creating stunning three-dimensional graphics. It is  available in official versions 
for Windows 95/98/NT, DOS, the Macintosh, i86 Linux, SunOS, and Amiga. 
The source code is available for those  wanting to do their own ports. 
http://www.povray.org
LGEO PovRay parts by Lutz Uhlmann: 
http://www.el-lutzo.de/lego/lgeo.html.
Fixed LGEO parts by Lars C. Hassing: 
http://www.hassings.dk/l3/lgeofix.html
LDAO by Steve Bliss: 
http://home.earthlink.net/~steve.bliss/ldao/ 
http://www.ldraw.org/download/win/ldao
LDLite by Paul Gyugyi: 
http://www.gyugyi.com/l3g0/ldlite/ 
http://www.ldraw.org/download/win/ldlite
LdGLite by Don Heyse. Making LDLite portable with OpenGL. 
http://ldglite.sourceforge.net 
http://www.ldraw.org/download/win/ldglite
MLCad by Michael Lachmann. The Windows CAD program. 
http://www.lm-software.com/mlcad/ 
http://www.ldraw.org/download/win/mlcad
LeoCAD by Leonardo Zide. Windows/Linux CAD program. 
http://www.leocad.org 
http://www.ldraw.org/download/win/leocad
LDView by Travis Cobbs. Real-time 3D OpenGL viewer. 
http://home.san.rr.com/tcobbs/LDView/ 
http://www.ldraw.org/download/win/ldview
L3Lab by Lars C. Hassing. Viewer/examiner. 
http://www.hassings.dk/l3/l3lab.html 
http://www.ldraw.org/download/win/l3lab
L3P by Lars C. Hassing 
http://www.hassings.dk/l3/l3p.html     
Download Area: http://www.hassings.dk/l3/l3p.html#download 
http://www.ldraw.org/download/win/l3p
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox