Eufloria > Eufloria Classic Mods

Stupid goddamn erroneous pseudovertex extermination thread.

(1/3) > >>

annikk.exe:
I gotta figure out why these erroneous pseudovertices are being created.

They are created inside a single rotating cube, when a foreground edge intersects with a background edge.
The pseudovertex is created just at the point where this intersection would occur.

Now, the pseudovertex generating code should check it in 2D first and discover it's "inside" a face, so it should then proceed to the next part of the code where it checks to see if the pseudovertex is hidden behind anything (and it is!  it's hidden behind a face...  or it's right on the edge of a face....)



Hmm.  Maybe it exists in a microscopic gap between the faces?  Maybe in that area, the code considers it behind neither one face, or the other, because (by its very nature) it is perfectly balanaced in between them?

So I guess I'd need to add some kind of buffer zone around faces or something..?

annikk.exe:
That won't work.  If I create a microscopic buffer zone around faces that prevents pseudovertices being added, all the REAL pseudovertices will fall inside this area and as a result won't be rendered.

That would be wrong.

I need to figure out how I can programatically distinguish between the erroneous pseudovertices and the real ones.

annikk.exe:


The red dots are the erroneously created pseudovertices..

annikk.exe:
Perhaps if I add one more check at the end, right before the pseudovertex is added..

At this point we know:

1) The pseudovertex is "inside" a face in 2D
2) The pseudovertex is either visible, or stuck in the microscopic gap between two edges like above.
3) We know the 2D and 3D coordinates it occurs at
4) We know which edge we're going to be adding it to


I could cycle a tiny bit forward and a tiny bit backward along the edge for each potential pseudovertex.

If the pseudovertex is not hidden behind anything when cycled forward along the edge by 1%, OR it's not hidden when cycled backward along the edge by 1%, then it should be visible.
If it's hidden in both of these circumstances, we've captured an erroneous pseudovertex that should not be rendered!

This sidesteps the problem of vertices erroneously being rendered in between faces.

annikk.exe:


The rule is:

1: Cycle 1% forwards along the edge: Is this visible?
2: Cycle 1% backwards along the edge: Is this visible?

If the answer to EITHER 1 or 2 is Yes, SHOW THE EDGE.
Otherwise hide it.


That should work, right..?

Navigation

[0] Message Index

[#] Next page

Go to full version