jit.gl.sketch framecircle has edges

lee wang's icon

hello list ,

having troubles while drawing a framecircle with jit.gl.sketch.
my framecircle has unexpected edges.

i am a bit lost.
does anybody found a workaround for drawing framecircles with jit.gl.sketch ?

patch attached.

Max Patch
Copy patch and select New From Clipboard in Max.

thanks in advance,
lee

dtr's icon

I 'm seeing the same. Not sure what's the cause. I was looking for jit.gl.sketch's equivalent of other gl object's @dim x y attribute but didn't find it.

bareimage's icon

If I understand your issue, here is some information. gl.sketch is using line segments to draw framecircle. By making the segment that is used to build circle smaller you can get smoother results. also please try @fsaa 4 in the jit.window. It will remove some edginess

Rajan Craveri - micron's icon

jit.gl.path could help you

lee wang's icon

hello list,

first i want to thank all of you for looking into this problem !

@fsaa 4 did not help in this case.
can not use jit.gl.path, because i have to draw hundreds of framecircles.

but i found the shapeslice message.
seems to be the "dim" for framecircle.

the reference says:
Sets the current level of decimation (resolution) for shape drawing commands (circle, framecircle, ellipse, frameellipse, sphere, cylinder, torus, cube, and plane).

but the edges are still there. only the parts between the edges gets smoother.
patch attached.

i think this is is a bug
perhaps someone from cycling74 can give a hint.

it would be nice, if i could get an answer soon.
i have to finish my project in 2 weeks ....

do not want to switch to openframeworks, because i like patching wit max :-)
it should be possible to draw a framecircle in opengl with max ;-)

Max Patch
Copy patch and select New From Clipboard in Max.

all the best,
lee

dtr's icon

> but i found the shapeslice message.
> seems to be the "dim" for framecircle.

That's indeed what I was looking for!

matmat's icon

hi
@lee
have you tried "antialias 1" message to "jit.gl.sketch" ?

lee wang's icon

thanks matmat,

but "antialias 1" has not an influence on these edges.
no one from cyling74, who can help ?

best,
lee

dtr's icon

Maybe you should send an email to C74 support.

Rajan Craveri - micron's icon

Hi, I have patched this js
let me now if it can help you
bye

4760.arc.zip
zip
lee wang's icon

hi micron,

thank you very much for posting this.
i will give it a try.
with this solution i will get a cmdlist in jit.gl.sketch of 10000.
but it should work ;-)

its a shame, that we can not do this "out of the box" with jit.gl.sketch.
if its not working i will go the openframeforks route.
i did some tests. it is incredibly fast, looks fantastic, but it is hard to code ....

I got the following answer from the cycling support:
"It's the nature of rendering a frame circle.
You could make two solid circles and make one an alpha, that will yield a neater circle.
Alternatively a circle bought into jit.gl.model will also give a good result."

i woud say, that nature of rendering a frame circle has bugs !
perhaps these edges is a feature :-)

i personaly prefere circles without edges ...
sample of a natural cycling74 frame circle rendering attached.
framecycle_bug.png

all the best,
lee

4763.framecyclebug.png
png
Rob Ramirez's icon

it has nothing to do with jitter or max. it's opengl and gpu dependent.
you have been given several solutions (use @antialias 1, use jit.gl.path, use two circles overlayed with an alpha).
the framecircle is drawn with lines to create an outline of a circle (ie frame).
if you want thick lines you should not be using framecircle.

Rajan Craveri - micron's icon

I changed a bit the arc.js and I'm playing with it
I want share it with you all
bye
Rajan

4771.arc.jpg
jpg
matmat's icon

hi
great patch Rajan, thanks !

Max Patch
Copy patch and select New From Clipboard in Max.

For framecircle i simply use a cylinder ...

Rajan Craveri - micron's icon

Oh! This is exactly what I was looking for when I decided to write it in javascript.
Thank you for share it.

lee wang's icon

whow matmat, thats a great trick !
thanks for sharing :-)