To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 4759
4758  |  4760
Subject: 
Re: L3DView v0.5 view LDraw models in real-time 3D
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 20 Jun 2000 21:27:04 GMT
Viewed: 
601 times
  
In lugnet.cad, Travis Cobbs writes:
I will probably make the source available at some point, once I have a
chance to clean it up, and I get to a more stabilized version.  I tried to
keep the Windows-specific stuff separate from the OpenGL and generic model
processing logic.  However, the OpenGL code is fairly closely tied to the
model loading code, which could make it more difficult to port to, say,
DirectX (not that that anyone would want to ;-).  I may port it to Linux
myself as a learning experience with either Gnome or KDE.  If I do produce
my own linux port, I would definitely make the source available.

Rats!  I don't know how many times I've heard that.  "I'll release the source
after I clean it up."  L3lab, Ldlite 2.0, MLCAD?  What is so embarrasing about
developmental code?  It's not like dirty underwear.  Doesn't anyone realize
that nobody EVER gets around to polishing things up because it's always more
interesting to add NEW stuff.  Meanwhile I'm missing out on the chance to
learn something here.

Out of curiosity, did you use OpenGL lighting, or the lighting out of
LDLite?  Looking at your screenshots, I would guess the latter, since it
certainly looks significantly different from the OpenGL lighting I used.
However, this may just be the fact that I have a specular component to make
the models look shiny.  And it also may just be due to different values for
ambient (I used a fairly low ambient value).

I actually use OpenGL lighting.  When I decided to port ldlite I figured the
quick and dirty approach would be to let ldlite do the parsing and build up
the model in world coords.  I take this and pass it on to opengl to do the
viewing transformation and the lighting.  I always figured that "someday" I'd
redo the part to model transformations in OpenGl with display lists.  Maybe
the same someday when everyone else's source code gets polished up and
released...

I don't think I used a specular component in the lighting because I didn't
like the glare at certain angles.  You could check the ldglite source to
see what else is different about our lighting models.

A few notes about the spinning.  The "standard" matrices that look good for
the oblique view in LDraw actually skew the geometry, so they only look
right as long as you don't rotate.  If you start out with a "standard"
matrix and then rotate, the whole model will look skewed.  My rotation code
happens to be fairly ugly at the moment, but if you want me to send it to
you, I can.  Also, if you want to do the rotations in real-time, you're
probably going to have the skip drawing the conditional lines.  If you want
to go with the bounding-box rotation that MLCad has, this won't be a
problem.

Yeah, I tried using the standard matrices, and just the opengl matrices, and
then a mix of the two, but I always managed to screw something up.  I'm not
really concerned with realtime rotating.  I just wanted to be able to do a
long drag on the mouse followed by a big rotation around the axis perpendicular
to the mouse motion.  I can't remember now but I think my problem was applying
a 2nd rotation to the already rotated model.  If you send me all the code
I'm sure I could find the rotation parts.  I swear I won't look at the rest
if you don't want me to. ;-)

Since I am using the OpenGL T&L pipeline, drawing the conditional lines will
be extremely difficult for my program.  OpenGL doesn't exactly encourage
examination of the transformed coordinates, particularly not in a real-time
scenario.  I also use a display list, and all the conditional lines would
have to be drawn manually each time outside the display list.  I'm first
going get the standard lines to (optionally) show up before even thinking
about the conditional lines, though.  Once I have them, I should be able
make lighting optional, which should hopefully speed it up even further.

I know what you mean.  All those GluUnProject calls for the optional lines in
ldglite are pretty expensive.  It looks nice though when the model isn't
moving, like for screen dumps.

Don



Message has 1 Reply:
  Re: L3DView v0.5 view LDraw models in real-time 3D
 
(...) I couldn't agree more, you don't have anything to loose by making the source code available, you might even get some help from other people (I've contributed small patches to LDLite and LDGLite for example). I've said that before but I'll say (...) (24 years ago, 21-Jun-00, to lugnet.cad.dev)

Message is in Reply To:
  Re: L3DView v0.5 view LDraw models in real-time 3D
 
Note that I am moving this thread into the lugnet.cad.dev group. Don Heyse <dheyse@hotmail.spam....away.com> wrote in message news:FwGIDn.1Cw@lugnet.com... (...) I will probably make the source available at some point, once I have a chance to clean (...) (24 years ago, 20-Jun-00, to lugnet.cad, lugnet.cad.dev)

12 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