Saturday, October 14, 2006

Edges

So I finally got a chance to sit down and work on the render system I outlined. Overall I’m pretty happy. Still needs tweaking but the basic idea is sound. You can see the crayon outline effect from these screen shots:





However you can also see I need a better way to set up the UV coordinates on my models. The scale of the UV cords is so large that the art tool has trouble with it. I may switch to some kind of method to generate the UV coordinates from a set of base coordinates in the mesh. The real issue is that I want to get orientation data of the texture from the UV coordinates but not the scale information. I need to also preserve edge boundaries of the between polygons so I don’t get seams when I change the UVs. I think I read about a patching algorithm along these lines at some point… have to hunt that down. If anyone has a good idea, feel free to let me know…

Wednesday, October 11, 2006

Far too long...

It has been far too long since my last post. I’ve been crunching on finishing up a project at work, the PC port to TopSpin2. I have not had a chance to work on anything for Alexander’s Kingdom in a while. Right now the project is sort of in limbo because of art problems. Basically I’m having trouble actually sitting down and finishing any of the art.

The big hurdle has been learning how to rig and animate as skinned mesh. I’ve figured it out for the most part but don’t seem to have the time to invest in it. Hopefully I’ll get a chance soon.

On the graphics side I’ve been thinking about a solution for the crayon line edge problem. I want to render out a depth/normal (Nx,Ny,D) buffer of the scene at the same time I do the base color pass. As a full screen post pass I take this buffer and look for large changes in either depth or normal values between texels. Where I see a large change I render a black pixel modulated with a paper texture. This should give me edge lines. I’m hoping I can remove the jagged edges that are standard with this solution by over sampling the depth/normal texture to blur out the test, we will have to see.

After that I was thinking of generating a line color buffer to decide what color to draw the edge lines. This would be another render target like the depth/Normal buffer (or possible an indexed palled using the last channel in the Depth/Normal buffer. When an edge is detected it renders the edge color of the sample point nearest the camera. No idea if it will work but it should be better than black lines.

I’ve also wanted to code a distortion buffer for a long time but I don’t think it will match the crayon rendering style of this project. Ahhh well, maybe on the next project.