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 / 3510
3509  |  3511
Subject: 
Re: L3Lab - yet another LDraw viewer
Newsgroups: 
lugnet.cad
Date: 
Tue, 15 Feb 2000 00:42:04 GMT
Viewed: 
930 times
  
Thank you all for the many nice comments.

Here follows replies to several questions:
Michael Lachmann wrote...
Congratulations! It's realy a good viewer and bretty fast too. Just for my
understanding - is there any windows 3D Library used or is it your own
creation?

Maybe I could take over some ideas from your progi? I think it would be
cool in MLCad too.

Again, good job!

Thanks Michael. L3Lab is built on MFC (linked statically), it hasn't any
OpenGL, DirectX or other libraries. It is written in C/C++, no assembler.

I think it would be great if we could share ideas/code/resources.
(for a start I could certainly use your color selection dialog ;-)


Sproaticus wrote...
Damn.  It's fast, it's clear, it's easy to use.  It rips apart DAT files for
analysis.  It dumps all kinds of diagnostic data on the model.  It gives my
Tantive IV all kinds of pretty colors.

Lars, after I get over how amazingly cool this app is, I'm gonna flog you with
a lasagna noodle for keeping it away from us for so long!  :-,

Yeah I know, but it would be even more embarrassing to wait any further!

Some questions:
Does it use OpenGL or some other trick for speed?

No, pure C/C++!

Do you plan on L3Lab being a viewer only, or will it eventually be a LEdit
replacement?

I did plan for an LEdit keystroke-compatible replacement, but then MLCad came!
I think it is pointless competing with such a good editor as MLCad.
Besides I haven't done any work on the editing part either, just some thoughts.
The step (or rather leap) from a viewer to an editor would require several
dialogs for selecting parts and colors, an editor window, highlighting,
mouse selection, etc. So I spent my time on speeding up rendering.

Do you have any plans for saving the output; e.g. to BMP or Postscript?

No, not really. You have these functions in the other programs.

Do you plan on releasing the source code?

Yes. But I would like to reorganize the code first. Remember it is still
an experimental program - all sorts of speed-up algorithms are present
in the code controlled by some flags. Many too-slow tries should be
deleted first.


Chris Dee wrote...
Well done Lars and thanks for releasing it. The mouse controlled rotation will
be a great help for checking new parts.

I especially like to have "Show all colors as transparent" ON and "Dither
transparency" OFF when rotating new parts. And random colors.
Also "Show ALL Line Type 5" is useful.


Anders Isaksson wrote...
Very nice, Lars. It's the first .DAT renderer I've seen that can (really) be
used on my large house/castle models (~2000 pieces). Perhaps this has been
discussed before, but how do you manage the speed? L3Lab has about 1/10 to 1/2
of the BlockCAD speed, and BC only renders *very* simplified bricks, while
L3Lab does the *full* LDRAW pieces (and more)!

Impressed I am.

I use various tricks for speed, but generally I just try keeping expensive
computations out of loops and just do what is necessary.
One trick is to draw studs as the last thing. Most studs are not visible,
and drawing them at the end enables me to reject most of them simply by
comparing the minimum z-value of the boundingbox of a stud to an area
in the z-buffer.
Computers are very fast nowadays. I have to pinch my arm when I run floating-
point tests and see that my computer delivers 200 MFLOPS, amazing!
The number 3 renderer in the Test menu uses floating-point z-buffer.


Steve Bliss wrote...
Wow.  I'm amazed.  My ridiculous big ship renders in 18 seconds.  Regardless of
the zoom setting.  LDLite takes some 80 seconds on the same model.

Really, I think the zoom setting does matter?

The choice of yellow as the edge-color for red was unexpected...

The edge color of 4 is 12 light-red, and I can see my light-red is
rather yellow, RGB(255, 154, 33) as opposed to LDraw RGB(255, 85, 85).
My light-red was chosen for L3P's 32+12=44 Transparent light-red (orange),
when L3P used the same colors (RGB values) for non-transparent and
transparent colors. I have changed this for the next L3P, as this
tweaking/compromising of RGB-values to fit both sometimes resulted
in inexpedient colors.

BTW, the edgecolors are (Jacob, you can add this to the FAQ):
// Color24 has edge colors (contrast colors/complement colors) for colors 0..15
// Complementing is not reversible for colors 6,7,14,15.
// i.e. Color24[Color24[6]] == 8
int Color24[16] = {8, 9, 10, 11, 12, 13, 0, 8, 0, 1, 2, 3, 4, 5, 8, 8};


Bram Lambrecht wrote...
Awesome program!  However, since questions/suggestions are welcome, I'll give
some :)
1) I like to be able to see how a model is put together--is there a way to
   render the file part by part?

"Refresh after each part" in the View menu updates the display after each part.
It takes 10-300% (!) longer than drawing the full model off-screen and then
updating the display. But I guess you are looking for some kind of step-function?

2) Can I turn off error messages?  For example, it's annoying that it tells me
   I only have 65536 colors every time I start the program.

I have experienced some funny problems on my graphics board (NVidia RIVA 128ZX)
when I only use 65536 colors, so I thought I'd better issue a warning. There were
differences in the background color in the updated areas.
But I'll try to add a "Do not show this prompt again" checkbox.

3) Can I change the default background color, zoom, etc?

Well, not yet. I still need to figure out what the best GUI for camera settings
would be. And I need to make a dialog for general/default settings.

4) What do the 1,2,3,5, and 6 do under the Test menu?
   (When I render one of my models with 1, some of the studs disappear, with 2
   and 3, the shading is funny on inside corner slope bricks.)

1,2,3 are different redering engines for compaison.
5,6 are just menu entries to set some internal flags for switching
Some View menu entries may not work for 1 or 2.
6 is BFC testing, however no BFC metacommands support yet...
I probably should have dimmed the Test menu ;-)

5) What command line options does the program support?

Currently only a filename (used when dropping a file to the program icon)
But I have thought of -P for polling a file from LDAO.
Now you have to turn on polling in the File menu.

6) Does Print use vector or bitmap images?

Uh-oh, the Print menu entries just came along with the MFC project template.
I probably should have dimmed these too ;-)

I like a lot of the features you've included so far--eg, shading without edge
lines looks almost like POV!  Random colors is fun too...

Random colors was intended for part inspection.
Click on it multiple times to reshuffle.


Fredrik Glöckner wrote...
I'm stunned speechless!  Wow.

You may consider restricting the views to be -- uhm, what's the
correct term again? -- isometric?  When starting out with an oblique
view and rotating with the mouse, you may end up with a view that is
"skewed".  I think that forcing the axes to be perpendicular and
equally scaled may be a good idea.

and Sproaticus added...
This happens only (that I've seen) if you use the "Ldraw View" view, which is
slightly skewed in and of itself.  If you use any of the true isometric views
(starting from the toolbar button *after* the "Ldraw view"), the model doesn't
skew during rotation.

This is correct. The standard LDraw 3D view (which L3Lab starts with,
and which you can select with the toolbar button with the green dot)
is not an orthographic view, it is oblique. So when applying rotation
to the standard LDraw view matrix, you get a more and more skewed image.
I did think about automatically switching to orthigraphic when pressing
the mouse button, but I left it as a "feature" because it looked funny.
But I agree, it is confusing. I have now changed to code to do the switch.

Fredrik Glöckner continued...
Also, I would like to se an output of the transformation matrix of the
current view (for use in, eg., LDAO or LDraw), and it would be nice to
be able to save the current image.

You can have the matrix in Test/Statistics.
Do you want a one-liner too to paste into other programs?

To save bitmaps: Use Alt+PrintScreen and paste it into Paint or PSP ;-)
(or continue lobbying! I don't know if there is an easy way to save a
bitmap. I think ldlite uses an external library!)


John Jensen wrote...
Hey!! This is almost exactly what I've been looking for:)
Great, very nice with the "rotate with mouse" feature.

Some suggestions:
When exporting to POV it could be nice to export the view in the
window (or am I doing something wrong?)

Hmm, that should have been my surprise for the next release: a POV
previewer. I am currently working on the GUI for the camera setting,
the true perspective rendering with vanishing points looks great
when you rotate using the mouse! However, I need to solve some clipping.
The POV file generation from L3Lab has not been tested.

How about a feature to examine a dat (or multible dats) for missing
parts, and write a log?

L3P does that in the next version (and you have a beta :-)

And yes, it could be handy to be able to adjust which errors should be
displayed.

There is some dilemma here: I would like to mark lines with errors in
the tree view, but the errors are corrected during input, so they don't
exist any longer...
Also, some errors like "singular matrix" will prohibit POV file generation,
but they could pass through the renderer without problems. Should I keep
these lines in memory and do a second check when writing POV.
Yes, probably. However, it requires some reorganization...
But I agree that you should be able to set the error/warning level.


Selçuk Göre wrote...
I've just uploaded several DAT files to dat.models. They are mostly
from my childhood, just before the darkages time, when I was 12-13
years old (1982-1984). They all computerized versions of physical
models(1) and my collection was a very limited one(2) at the time
that I built those, so sorry about stupid looking color schemes and
absurd use of pieces.

The models are generally consists of 500-1500 pieces. I suggest using
newly introduced renderer, L3Lab, since and its rendering speed and
on the fly rotation are just like magic..:-)

Thank you for the recommandation.
And it's nice to have such large, well-built models to try L3Lab
out against.


I know L3Lab is far from finished, I just wanted to share it with you,
better late than never :-)
I do appreciate comments/suggestions, so keep it coming!
/Lars



Message has 5 Replies:
  FAQ update (Was: L3Lab - yet another LDraw viewer)
 
Lars: (...) Done! (URL) well, Jacob ---...--- -- E-mail: sparre@cats.nbi.dk -- -- Web...: <URL: (URL) > -- ---...--- (25 years ago, 15-Feb-00, to lugnet.cad)
  Re: L3Lab - yet another LDraw viewer
 
(...) <snip> Not at all..:-) People who creates amazing tools and shares them with others have always a place at my heart. (...) Not at all again..:-) Here is just some recommendations (about your viewer) * How about adding a "panning" function? I (...) (25 years ago, 15-Feb-00, to lugnet.cad)
  Re: L3Lab - yet another LDraw viewer
 
(...) Just don't get bogged down in the cleanup! Hey, I released the LDAO source code. And that's some of the ugliest code I've ever coded. (...) L3Lab will definitely do a lot to help with parts-inspection. Even just being able to rotate with the (...) (25 years ago, 15-Feb-00, to lugnet.cad)
  Re: L3Lab - yet another LDraw viewer
 
(...) I think it would be useful to have the one-liner as well. Fredrik (25 years ago, 15-Feb-00, to lugnet.cad)
  Re: L3Lab - yet another LDraw viewer
 
(...) Maybe not, but the red/green display is cool. I look forward to support for BFC meta-commands. Steve (25 years ago, 7-Mar-00, to lugnet.cad)

Message is in Reply To:
  L3Lab - yet another LDraw viewer
 
As you may know I have been cooking on this L3 program for more than two years now (not that this tells anything about its size and quality ;-) However, I believe L3 now has so many useful features that many of you (especially part authors) also (...) (25 years ago, 11-Feb-00, to lugnet.announce, lugnet.cad, lugnet.cad.dev)

26 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