Converting LDR Files to POV Files: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{NeedsWorkNotifier}}
{{NeedsWorkNotifier}}
<p>
By: <a href="mailto:[email protected]">Jeroen de Haan</a> and
    <a href="mailto:[email protected]">Jake McKee</a><br>
Posted: May 11, 2002<br>
Version: v1 rev.1 110202
</p>


<p>
What your reading now is a beginners guide to LDView and POV-Ray. It assumes you have some  
Page 1 |
knowledge of and experience with LDraw and one or more of its editors (such as MLCAD, Bricksmith, SR 3D Builder etc)  
<a href="/article/111">Page 2</a> |
and creating models. This will provide is a step by step guide of converting LDraw models  
<a href="/article/112">Page 3</a> |
to POV files and rendering them and what options you have when converting or rendering. What you  
<a href="/article/113">Page 4</a> |
<a href="/article/114">Page 5</a> |
<a href="/article/115">Page 6</a>
</p>
 
<p>
<span style="font-family: verdana, arial, helvetica; font-size: 1.08108em; font-weight: 700">Knowledge Requirements</span><br>
What your reading now is a beginners guide to L3P/L3PAO and POV-Ray. It assumes you have some  
knowledge of and experience with LDraw and one or more of its editors (such as MLCAD, LeoCAD, BrickDraw3D, etc)  
and creating models. What it wants to provide is a step by step guide of converting LDraw-models  
to POV-files and rendering them and what options you have when converting or rendering. What you  
won't find here is how to create models or parts.
won't find here is how to create models or parts.
</p>


<p>
Some areas are on the practical side; you will do things after reading it. Other areas
Some chapters are on the practical side; you will do things after reading it. Other chapters
are more theoretical, for example about cameras and lenses or color and light. Please read these  
are more theoretical, for example about cameras and lenses or color and light. Please read these  
chapters too. We try to make them as short and "light" as possible but they are important to  
chapters too. We try to make them as short and "light" as possible but they are important to  
understand some of the functions and options of L3P and POV-Ray.
understand some of the functions and options of LDView and POV-Ray.
</p>
 
==Introduction==


<p>
<span style="font-family: verdana, arial, helvetica; font-size: 1.08108em; font-weight: 700" >Chapter 1: Introduction</span><br>
So you have made some models; your own or existing Lego models. Now you want to have a nice  
So you have made some models; your own or existing Lego models. Now you want to have a nice  
picture of it, like the ones you see on Brickshelf or on other people's websites. However,  
picture of it, like the ones you see on Brickshelf or on other people's websites. However,  
your editor for LDraw can't so how do people do that? What you need is three programs and some  
your editor for LDraw can't so how do people do that? What you need is three programs and some  
additional files:
additional files:
</p>
<ol>
<li>L3P: a program that converts .DAT, .LDR and .MPD files to .POV (the native file format for POV-Ray)
<li>L3P AddOn (or L3PAO for short): a graphic interface for L3P
<li>POV-Ray: a freeware program to ray trace POV-files
<li>The LGEO-files for POV-Ray.
</ol>


<p>
* LDView: a program for viewing LDraw files and can convert .DAT, .LDR and .MPD files to .POV (the native file format for POV-Ray)
L3P is a DOS-program. It uses switches to call certain options. So for example, when you want
* POV-Ray: a freeware program to ray trace POV-files
your model with a certain camera position and background color you have to type the following in the DOS-prompt:
* The LGEO-files for POV-Ray.
L3P.exe tp-7745.dat tp-7745.pov -cc0,-96,-250 -ca45 -b0.000,0.000,0.251 -o
You have to know (all) the options and their acronyms and when you make a typo, (and who
doesn't now and then) you have to type it all over again. Or if you want a batch of models
you have to retype the whole line over and over again.
</p>


<p>
<<Blurb about LDView here>>
This is why J. Boen created L3P AddOn, a graphic interface for L3P where you can turn on or
off options in an easy way AND can save these options in "scenes" or snapshots.
</p>


<p>
POV-Ray is a freeware program to create and render computer generated pictures or animations.  
POV-Ray is a freeware program to create and render computer generated pictures or animations.  
POV-Ray has no graphical interface in the sense that you see what you create; it has a source  
POV-Ray has no graphical interface in the sense that you see what you create; it has a source  
window where you type text commands and you can see what you created when you render the picture.  
window where you type text commands and you can see what you created when you render the picture.  
Luckily, you don't have to learn all these commands; L3P creates a ready to render POV-file!
Luckily, you don't have to learn all these commands; LDView creates a ready to render POV-file!
</p>


<p>
The LGEO-files for POV-Ray are files that POV-Ray uses to substitute some of the LDraw parts.  
The LGEO-files for POV-Ray are files that POV-Ray uses to substitute some of the LDraw parts.  
The LGEO-files look better; cylinders are rounder, sloped bricks have that sandpaper structure,  
The LGEO-files look better; cylinders are rounder, sloped bricks have that sandpaper structure,  
etc. They are also harder to render for POV-Ray; you will need lots of memory to use them.
etc. They are also harder to render for POV-Ray; you will need lots of memory to use them.
</p>


<p>
However, before you can make a nice rendering of your model you have to download the above mentioned  
However, before you can make a nice rendering of your model you have to download the above mentioned  
software. Best place to start is http://www.ldraw.org/download/win/. Go to the download section  
software. Best place to start is http://www.ldraw.org/download/win/. Go to the download section  
and click the appropriate links. We going to guide you with installing the programs but please read  
and click the appropriate links. We going to guide you with installing the programs but please read  
the installation guides of each program carefully!
the installation guides of each program carefully!
</p>
<p style="font-family: verdana, arial, helvetica; font-size: 1.08108em; font-weight: 700">
Chapter 2: Downloading and installing L3P, L3PAO and POV-Ray and LGEO
</p>
<p>
<b>LGEO-files</b><br>
We will start with the easiest: the LGEO-files.
</p>
<ol>
<li>Go to <a href="http://www.el-lutzo.de/lego/lgeo.html" target="_top">http://www.el-lutzo.de/lego/lgeo.html</a>
<li>Download the LGEO POV-Ray Library (�548kB)
<li>Place the Zip-file in the LDraw-directory an unzip it.
<li>That's it (for now)!
</ol>
<p>
<b>L3P</b><br>
L3P comes in two flavors: a 16-bit version and a 32-bit version. We recommend the latter because it is
a bit faster, can handle long directory names (but no long filenames!) and can handle large LDraw files.
</p>
<ol>
<li>Go to the <a href="/modules.php?op=modload&name=Downloads&file=index">Download</a> section
<li>Download L3P.zip.
<li>After downloading L3P.ZIP place the ZIP-file in the LDRAW-directory and unzip it. There are now
two files in the LDRAW\L3P directory: L3P.EXE and L3P.TXT.
<li>DOS has to know where it can find L3P. Open a simple text editor like Notepad and open the
AUTOEXEC.BAT or type "EDIT C:\AUTOEXEC.BAT" in the DOS-prompt.
<li>There probably will be a line starting with "set PATH=%PATH...". Place your cursor at the end of
that. Now type the following sentence: ;C:\LDRAW\L3P (see below) and hit "Return" or "Enter".
</ol>
<img src="/gallery/album15/l3ppath.png">
<p>
6. Now L3P has to know where it can find the LDraw parts and models. On the new line type:
</p>
<code>
SET LDRAWDIR=C:\LDRAW (see below)
</code>
<br>
<img src="/gallery/album15/l3pldrawdir.png">
<p>
assuming the LDraw-directory is there. If you have placed it somewhere else please type the correct directory tree after C:\
</p>
<p>
7. L3P also needs to know where the LGEO-files are so in a new line under the SET LDRAWDIR line type:
</p>
<code>
SET LGEODIR=c:\ldraw\lgeo
</code>
<p>
Now every time you start up, DOS will read these commands and "know" where L3P is and where to find the
LDraw parts and LGEO-files.
</p>
<p>
8. So, before going further with the L3PAO installation, please restart Windows.
</p>
<p>
<b>L3PAO</b>
</p>
<ol>
<li>L3PAO.ZIP contains three files that should be unzipped in a temporally directory.
<li>Double click the SETUP.EXE and follow the instructions on screen. It is very simple. All you
have to do is to point to the directory where L3PAO should be. By default, this is Program
Files\L3PAO but the L3PAO manual recommends the same directory as where L3P is placed. So,
hit the change directory-button and change the directory to c:\LDRAW\L3P.
<li>Now click the button with the computer icon on it. L3PAO will be installed. When finished it
is ready to use, no restart needed.
<li>When you open L3PAO for the first time, it wants to know were it can find L3P (choose the
LDRAW/L3P directory), Ledit (in the LDRAW directory) and LGEO-parts. Please point to the right directory.
<li>If you haven't installed POV-Ray and you open L3PAO, you will get a warning about that. Ignore
it, close L3PAO and read on...
</ol>
<p>
<b>POV-Ray</b><br>
POV-Ray comes as POVWIN3.EXE. Download it and place it in a temporary directory. Now follow these 10 steps:
</p>
<ol>
<li>Double click POVWIN3.EXE. You will be asked if you want to install POV-Ray: Click OK. The
License Agreements opens now, read it and close it.
<li>A window opens asking if you agree with the agreement. Click Yes.
<li>The installer now asks where to place POV-Ray. By default, this is in the Program Files
directory. Click OK if that is OK with you or choose an other directory.
<li>The installer will place an older version in a backup directory if you want (and have a
older version). Choose Yes if you want to place the older version in a backup directory
and No if you don't have a older version or don't want a backup of it.
<li>After copying the files in the right directories, the installer wants to know where to
place the shortcut in the Start Menu. Click OK if you are happy with the default or choose an other place.
<li>The installer can place a shortcut on the desktop. Click Yes or No.
<li>By default, double clicking a POV-file will just open the file (click Yes). You can choose
(but I don't recommend) to choose for double click is open and render. If you really really
really want that, click No. By the way: as the window states: clicking with the right mouse
button will open a menu where you can choose between Edit or Render.
<li>Next question: do you want a default directory for rendered files? It's up to you: choose Yes
or No. Remember that if you choose No that POV-Ray will place the rendered file in the same
directory as the POV-file, which can result in, files scattered all over your hard disk. (I chose Yes).
<li>A reminder
<li>Do you want a small demonstration? Click Yes.
</ol>
<p>
Well that was easy wasn't it? You are ready to go now!
</p>
<p style="font-family: verdana, arial, helvetica; font-size: 1.08108em; font-weight: 700" >Tips</p>


<ol>
==Downloading and installing LDView, POV-Ray, LGEO==
<li>Keep an eye on the various lugnet newsgroups for software updates: lugnet.cad.ray (for POV-Ray),
lugnet.cad (for the others) or check ldraw.org.
<li>Lugnet.cad is also the place to post questions. However, before posting a question do a search
to find out if no one posted the same question before you.
</ol>


<p>
Visits the repective software page
Page 1 |
<a href="/article/111">Page 2</a> |
<a href="/article/112">Page 3</a> |
<a href="/article/113">Page 4</a> |
<a href="/article/114">Page 5</a> |
<a href="/article/115">Page 6</a>
</p>
[[Category:Tutorials]]

Revision as of 08:43, 17 December 2011

This page needs work.
Please see the discussion page for details.

What your reading now is a beginners guide to LDView and POV-Ray. It assumes you have some knowledge of and experience with LDraw and one or more of its editors (such as MLCAD, Bricksmith, SR 3D Builder etc) and creating models. This will provide is a step by step guide of converting LDraw models to POV files and rendering them and what options you have when converting or rendering. What you won't find here is how to create models or parts.

Some areas are on the practical side; you will do things after reading it. Other areas are more theoretical, for example about cameras and lenses or color and light. Please read these chapters too. We try to make them as short and "light" as possible but they are important to understand some of the functions and options of LDView and POV-Ray.

Introduction

So you have made some models; your own or existing Lego models. Now you want to have a nice picture of it, like the ones you see on Brickshelf or on other people's websites. However, your editor for LDraw can't so how do people do that? What you need is three programs and some additional files:

  • LDView: a program for viewing LDraw files and can convert .DAT, .LDR and .MPD files to .POV (the native file format for POV-Ray)
  • POV-Ray: a freeware program to ray trace POV-files
  • The LGEO-files for POV-Ray.

<<Blurb about LDView here>>

POV-Ray is a freeware program to create and render computer generated pictures or animations. POV-Ray has no graphical interface in the sense that you see what you create; it has a source window where you type text commands and you can see what you created when you render the picture. Luckily, you don't have to learn all these commands; LDView creates a ready to render POV-file!

The LGEO-files for POV-Ray are files that POV-Ray uses to substitute some of the LDraw parts. The LGEO-files look better; cylinders are rounder, sloped bricks have that sandpaper structure, etc. They are also harder to render for POV-Ray; you will need lots of memory to use them.

However, before you can make a nice rendering of your model you have to download the above mentioned software. Best place to start is http://www.ldraw.org/download/win/. Go to the download section and click the appropriate links. We going to guide you with installing the programs but please read the installation guides of each program carefully!

Downloading and installing LDView, POV-Ray, LGEO

Visits the repective software page