![]() KDE Developer ![]()
|
So, I am one of the Google Summer of Code students for Krita this year.
My project is to make a Tangent Normal Brush Engine. This is a brush engine where the colour of the brush is determined by the tilt of your stylus. Normal maps are colourful maps that actually encode the tilt of a 'normal vector' which is used in lighting calculations. Because we can treat the stylus as a sort of vector, we can use the tilt to determine the resulting vector. The following task is where I keep track of all my bugs/tasks related to this gsoc. https://phabricator.kde.org/T87 krita-testing-wolthera is where the engine is being developed. Current State as of 2nd of august: Merged! Update of 30 of july: Branch is stable! https://www.youtube.com/embed/qiX60EWyMF8 https://www.youtube.com/watch?v=Zm7vMJbHDQ0 Added preview. Changed UI a bit. Fixed a minor bug. Added normalize filter. Cleaned up Code. Made demos(check youtube links above) update of 21st of June: branch is stable! ![]() I managed to make the phongbumpmap filter accept normal maps if asked, which means that you can now do live-preview on your normal maps, while drawing htem. (dmitry fixed the filter layer slowdown). Because the normal-maps also give us depth information, the result looks a lot smoother than the bump-map version. There's also a tilt-cursor, and I am attempting to get the brush working with both canvas rotation as well as mirroring for both the normal free hand brush and the multi-brush. The biggest bugs are related to this. update of of 16th of May: Branch is stable! Fixed preset issue. Got canvas rotation to be taken into account for the tilt. And I made a limiter for tilt-elevation. Unfortunately I couldn't get that to work for tilt-direction ![]() Next, I will be working on cursors for tilt and colour feedback ![]() update of 28th of April: ![]() We have a working brush engine that changes colour based on tangent encoding, and allows you to use either tilt-direction, drawing angle(for flow maps) or stylus rotation for the horizontal and vertical components of the vector(the ascension) and tilt-elevation will always be used for the depth component(the azimuth). The branch is currently unstable due to issues with determining defaults. Canvas rotation is being held back because there's no easy way yet for me to retrieve the rotation of the view in the brush engine, but the code is ready to use it. Limiting the extremities was held back by wondering what type of widget it needs, but I'll just go for four spinboxes for now.
Last edited by TheraHedwig on Tue Aug 04, 2015 4:09 pm, edited 4 times in total.
|
![]() Registered Member ![]()
|
good luck with your project, I can't offer any feedback, because I don't really do as much 3d lately, but i'm sure you'll find a crowd (polycount?)
|
![]() KDE Developer ![]()
|
Thanks! Yeah, I'll be able to find people ![]() First I want to get the basic elements done though. Also, I updated :3 |
![]() Registered Member ![]()
|
You seem to like working with "colour stuff" a lot
![]() |
![]() KDE Developer ![]()
|
It is a bit actually. The colour code is where I started with Krita programming, and it's a bit extensive, so I got to know it really well, and I know a lot about colour theory and the like, so I like tinkering with it. Also I understand colours; they're pretty ![]() |
![]() Registered Member ![]()
|
just wondering how the brush engine might be used in a normal work-flow...?
|
![]() KDE Developer ![]()
|
In a normal map workflow it would be used to make normal maps from scratch or to clean up baked maps. In a painting workflow these normal maps could be useful as an input to a filter, where they could be used to deform the rest of the image, or as an input the the phongbumpmap filter where they'd give the possibility to be an alternative way of drawing light and shadow.(Akin to a relief) |
![]() Registered Member ![]()
|
Just a general wondering from someone with only a slight experience in 3D...
Seems a little odd trying to create normal maps in a 2D environment as it would be difficult to visualise the work without seeing it in 3D - unless you have an aptitude for translating the colours into depth information in your head. - or maybe I got it wrong and it would be used for small scale detailing like skin pores and the smallest wrinkles Painting work-flow and displacement sounds fantastic. Am I mistaken in seeing it as a significantly more powerful bevel/emboss effect? Anyway best of luck with the project, I do hope it succeeds |
![]() KDE Developer ![]()
|
Well, that's the thing, normal maps are not depth information; they're surface difference information. So the angle of your stylus would give the angle of the surface. Hence why there's tilt and colour cursors mentioned as well, so you can see the tilt or colour your stylus tilt produces more clearly ![]() The idea for making them from scratch would mostly be to accompany hand painted textures. The normal maps that come out of this have a much more painterly quality. Adapting the phongbumpmap filter to take normal maps would allow these to be more readable in terms of light/shadow.
A little, yes. I hope so too! |
![]() KDE Developer ![]()
|
Updated with screens of the phongbumpmap filter working!
|
![]() KDE Developer ![]()
|
|
![]() KDE Developer ![]()
|
To round out my GSoC, I started working on a widget that helps you pick a color profile. After spending two weeks on decyphering the lcms apidox and fighting the widgets, I ended up with the following.
![]() There's still much to do, amongst which actually having the OK/Cancel buttons do anything. It also needs to become prettier in terms of proportions. |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]