Subject:
|
Re: Alternate Type 5 line algorithm and other BFC questions...
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Fri, 19 Apr 2002 18:24:42 GMT
|
Viewed:
|
793 times
|
| |
| |
[snip]
>
> Normally you don't bother to enable Z buffer writing when drawing the
> transparent surfaces, because they are the last thing drawn, and it won't
> matter. However, it doesn't hurt anything to enable it, other than slowing
> it down a little. And if you want to use this algorithm, it has to be enabled.
>
Hmmm. I'd love to be able to answer this question for sure.
I implemented this logic in my J3d code last night, and I can see examples
where it works very well. Unfortunately I don't have all the rest of the BFC
logic quite right yet so I have many polygons facing the wrong way and therefore
the wireframes are also showing. So right now I know I see many extra lines,
wether ornot they'll all be fixed by the proper BFC logic I don't know.
I think Travis may be right if he has that level of control over when the
Z buffer is used, and what order the filled/wire polygons are drawn. I'll
have to dig deeper into J3D to see if I have the same conrtol. I know I can
get it to do both retained, and immediate (and mixed mode) rendering, so
something may be possible.
Actually this brings me to a new question...
Previously I posted this pseudo code for the BFC logic, I didn't get
any "Hey that's wrong!"'s so Im guessing it's correct. Assuming it is,
can anyone give me an example of pseudo code for the isMirrorMatrix()
function? My Linear Algebra/Matrix Math is a little fuzzy.
if( preceeding_line == '0 BFC INVERTNEXT' ) then
{
if( ! isMirrorMatrix( matrix )) \\ Not mirrored so *do* the INVERTNEXT.
flip_faces( sub_file );
else
do_nothing(); \\ Mirroring alreay inverts the subfile
\\ so ignore the INVERTNEXT
}
else
{
if( isMirrorMatrix( matrix )) \\ Not inverted, but mirrored, so *undo*
flip_faces( sub_file ); \\ the inversion the mirror matrix caused.
else
do_nothing(); \\ Not inverted, not mirrored, do nothing.
}
attach_geometry(matrix, sub_file);
--
_
-------------------------------ooO( )Ooo-------------------------------
Kyle J. McDonald (o o)
|||||
\\\//
(o o) kmcdonald@BigFoot.COM
-------------------------------ooO(_)Ooo-------------------------------
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: Why Type 5 Lines?
|
| (...) I understand what you are saying, but it won't happen that way if Z buffer writing is enabled during the drawing of the transparent surfaces. The transparent surfaces aren't really transparent. They're just blended with whatever is behind (...) (23 years ago, 19-Apr-02, to lugnet.cad.dev)
|
21 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
|
|
|
|