[Bf-committers] Fix for edge rendering when fields are enabled

Theodore Schundler bf-committers@blender.org
Sat, 24 Jul 2004 23:26:48 -0700


> R.ycor= ( (float)R.r.yasp)/( (float)R.r.xasp);
>
> Using this value by default would solve problems without need to check
 
> for field render, giving a bit nicer code then too.

I was initially thinking of using the aspect ratio. I opted to go with
just fixing field rendering to because that's where the problem was the
most of an issue personally, and fairly simple to solve. It may not be
perfect for the not quite 1:1 aspect ratio of TV display, but it's close
enough.

For arbitrary aspect ratios, you'd need triple the number of rows in the
zbuffer, instead of double, since the required sampling points won't lie
evenly inbetween. For building the new zbuffer, I think the easiest
solution would to fill the buffer in three separate passes, offsetting
them by the appropriate amount each time. Or alter the way rendering of
the buffer content works to handle things not event evenly spaced out.
(unless someone has a simpler idea)

I've been playing around with the idea of a some enhancements to the
edge system that would make it more usable, like assigning an attribute
to edges to force them to be rendered & control of the size of the edge.
My idea for that would be to render the edges using the edges
themselves, and drawing over the ones that are visible that should be
drawn, not using a somewhat traditional raster image edge detection
function just applied to the zbuffer image as is done now. Then with
that method of rendering, adjusting the aspect ratio of the painted edge
would be simpler (and opens options for different edge drawing styles
for NPR fans). But of course _if_ I do get around to that, it probably
won't be a for a few months at earliest. And would probably something
better for playing with in tuhopuu.

Anyways, I guess if it's worth the added complexity (probably is
valuable for anamorphic 16:9 work) maybe in a week or two I'll have a
bit of time to revisit the code & play with supporting arbitrary aspect
ratios.

Ted

This message scanned for viruses and SPAM by GWGuardian at SCU (MGW1)