Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Non-photorealistic rendering projects
- Layzej
-
100+ posts
Non-photorealistic rendering projects
I'll give fifty waffles to the first person to make a 3D gtoal!
Well, it ain't gtoal, but this one's got to be worth a waffle or two: https://scratch.mit.edu/projects/20883345/
- gor-dee
-
1000+ posts
Non-photorealistic rendering projects
Nicehttps://scratch.mit.edu/projects/72290026/ so you can wear the mask on your own shoulders……………While we're at it, why not let people save their heads in the cloud for other people to put on? Oh, and if you can combine it with @TheLogFather 's Head tracking

- gor-dee
-
1000+ posts
Non-photorealistic rendering projects
Whatever you like!I have a challenge for you guys……….
a while ago I was looking at combining a 3D wireframe face (https://scratch.mit.edu/projects/17481405/ by @SohCahToa314) with a Picture scanner like https://scratch.mit.edu/projects/66980580/ by @Layzej and a triangle filler to make a 3D face mask. I'm afraid to say I gave up at the first hurdle but I still think it would be cool. I'll give fifty waffles to the first person to make a 3D gtoal!
Gets my vote :-) Can you do it WPAP style?
- gor-dee
-
1000+ posts
Non-photorealistic rendering projects
Your (10) waffles have been deliveredI'll give fifty waffles to the first person to make a 3D gtoal!
Well, it ain't gtoal, but this one's got to be worth a waffle or two: https://scratch.mit.edu/projects/20883345/

- gtoal
-
1000+ posts
Non-photorealistic rendering projects
http://www.cs.umsl.edu/~kang/Papers/kang_npar07_hi.pdf describes how to calculate an “Edge Tangent Field” which represents the directionality of lines in an image. This is probably too hard to calculate in Scratch but I link to C code that will let you calculate it externally.The paper
In https://scratch.mit.edu/projects/72618266/ there is an image which encodes the X/Y vector at each point, and its magnitude, in the R,G,B values of each pixel. It could be used, for example, in selecting the direction of brush strokes in a painting. (Subtract 128 from the R & G values to get the X and Y vector components)
Here's quite a good paper: http://bit.ly/parse2paint Incidentally Figure 3b in the document (click on the ‘paper and slides’ tab) is the same Edge Tangent Field as above. Also there are some good paint stroke images in there you can use. (though I wish they'd published their entire stroke library)
I like Layzej's latest test ( https://scratch.mit.edu/projects/72769712/ ) - I'm tempted to actually paint over this one and see how it comes out on paper. (I built one of these: http://www.instructables.com/id/Building-and-testing-the-optical-apparatus-from-Ti/ - you can see mine in the Comments section)
G
- BookOwl
-
1000+ posts
Non-photorealistic rendering projects
Not sure if this counts, but…
https://scratch.mit.edu/projects/24658312/
It creates art by randomly stamping a lot of different colored and sized squares on the screen.
https://scratch.mit.edu/projects/24658312/
It creates art by randomly stamping a lot of different colored and sized squares on the screen.
- gtoal
-
1000+ posts
Non-photorealistic rendering projects
Yeah, put it in for now. Not sure if this counts, but…
https://scratch.mit.edu/projects/24658312/
It creates art by randomly stamping a lot of different colored and sized squares on the screen.
- BookOwl
-
1000+ posts
Non-photorealistic rendering projects
Thanks!Yeah, put it in for now. Not sure if this counts, but…
https://scratch.mit.edu/projects/24658312/
It creates art by randomly stamping a lot of different colored and sized squares on the screen.
- novice27b
-
1000+ posts
Non-photorealistic rendering projects
Slightly off topic, but I'm testing a pen-based rendering technique that I call “adaptive quality”. The image increases in detail over time, and the rate of increase is dependent on your hardware, maintaining a smooth framerate.
http://phosphorus.github.io/#71252892
https://scratch.mit.edu/projects/71252892/
http://phosphorus.github.io/#71252892
https://scratch.mit.edu/projects/71252892/
- gtoal
-
1000+ posts
Non-photorealistic rendering projects
Slightly off topic, but I'm testing a pen-based rendering technique that I call “adaptive quality”. The image increases in detail over time, and the rate of increase is dependent on your hardware, maintaining a smooth framerate.
http://phosphorus.github.io/#71252892
https://scratch.mit.edu/projects/71252892/
Probably MartinBraendli's circle-based video thread (or start a new one) is the appropriate place to discuss this. It does look like something he could adapt to his technique (if his circles were drawn in the appropriate order. Then just stop early at frame cut-off time - an easy mod)
- Zro716
-
1000+ posts
Non-photorealistic rendering projects
I have no idea what I was coding but this is the result


- gtoal
-
1000+ posts
Non-photorealistic rendering projects
I have no idea what I was coding but this is the result
Let's call it a pencil sketch…
- liam48D
-
1000+ posts
Non-photorealistic rendering projects
A rather good one at that!I have no idea what I was coding but this is the result
Let's call it a pencil sketch…
- chooper100
-
500+ posts
Non-photorealistic rendering projects
This is an idea I had for non-photorealistic rendering that I don't want to do myself but one you might be interested in:
@Layzej has created a fill-by-triangle project. However, it requires the user to draw the triangles and they are allowed to overlap. I have a solution which will always divide it into non-overlapping convex polygons.
First, we use this code to generate a series of random lines across the screen:

Then, we can use the line intersection finder project by @gtoal to get the coordinates for each vertex on the screen.
The hard part is then figuring out which vertices belong to which polygon. Although I don't know how this would be done I am sure there is a way.
After that, we find the average color in each polygon. I believe that the project by Layzej I mentioned earlier can already get the average color of triangles. What we can do is use the code described in this wiki article to split it up into triangles to scan individually and then take the average of.
Finally, we can use the raster polygon filler by @DadOfMrLog to fill in the shapes.
Anyone interested in tackling this?
@Layzej has created a fill-by-triangle project. However, it requires the user to draw the triangles and they are allowed to overlap. I have a solution which will always divide it into non-overlapping convex polygons.
First, we use this code to generate a series of random lines across the screen:
This gives us something like this:

Then, we can use the line intersection finder project by @gtoal to get the coordinates for each vertex on the screen.
The hard part is then figuring out which vertices belong to which polygon. Although I don't know how this would be done I am sure there is a way.
After that, we find the average color in each polygon. I believe that the project by Layzej I mentioned earlier can already get the average color of triangles. What we can do is use the code described in this wiki article to split it up into triangles to scan individually and then take the average of.
Finally, we can use the raster polygon filler by @DadOfMrLog to fill in the shapes.
Anyone interested in tackling this?
- liam48D
-
1000+ posts
Non-photorealistic rendering projects
Somebody should totally make that @chooper.
- chooper100
-
500+ posts
Non-photorealistic rendering projects
Ikr? Somebody should totally make that @chooper.
- MartinBraendli
-
86 posts
Non-photorealistic rendering projects
The hard part is then figuring out which vertices belong to which polygon. Although I don't know how this would be done I am sure there is a way.@Finlay_Cool did something like that, but outside of Scratch. In his project FMV using Pen he linked the source to his program (written in C/C++) that splits an image into non overlaping triangles. If anyonoe wants to do this, this might be good reference.
- chooper100
-
500+ posts
Non-photorealistic rendering projects
Yeah, I saw that. Unfortunately C / C++ isn't my strong point so I can't do anything with the source code. 

- Layzej
-
100+ posts
Non-photorealistic rendering projects
I've been trying to approximate a picture with triangles using a genetic algorithm. Unfortunately it has not been a screaming success: https://scratch.mit.edu/projects/70172336/
- Discussion Forums
- » Advanced Topics
-
» Non-photorealistic rendering projects