Subject:
|
Re: VB - parts and transformation matrices, Z-ordering, optional lines, bow-tied quads - help!
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Mon, 26 Mar 2001 18:36:24 GMT
|
Viewed:
|
523 times
|
| |
| |
In lugnet.cad, Steve Bliss writes:
> Sounds like it's a problem in your code to handle type-1 lines. Could you
> post some images of the problem renders?
Posted to http://www.brickshelf.com/cgi-bin/gallery.cgi?f=3892 . The problem
I have is with the eyes - the front view looks fine, it's just the side and
top views where you can see the problem. This is 3626bp01.dat (the one with
the POV definitions included, I just ignored them). The funny this is that
the handling of type 1 lines seems to work as the subpart is placed
correctly, only the discs and cutouts for the eyes are wrong.
> You can't completely sort polygons by z-order -- some polygons cross each
> other in z-depth.
>
> Are you using a z-buffer to track the z-depth of each pixel in the x-y
> raster? The basic, non-optimized approach is something like this:
Ah, I'm not rendering each pixel individually, I'm using the Polygon and
Polyline GDI API calls to just specify the vertices of each polygon and let
Windows do the hard work. Guess that makes Z-buffers a bit of a nightmare!
Thanks for the code though, I might just give that a try.
> LDraw sorts the 4 vertices (mapped into the screen-world) by ascending Y,
> then increments from min(Y) to max(Y), drawing horizontal lines between the
> outermost X values at each Y. It's ugly and slow, but it does the job.
Great, that should be reasonably simple to do.
Thanks for the help.
Dan
|
|
Message is in Reply To:
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|