soc-2008-mxcurioni: Freestyle now supports camera information (the image is still a bit larger than Blender's internal renderer, probably a field of view problem). 3d scene is now no longer rendered, only 2d scene (strokes from view map information) is. Style module is still static (contour.py), will soon be handled via independent UI panel.

Phase 1 is considered finished. Phase 2 starts now: the objective is integrating Freestyle as an independent render layer.
This commit is contained in:
Maxime Curioni
2008-06-16 00:51:19 +00:00
parent d8171e4bc6
commit dfa10eba19
5 changed files with 189 additions and 154 deletions

View File

@@ -2194,14 +2194,26 @@ static void do_render_composite_fields_blur_3d(Render *re)
static void freestyleRender(Render *re)
{
float mat[4][4];
// init render result
RE_FreeRenderResult(re->result);
re->result = new_render_result(re, &re->disprect, 0, RR_USEMEM);
// set camera
RE_SetCamera(re, re->scene->camera);
FRS_execute(re);
// set view
Mat4Ortho(re->scene->camera->obmat);
Mat4Invert(mat, re->scene->camera->obmat);
RE_SetView(re, mat);
// run Freestyle
re->i.starttime = PIL_check_seconds_timer();
FRS_execute(re);
re->i.lastframetime = PIL_check_seconds_timer()- re->i.starttime;
re->stats_draw(&re->i);
RE_Database_Free(re);
}