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 / 10093
10092  |  10094
Subject: 
Re: Rendering implementation details
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 24 Jan 2005 22:13:07 GMT
Viewed: 
1881 times
  
In lugnet.cad.dev, Mark Tarrabain wrote:
I was envisioning how an LDraw renderer would be implemented if it were
done with OpenGL, and I've arrived at some questions that I can't answer
for myself.

I'm particularly wondering about line type #5, the optional line.
According to the LDraw file format specification: "This draws a line
between the first two points, if the projections of the last two points
onto the screen are on the same side of an imaginary line through the
projections of the first two points onto the screen."   I understand
what this means, but I'm confused about certain details of
implementation that could, as near as I can see, be the cause of some
inefficiency.

For this line type, using OpenGL one thing I came up with was that one
would use gluProject on each vertex on both line segments to see where
they would fall on screen, examine the end points, and then decide
whether or not to draw them based on that, but I would imagine calling
gluProject 4 times for each optional line listed in a part definition
(especially since not all of them are necessarily even displayed!) would
adversely affect performance.   The only other way I could see it
working is to do _all_ the rendering in the application, and not rely on
something like opengl at all.  Again, I would imagine this to severely
impact performance.

Could anyone enlighten me as to how this could be done without making
serious compromises in efficiency?  Or am I completely out to lunch
about the performance impact of the concerns I've mentioned?

Thanks in advance.

Someone once suggested to me (Dan from Microsoft maybe?) that given today
graphics libraries, one could probably get away with ignoring op-lines
altogether and use edge detection.  This would present a potential problem since
edge color is dependant on part color.

-Orion



Message is in Reply To:
  Rendering implementation details
 
I was envisioning how an LDraw renderer would be implemented if it were done with OpenGL, and I've arrived at some questions that I can't answer for myself. I'm particularly wondering about line type #5, the optional line. According to the LDraw (...) (20 years ago, 24-Jan-05, to lugnet.cad.dev)

22 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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