Blender Git Commit Log
Git Commits -> Revision 89e8fa2
Revision 89e8fa2 by Maxime Curioni (master) December 1, 2008, 21:30 (GMT) |
The GL-based renderer was removed. Freestyle now uses Blender's internal renderer to raster strokes. The render generated from Freestyle's data is currently stored in the original scene's render structure ( as 'freestyle_render'): when the render database is generated, the scene's geometrical data is first imported into Freestyle and strokes are calculated. The generated strokes are used to create a Blender scene, rendered independently. The render result is used in the rendering loop. The final rendering is performed the same way edge rendering is, in a function ('freestyle_enhance_add') operating on each individual render part. Freestyle strokes are only included if the toggle button "Freestyle" (in the 'Output' panel) is active and if the "Freestyle" render layer is also selected. Freestyle's panel appears when the toggle button 'Freestyle' is active. IMPORTANT: as of now, rendering ONLY works when OSA is disabled and when Xparts = Yparts = 1. If these settings are not set, a bogus image will be created. To make the render happen, many modifications had to be made: - the Canvas::Draw and Operators::create methods no longer render strokes. They only generate shading and locational information. - a BlenderStrokeRenderer class was added to turn Freestyle's strokes into a Blender scene. Basically, the scene consists of strokes in their projected image 2D coordinates and an orthographic camera centered in the middle of the corresponding canvas. The scene is rendered using vertex colors, in shadeless mode (therefore, no lamp is needed). BlenderStrokeRenderer uses the old GLTextureManager to load textures (as required by the StrokeRenderer class), even though stroke textures are probably not supported (not tested). After the scene is rendered, it is safely and automatically discarded. - AppCanvas' code was greatly reduced to the bare minimum. The former AppCanvas would use an OpenGL-based back buffer and z buffer to determine the scene's color and depth information. In the future, this data will be determined from the corresponding render passes. Currently, the integration is not achieved so all style modules using depth/color information are sure to fail. - before, Freestyle needed an OpenGL context to determine the camera's information and to compute the view map. As of now, the modelview and projection matrices are fully determined using data provided by Blender. This means both perspective and orthographic projections are supported. The AppGLWidget will very soon be removed completely. |
Commit Details:
Full Hash: 89e8fa216f2c1d8b2f8dc311aa471c1373ca2d40
SVN Revision: 17671
Parent Commit: 17555ef
Lines Changed: +539, -485
2 Added Paths:
/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp (+270, -0) (View)
/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.h (+46, -0) (View)
/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.h (+46, -0) (View)
19 Modified Paths:
/source/blender/freestyle/FRS_freestyle.h (+6, -1) (Diff)
/source/blender/freestyle/intern/app_blender/api.cpp (+79, -25) (Diff)
/source/blender/freestyle/intern/app_blender/AppCanvas.cpp (+19, -243) (Diff)
/source/blender/freestyle/intern/app_blender/AppCanvas.h (+3, -6) (Diff)
/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp (+3, -51) (Diff)
/source/blender/freestyle/intern/app_blender/AppGLWidget.h (+15, -40) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.cpp (+38, -39) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.h (+6, -3) (Diff)
/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp (+1, -0) (Diff)
/source/blender/freestyle/intern/stroke/Canvas.cpp (+0, -19) (Diff)
/source/blender/freestyle/intern/stroke/Operators.cpp (+1, -1) (Diff)
/source/blender/freestyle/intern/system/PythonInterpreter.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+0, -1) (Diff)
/source/blender/python/api2_2x/sceneRender.c (+0, -3) (Diff)
/source/blender/render/intern/include/render_types.h (+3, -0) (Diff)
/source/blender/render/intern/source/convertblender.c (+9, -0) (Diff)
/source/blender/render/intern/source/pipeline.c (+3, -44) (Diff)
/source/blender/render/intern/source/rendercore.c (+32, -0) (Diff)
/source/blender/src/buttons_scene.c (+4, -8) (Diff)
/source/blender/freestyle/intern/app_blender/api.cpp (+79, -25) (Diff)
/source/blender/freestyle/intern/app_blender/AppCanvas.cpp (+19, -243) (Diff)
/source/blender/freestyle/intern/app_blender/AppCanvas.h (+3, -6) (Diff)
/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp (+3, -51) (Diff)
/source/blender/freestyle/intern/app_blender/AppGLWidget.h (+15, -40) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.cpp (+38, -39) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.h (+6, -3) (Diff)
/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp (+1, -0) (Diff)
/source/blender/freestyle/intern/stroke/Canvas.cpp (+0, -19) (Diff)
/source/blender/freestyle/intern/stroke/Operators.cpp (+1, -1) (Diff)
/source/blender/freestyle/intern/system/PythonInterpreter.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+0, -1) (Diff)
/source/blender/python/api2_2x/sceneRender.c (+0, -3) (Diff)
/source/blender/render/intern/include/render_types.h (+3, -0) (Diff)
/source/blender/render/intern/source/convertblender.c (+9, -0) (Diff)
/source/blender/render/intern/source/pipeline.c (+3, -44) (Diff)
/source/blender/render/intern/source/rendercore.c (+32, -0) (Diff)
/source/blender/src/buttons_scene.c (+4, -8) (Diff)