Fork me on GitHub
#datavis
<
2015-12-01
>
pleasetrythisathome01:12:10

@meow: yea the mesh stuff is definitely more complicated than one might hope

pleasetrythisathome01:12:25

the color blending stuff is looking really cool

pleasetrythisathome01:12:38

did you render that with the ray tracing engine that karsten uses?

meow02:12:18

@pleasetrythisathome: No, I've got a very crude but effective process. I'm doing mesh manipulations using http://thi.ng geom plus Conway polyhedron operations that I'm writing in Clojure to work with the mesh provided by http://thi.ng. I'm generating X3D files that I look at using View3dscene. When I finally get the object looking interesting enough I upload the file to my Shapeways account and then view the object using their renderer and save the image as a jpg file that I then load here or to twitter.

meow02:12:07

The colors are being attached to each face of the polygon mesh. I have different functions that determine what color to put on each face according to different criteria. For that last object I used the absolute value of the [x y z] normal of the face to determine the [r g b] color of the face, then ran the mesh through some color blending code I'm experimenting with that blends each face with the colors of its adjoining neighbors and repeated that 12 times, kind of like 12 generations of a cellular automata process. Why 12? Because that turned out to be the Goldilocks moment when the color of the faces makes the polygon look fairly different from the real underlying topography without being a washed out mess. Lots of trial and error and surprises, which is what makes this so much fun. I have no idea what will come out of these ideas I have.

meow02:12:24

The other way to handle color is to associate a color with each vertex of each face. The color is then rendered by interpolating any color differences among vertices over the surface of the face. Whereas right now I'm only associating a single color for the entire face. With per-vertex coloring I'll be able to come up with even more crazy configurations and optical illusions.

meow02:12:29

There are just so many parts of this rabbit hole to explore its ridiculous. simple_smile

meow02:12:47

Here is the shapeways render for the above object without color: https://images3.sw-cdn.net/model/picture/625x465_4094696_13185882_1448857181.jpg

meow02:12:49

Not very interesting.

pleasetrythisathome15:12:30

i actually think the shapeways rendering is pretty rad

pleasetrythisathome15:12:42

that's a really great hacky way to get cool renderings without having to do it yourself

pleasetrythisathome15:12:54

definitely interested to see what else comes out of your color experiments

pleasetrythisathome16:12:00

one idea might be to try a more limited color pallete

pleasetrythisathome16:12:05

but still do similar operations

pleasetrythisathome16:12:12

full RGB always tends to make things look like rainbows

meow16:12:33

@pleasetrythisathome: I agree about the rainbow effect. My stuff is pretty psychedelic right now because of that. Limiting the pallet is one thing. I also have done a little bit with using HSV for the color and then converting it back to RGB for the X3D file, which requires RGB.

meow16:12:33

I'm actually upping the psychedelics because I'm picking complementary colors in some of the code to get more contrast. 😉

meow16:12:43

I've always wanted to work with color code and now I have a very interesting pallet to work with since it is 3D combined with the fact that I can change how the polygons are divided up and how extreme the angles of the faces get, which effects the color when I use the face normals as a factor in determining the colors. It really gets interesting quickly. So many variables to play with.

meow16:12:42

A lot of mesh processing software out there is just trying to do things like smoothing out a mesh or reducing polygon counts without altering the visual quality of the shape too much. Which is great, and I've got some code like that as well. But I'm also working on introducing texture to get interesting effects like the goose bumps on this one, which I really like:

meow16:12:13

What I did there was take an icosahedron, modified it, including some smoothing, then at the last step before coloring it I applied an operation to subdivide every face into pyramids that were raised ever so slightly. The result looks way more interesting than the completely smoothed out version.

meow16:12:00

You can play with the model inside the viewer on shapeways via this link: https://www.shapeways.com/model/3dtools/4089273/1/26?key=68fc3a823045c3f9ac6fec0a41ea5839

eggsyntax17:12:51

I'm a big fan of pulling color palettes from paintings or photographs (& using weighted averaging to get them in the same proportions that they appear in the source). That Adobe tool lets you pull palettes from images, but you just get a regular n-color palette from it.