You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @BachiLi , thanks for this awesome contribution!
I was wondering if you could give me a hint how to modify your code a bit. I was hoping to try out you painterly rendering app for sketching applications, and am not sure how to modify it to incorporate few things:
a) Remove the opacity before loss calculation / as a parameter. Sketching is done often with one pencil whose alpha is pretty much always 1.
b) An artist doing sketching usually has a constrained discrete palette to operate with (often with just black pencil / pen). It would be lovely to know how to constrain stroke colors to a specific palette (or rgb subspace)
I think I solved a) via:
for group in shape_groups:
group.stroke_color.data.clamp_(0.0, 1.0)
#Limit the opactiy
group.stroke_color.data[3].clamp_(1.0, 1.0))
Thanks in advance,
Anton.
The text was updated successfully, but these errors were encountered:
I'm also interested in color constraints. Specifically, I currently would like to setup a system using indexed color and then allow the system to optimise both the palette and with the color assignments of individual elements. Conceptually this seems possible through optimisation using an embedding or even just argmax across multiple scalar tensors each representing possible indexes into color table - but I haven't been able to code this up successfully thus far and would be interested in sharing notes.
Hello @BachiLi , thanks for this awesome contribution!
I was wondering if you could give me a hint how to modify your code a bit. I was hoping to try out you painterly rendering app for sketching applications, and am not sure how to modify it to incorporate few things:
a) Remove the opacity before loss calculation / as a parameter. Sketching is done often with one pencil whose alpha is pretty much always 1.
b) An artist doing sketching usually has a constrained discrete palette to operate with (often with just black pencil / pen). It would be lovely to know how to constrain stroke colors to a specific palette (or rgb subspace)
I think I solved a) via:
Thanks in advance,
Anton.
The text was updated successfully, but these errors were encountered: