Final topic about Anti-Aliasing disease

Update


Here you can see a drawback of my tesselation. End of the line and some bad overlapping. Don’t know how to fix this easy. This is a color with some alpha. But hey! I know how to fix end of the line and I see that VASE Renderer has the same limitation.

Update2


Add debug for showing triangles at my tesselation. Hey. now its funnier!

6 Likes

awesome work!!! keep it up

1 Like

Is this dead :frowning: ?

1 Like

I hope not =) I was a little bit discouraged by the fact that cocos2dx maintenance and development now handled by just one man. but I will post updates soon.

2 Likes

Great to hear that!

Don’t know if someone checked this: https://github.com/krzysztofzablocki/LineDrawing

@owlet Any updates? :smiley:

Okay, I recently quit my job so now I’m on some sort of sabbatical and I’m planing to finish some of the works, like was presented in this thread so stay tuned and let see what will happens =)

If anyone here still draw lines and do custom graphics with cocos2dx (or everyone gone to make blockchain out of engine that can’t draw lines…)

1 Like

Updates: Rewrite code && refactor for approximation by triangles.
Apparently, there is a bug inside cardinal spline math inside DrawNode code, which messed up curve ends. Fix.

3 Likes

Updates: distinguish two separate cases for thick and thin lines. For thin, I used my tesselation algorithm. For thick, draw cardinal spline’s segments by segment shader works better. Added fillings for curves and dashed \ dotted-dashed lines. com-video-to-gif

Soon you will be able to grab things from github and leave feedback.

2 Likes

awesome :smiley:

Well,

I’ve posted my code. Hope someone will find it helpful.
If you have any thoughts, don’t hesitate to write me or open an issue.
I’ve tried to do my best.
Thanks,

5 Likes

GitHub - memononen/nanovg: Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations. is a cool tool :wink:

1 Like

Thanks. Seen this. Like other algorithmic not rendering libs mentioned here.
Do you have any reference about integrating it with cocos so that it worked for android ios win osx ? I found only one project and few not resolved mentions here at forum.

http://prog3.com/sbdm/blog/dj0379/article/details/39667221 this reference covered in ads and Chinese language with lost images.
small vector graphics add-on unresolved
SVG rendering and animation library for Cocos2dx unresolved

Maybe its good idea to provide some tutorial how to include some 3rd-party geometry library but we need to choose one of these which will be better fit.

Looks awesome! Definitely worth trying. I’ve been missing this for years. I even had to implement AA by myself, but not in so advanced fashion :wink:

1 Like


Will it work with new metal backend?

Guys,…I think we have a little problem here :smiley:

I google-translate description from Chinese but could you get some more information about what is it? Is this is some cocos2dx fork? With an extended pack of libraries? what else does it have? Sounds very interesting but it’s very hard from a not-China developer to even find this repo. I couldn’t find any English text about it.

I’ll try it with alpha from here and get back to you.


Apparently, draw node for metal backend implemented so I just need to check that drawing triangles stays the same at my code. The only complication is that alpha code from metal-backend doesn’t have xcode project so I need to craft one.

upd - checked. no, it dose not currently :expressionless: with few lines added I can draw thin lines and triangles but somehow drawSegment at base class DrawNode is behave differently.
I will try to make a patch for metal backend since its currently, as far as I can see, not in production (am I right?)

@owlet you can use metal-support branch of cocos2d-x. And please send a patch to that branch too.