Development SIG Toolkit

You are not logged in. Would you like to login or register?



9/06/2019 7:26 pm  #1


[Lab-01] Z-Fighting on Torus for different n-values

So, I basically have the most of the lab done, however there's this one issue that I'm not quite sure how to deal with: For certain n-values (where n is the number of triangles/rectangles/faces), there's this flicker effect over the central horizontal circle and vertical circle. For the majority of n-values, this issue doesn't occur, but for the n-values that have this flicker issue, there doesn't seem to be an inherent pattern to which numbers will cause the torus to flicker around the centers. Is this to be expected, or is there a workaround to this?

tinyurl(.)com/yxmhnrby (<---- GIF to what my torus; remove the parentheses)

 

9/06/2019 7:27 pm  #2


Re: [Lab-01] Z-Fighting on Torus for different n-values

https://i.gyazo.com/b86a4ac1197c9474c4c23e813eae2953.gif

     Thread Starter
 

9/09/2019 11:12 am  #3


Re: [Lab-01] Z-Fighting on Torus for different n-values

It looks like you have declared triangles overlapping, for example your parameterization may be declaring the first and last set of triangles twice.

 

9/09/2019 12:12 pm  #4


Re: [Lab-01] Z-Fighting on Torus for different n-values

I thought so originally, but... like I said, for certain n, the torus has no layers which overlap, and for others, it causes this flickering issue through the center circles. I'm merely varying theta and phi between 0 and 2_PI. If I went ahead and subtracted 2pi/n (so, one face) from either or both for loops, then it fixes the overlapping issue for the n values that originally had it, but now there are cross section cuts through the n values that were fine originally. I'm not sure how to go about fixing this issue, as I said that the n-values that causes this overlapping versus the n-values that are fine don't seem to have a fixed pattern that I can check for (like, for every n that divides by 5, then be sure to not draw the last 2pi/n step).

     Thread Starter
 

9/12/2019 8:34 am  #5


Re: [Lab-01] Z-Fighting on Torus for different n-values

We can see from the image that there is an overlap. It may only happen for some specific situations depending how you implemented your stop condition. Print the angles you are generating to the console and debug your stop condition, and should then be able to find the problem.

 

Board footera

 

Powered by Boardhost. Create a Free Forum