Forums > Jitter and 'squary' circles

March 25, 2009 | 7:47 pm

Hi all,

i am trying to draw circles in but the circles seem to be a bit ‘squared’; you clearly see that is consists of multiple polygons instead of being a real circle (see image below, ignore the fact that is is not anti-aliased, that is because this shot was taken on my macbook, but can still see it)

I actually want to draw an inverse circle: So fill the entire sketch with black except leave the circle transparent, right now i am just drawing a big torus with the lighting turned off to achieve this, is there a better way? Like cutting out a circle of a rectangle.

March 25, 2009 | 7:53 pm

why not create a circle texture in photoshop with an alpha channel?

March 25, 2009 | 8:06 pm

The rest is also in and the texture would have to be very large because the ‘cut-out’ circle should be able to scale from very little to very large while the rest still covers the entire window.

March 26, 2009 | 12:05 am

i think your looking for upping @shapeslice see the help on usage

March 26, 2009 | 6:58 am

Never mind the bit below, i did it in the wrong order :S

But to my second question: is there an easy way to draw a plane with the (adjustable) center cut out?

(stupid me)Looking at the help i see that i can change it, but it doesn’t seem to change anything. I tried some different values. Also in de help-patch the shapeslice button icw a circle doesn’t seem to make it better formed.(/stupid me)

March 26, 2009 | 3:57 pm

this might help:

gllinewidth 20,
framequad 1 1 0 1 -1 0 -1 -1 0 -1 1 0,
gllinewidth 1

The last message is to reset the linewidth to its default value for any other drawing messages that might follow.

March 26, 2009 | 6:56 pm

IMO, the best option for this is to use a simple shader, since it gives you the ability to scale and feather the mask without risking resolution or geometry issues. There is a "spotmask" shader included with Recipe 38: BrightLights:

Simply pass your texture through a slab with that shader loaded to generate a circular alpha mask for your texture. You might also find the shaders in the jit-shaders/transition folder useful as well.

Andrew B.

Viewing 7 posts - 1 through 7 (of 7 total)