Yet another vector / sketch effect
Community Forums/Showcase/Yet another vector / sketch effect
| ||
Inspired by the work of Uncle http://www.blitzbasic.com/Community/posts.php?topic=76935 and JoeGr http://www.blitzbasic.com/Community/posts.php?topic=76960 i've been trying to emulate a 'sketch' style of rendering just for fun (you know how it is). Screenshots :- Wireframe ![]() hidden line ![]() shaded with colour ![]() a short video (2.5Mb .wmv) http://www.wildebeestgames.com/Sketch/Sketch-Effect.wmv and a demo .exe with a couple of bits of media http://www.wildebeestgames.com/Sketch/Sketch-Effect-Demo.zip Unzip into a folder of your choosing and run the .exe. Left click the mouse to cycle through rendering modes. In essence when you load any mesh you call a 'make outline' function which glues polys down all the edges of the mesh aligned to the face normals (ignoring edges that share the same normal) and then cycles through a series of line textures to give a sketch type look. It seems very fast, but suffers from the usual drawback of attaching polys to meshes to mimic vectors in that as a mesh moves away from the camera the lines become thinner. So it needs a bit of work, but its been fun trying. As always any / all comments / suggestions welcomed. cheers, Mark |
| ||
Hehe, looks superb. Nice work man. Real good! |
| ||
Looks great! |
| ||
That's *really* nice to look at. |
| ||
"Scooby Doo" to you too. |
| ||
i like the way the colours are pastel shades too not bright primary colours ... quite what you can do with it ive no idea ... but look forwards to seeing it |
| ||
I dunno, those results are pretty ..... sketchy ;-) |
| ||
I'm not going to be drawn into commenting. |
| ||
Awesome. |
| ||
Thanks for the comments everybody. I do intend to distribute the source once its tidied and i've fired a few more meaningful comments in, although to be honest its not any big shakes (method wise). I always thought that trying to achieve near photo realism in games was the ultimate aim, but im beginning to think there is more skill in presenting things in an alternative style. I'm certainly finding messing with this to be more difficult anyway. @Puki - mmmmm Velma Dinkley - go on give me a comment (just broad brush strokes of your outline thoughts perhaps ?) Im still looking at getting the lines to appear to be a similar thickness regardless of their distance from the camera. But without doing distance checks (at the least on the centre of each outlined entity) i'm at a loss as to how this could be done - without a big maths hit using the method i've chosen (see first post). Any thoughts ? cheers, Mark |
| ||
That's well smart :) |
| ||
You could place a pivot an edge, camera pick to get the 2D screen coord, then move the pivot to the next edge, camera pick, rinse and repeat to give you all the 2D positions of the edges. From there you can join them up with lines. The problem you'd face is knowing which ones are hidden, and which parts of lines should be hidden... Also which ends of lines are off screen... Actually... scrap that... it's a bad idea! |
| ||
You only need a one dimensional distance check (cameras z-plane). And you could LOD it so there are 2 or 3 pre-built edge meshes per object. You might even be able to use AutoEntityFade. I was thinking of making something very similar to this, ie. using prebuilt edges instead of trying to draw them on the fly. Must be quicker on the whole I would think. |
| ||
Looks really great. Nice idea as well adding the lines directly onto the meshes as this makes hidden lines easy to hide :) Ref the line thickness problem, have you tried to remake them on the fly based on the distance from the camera? Or rather than remaking them, what about reposition the line vertexs to make the lines thicker depending on the distance. I wonder what impact this would have on the speed. It might be acceptable. In my routine I redraw all the lines every frame, and the only time I need to scale them is when I use camerazoom. It's fine for what I need but then Im not using a full hidden line routine. Perhaps JoeGr could point you in the right direction. He has full hidden line routine, but I not sure how it handles line thicknesses. |
| ||
Coooool! |
| ||
Excellent! |