I’m testing it with 56398 (from graphicall).
But I cannot enter “svgwriter_image.py” in the “Style Modules” of the “Python Scripting Mode”.
I do copy/paste it into the Textfield, but “svgwriter_image.py” disapears right after pasting it.
I doublecked that the “svgwriter_image.py” is in “$BLENDER_DIR/2.67/scripts/freestyle/style_modules/”
Had dropped this bit to concentrate on life and school\work picked it up again when I saw it was being integrated into blender
work on shading and light the scenery, I have manage to move from blender toon material to lambert without losing to much of the original effect(on the characters at least)…blender toon is damn bad at flat surfaces and multiple lights depending on the situation.
disclaimer: the Dojo model and based textures are NOT mine downloaded from turbosquid
supposed to be two images dark and lit, can’t figure out how to remove third sry
Hello everyone! Great job again T.K, i just got to start using some of the freestyle line modifiers and they’re really cool.
This is Ballot, a comic character. Yes, we’re using blender for comics thanks to freestyle B-). The standard process is to draw the character, ink then scan into your computer for colouring but I found this to be waaay faster. You only have to model once and change the background and pose. I later discovered that Congcong09 was doing the same thing but the difference here is its all blender + freestyle, no real drawing ;-).
I actually wanted to submit this for the splash 2.67 contest but I dont have Gimp and may not be able to download it soon cuz of bandwith :’(.
I used about 3 different line sets for freestyle and the toon shaders and just one sun lamp for the inking effect. I’ll upload more pics and probably start a new thread soon.
Cheers
i’ve:
swapped while with for loops (where possible)
used list comprehension where possible
made the pyBackboneStretcherShader work again.
overall made code more compact
it would be nice if you could check on some comments i’ve made and on the overall code style.
planned:
add docstrings (need help here )
fix all geometry modifiers and some other modifiers (need help here too)
renaming of some variables (use n for len(stroke), l for stroke.length_2d ect. in every shader)
Tk, I couldn’t get step 2 of your intructions to work.
“In the Freestyle tab in the Render Layers buttons, select the Python Script Mode from the Control Mode pull-down menu, and add svgwriter_image.py into the style module stack.”
Nice Freestyle renders, guys! Thank you for sharing.
flokkievids,
Thanks a lot for reviewing the code. Many relevant questions have been raised. I feel like most of them need further review and checking before they are incorporated into the code base, and it does not looks like it is the right time now to do so. For now I have just updated shaders.py in the trunk revision 56482 by taking account of those suggested code changes that may cause backward incompatibility, because such changes are better done before the official 2.67 release (otherwise the changes would break a lot of new style modules written by users).
By the way, what is your general impression about the existing shaders written in Python? I feel like they are mostly just examples of what the Python Scripting mode can do and nothing more than that. Some of the Python shaders are prototypes of the corresponding shaders written in C, so the Python versions serve better as a starting point for writing new shaders rather than intensive use for production. My impression is that it would make more sense for us to focus on code readability in terms of coding style and additional comments.
jikz and Light BWK,
I am going to look into the reported problem in color blending math as soon as possible.
For what concerns the distance measurement for the Distance From Camera modifiers, the new 3D ruler seems to exactly meet the request. As far as I tested, snapping works only with mesh vertices and not with a camera, so it is not straightforward to use this functionality to measure the distance from the camera to mesh objects. Some further investigation is needed.
Light BWK,
Concerning the extra alpha channel in the color picker, I was not able to exclude it from the UI because apparently there is no option to customize the color picker in terms of alpha. In fact, the alpha channel is just ignored when color ramps are used for stroke shading, so there is no practical issue there except for redundancy.
Alain and Elemith,
The instructions for loading SVGWriter were out of date. I just updated the package document to reflect the recent changes in the Blender/Freestyle UI. I hope the updated instructions make sense to you.
Here’s a little test I am working on usinf the 2.67 release candidate.
Kinda drew inspiration from the Disney Paperman short’s shading technique (though without the physical drawing aspect of it :rolleyes:).
I too think that the shaders are more of a reference for writing your own shaders, since the main ones are already implemented in c
and the rest is so specific that they will seldom be used in actual production.
exactly because of this I think it is important for those shaders to be written clearly and come with some good documentation, hence my wish to add docstrings to the shaders. in addition it is important for the shaders to actually work. I have now got some more shaders working, but apart from the pyBackboneStretcherShader it is hard for me to judge whether the fixed shader produces the wanted shader.
also the swapping of while with for loops takes away a problem that got me many times: “it” stood for both the iterator (StrokeVertexIterator) and the current itteration’s object (StrokeVertex). also, it compacts three lines down to one.
Most of the other work i’ve done, and still needs to be done, is make the code more python 3.x. currently it seems a weird mix of c(++) style coding and python 2.x translated over to 3.x.
since 2.7 many convenient changes have been made to python which can make the shaders a lot more simple/more compact. I would like to still work on that and after 2.67 see what can be commited to trunk.
I recently spend a few minutes with freestyle, and I have this question.
Unless I am missing something, is it true that freestyle only draws outlines and doesn’t actually draw NPR filters over the entire scene? (requiring the use of toon shading, ramps, ect…). Because I initially assumed that you could shade your scene normally and Freestyle would take care of the rest, but maybe I was mistaken over what the main goal of Freestyle is.
Also, I can already see in these cases that color ramps as well as ramp-shading are your friends here (helped by the fact that the color-ramps have a ‘constant’ interpolation option.). It would be interesting to see this done using node-based shading because they would allow NPR with things like ambient occlusion as well.
Freestyle is only for edge detection and stroke rendering. The shading is done by BI or cycles if you so choose, but that is a bit trickier. Color ramps and material nodes are so far the best methods to achieving many NPR results. This is also the goal of ATS, to “color in the lines” so to speak!
If this were a blender freestyle image then the upper left image would be the output of freestyle and the others different shading applied to the base model and then combined with the freestyle render.
I’ve been looking at quite a few freestyle renders I don’t know why but even the really good ones still have a “3d” feel to them.
IE they don’t feel flat like hand drawn images. I don’t know if it is the line art or the shading or the camera FOV that does it.
I guess it’s a combination of all of them. But it bugs me that I can’t figure out why stuff doesn’t look flat
Pay close attention to the material setup, notice how nodes can still be your friend even when using BI (using a lambert shader as a driver to mix two vertex-colored shadeless materials with). That along with the sharp shadows mean that you’ll find virtually no hint of 3D in the rendered output.
ZedDB, I think the 3D effect you are talking about is due to the shaders used to render 3D surfaces and shadows. The shaders are designed for producing 3D images and cheats/work arounds are used to emulate cel/hand painted shading and tones disregarding the rather simplistic toon shader available to BI users. There is an interesting thread developing regarding just this and adding a sophisticated toon shader based on X-toon to BI. Hopefully the inclusion of Freestyle encourage the development of more tools/shaders for NPR rendering and attract a whole new set of illustrators to Blender. Blender user raphael has done a pretty good job with his tribute thread to Moebius. (Damned if can’t get my freaking tablet to copy and paste a bloody link to said thread.) I kind of hoped he would submit a splash.
Today in “Let’s use things the way they were never intended to be used :D”
Making all the edges on a subdevided Suzanne free-style edges results to this. (I set the line thickness to 20/30, the alpha to 0.5, the colour to material-mix 1.00 and added a spatial noise modiefier)
An touched up version in MyPaint.
To achieve this effect in BI you’d have to ask Freestyle to paint over faces instead of finding lines, to take in account the amount of light a face receives, prioritise objects further away from the camera to be painted first, and perhaps a randomness modifer for the colour-output.
@Zed, I think it has to do with that 2d pieces have a much more strategic useage of black than most freestyle renders have up till now. As I mentioned in the Free Style splash discussion thread, in a couple of pictures the strong shadows steal the spotlight from Free Style. When you look at the Moebius tribute, you’ll also notice how careful the artist was in avoiding large black spots.