I was a taken a little off guard by the reception to P5Sunflow. I expected a couple people to poke at it, maybe like the concept, and grab it a month down the road when things actually worked.
Anyway, thanks to everyone who’s not only been breaking the code, but sending over stack traces an so-forth. I thought I’d reciprocate the motion, and yap about the state of the library as it exists on my laptop, and where it’ll be the next time I make a release.
First, it’s gone through a pretty serious refactoring. I hate when little projects get class-happy in Java, but this code has taken a step in that direction. I never though I’d say it, but the code was screaming for some abstract classes. A nice side effect of this is the ability to easily implement dumping scene files. That code’s about 90% done — I just need to go over Sunflow’s scene file “spec” one more time to make sure I put all the switches in there.
With a little bit (okay, a lot) of help from the guys on the Sunflow board, lines should now be:
- Working
- Looking Pretty Good
- Not taking forever to render

BTW 1: The angles in the “curve” are set through Processing’s bezierDetail().
BTW 2: The breaks in the lines are because my AA samples are low, and the lines are super-skinny. Hey. It’s a test file. Quit complaining and get a job, asshole.
Those folks at the Sunflow board are both super-nice and super-intelligent. If you’re trying to do something really sneaky in regards to rendering, you might want to browse around that forum. For reference, you can get directly to their SunflowAPI object at ((SunflowAPI)g).sunflow.
Sunflow in SVN at the moment is insane. In a good way. I’ve been watching the the commits roll in, and sneaking some of the more awesome looking stuff into my code base. The most awesome of which is motion blur. I’m still not quite sure how to expose that feature, though. It kind of needs to be done in a very non-Processing type way. When P5Sunflow gets some triangle, for example, it needs to know where that triangle was in the previous frame. You can write some “Interesting Code” to track object IDs from the VM, but that’s already bitten me in the ass once when garbage collection kicks in.
I feel like this is getting long, so I’ll wrap it up. Bugs are boring, so I won’t list fixes. You can trust it’s done if you’ve emailed me.
Done
- Clean code
- Scene file dumping
- Lines
- Undocumented awesome Sunflow stuff so my images can look better than yours
Going to get done
- Finish up lighting code/documentation
- Live preview PROCEED TO LAZYWEB
- Probably write a custom shader that can better handle the combination of crap you can set from Processing. Show of hands, who uses the
shininess() method? Well. Now the secret’s out.
- Points
Probably not in the next release
- Custom shaders defined in your code
- UV surfaces
Cool.
As a quick aside, has anyone screwed with openFrameworks? Making little sketches seems to work pretty well, but I’m a little bit terrified of what a big project looks like. It also doesn’t really seem to lend itself to the word “sketch” as well, either. I’m not entirely sure what problem they’re solving, but I like it.