Subject:
|
Re: Rendering implementation details
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Sat, 29 Jan 2005 03:06:38 GMT
|
Viewed:
|
1921 times
|
| |
| |
Don Heyse wrote:
> I don't see it. Are you sure this works in the perspective projection?
> Because I can't quite figure out what the magic view vector is in that
> case. I think you'd need to calculate one view vector for each edge
> endpoint, which brings the number of transformations back up to 4.
Actually, one can bring the number of transformations down to 1 for the
entire _object_. Interesting what can happen when an idea sits in the
brain and percolates for a couple of days.
A new idea I had was to just transform the camera position once for each
object in the file (simply by using the inverse of the matrix that the
object is using). There's no need to transform the face normals at all
from what they are in the file because one would be using an eye
position in the same space as the part itself. The vector towards the
eye would just be the vertex at one end of an invisible edge subtracted
from the appropriately transformed camera position, so there's basically
just one vector subtraction per edge considered.
Further, it doesn't even matter if the orientation on the polygons is
the same... during initial processing of a part file, one can examine
each edge in the file. If an edge is part of two polygons but its
vertices are in the same order both times then that means that the two
faces are being described with opposite winding. So it's always
possible to find out if adjacent polygons are facing opposite directions
based on their normals' dot products with a vector towards the viewer.
So edge highlighting is entirely possible in an efficient way even on
non-BFC compliant parts. And with a little more up-front work, you
could even reorient all the polygons on an object to have the same
winding and determine which direction it was, making any part BFC
compliant at load time.
>> Mark
|
|
Message has 1 Reply: | | Re: Rendering implementation details
|
| (...) Ok, I drew a better picture (2 planes in space and a floating eye) and I'm starting to see. Maybe you're onto something. It takes 2 surface normals and one point on the edgeline to divide space into 4 quadrants. Then you only need to figure (...) (20 years ago, 29-Jan-05, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: Rendering implementation details
|
| (...) I don't see it. Are you sure this works in the perspective projection? Because I can't quite figure out what the magic view vector is in that case. I think you'd need to calculate one view vector for each edge endpoint, which brings the number (...) (20 years ago, 25-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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|