WireFrame on X File
Author Message
WireFrame on X File

I need to load an X file saved whith 3DStudio MAX 4 in my sceene.
I have a good effect in solid mode bat i can not trasform the object in
WireFrame.
I need this WireFrame    ________
|               |
|               |
|               |
|_______|

and not
_______
|          /  |
|       /     |
|    /        |
|/______

sorry for my english. I am Italian VB programmer.

derek

Mon, 13 Jun 2005 23:59:49 GMT
WireFrame on X File
Hi,

DirectX  uses triangles, not quad. A quad can be "out of plane", or warped, even "butterflied"
(double X:  start with a quad, a sheet of paper, but bring the lower right vertex, corner of your
sheet, way past the original leftmost point... you still have a quad, in 3D, but a seriously warped
one) and interpolation techniques become much harder (possibilities of being not linear: in our
butterfly, there are 2 points for some given z-value ).

Furthermore, how would you "render" the case made of JUST three triangles?

o___________
|          /  |          /
|       /     |       /
|    /        |    /
|./_____|./

will you trim off the first diagonal? or the vertical? If the top left vertex, the one with the o,
is " way back",  and all the other vertexes in the same plane, then the vertical edge seems to be
the one to remove, since the two triangles it joined are "in the same plane".

If that is your test, then for each edge, find the triangles it is common to (if it belong to just
one triangle, no way we can remove it, and if it belong to more than two, the surfaces probably
look like the intersection of the flange and the web of  a T and such a border should be kept ).
Next, knowing the two triangles, you probably know the Normal to each triangle. Make the dot
product of the normal. If the result is close to 0.00, the normal are perpendicular and the edge is
sharp, keep the line segment. If the result is "close to" 1.00, the two triangles are roughly in
the same plane, then, you can remove the line segment. At the end, you are left with just the line
segments to be drawn like a list of lines.

Since you do not need to run the algorithm at render time, you can even base your algorithm using a
database.

Hoping it may help,
Vanderghast, Access MVP

Quote:

> I need to load an X file saved whith 3DStudio MAX 4 in my sceene.
> I have a good effect in solid mode bat i can not trasform the object in
> WireFrame.
> I need this WireFrame    ________
>                                      |               |
>                                      |               |
>                                      |               |
>                                      |_______|

> and not
>                                      _______
>                                      |          /  |
>                                      |       /     |
>                                      |    /        |
>                                      |/______

> sorry for my english. I am Italian VB programmer.