Dev:2.5/Source/Render/RenderBranch/CodeChanges
< Dev:2.5 | Source | Render | RenderBranch(Dev:2.5/Source/RenderBranch/CodeChangesから転送)
目次
Code Changes
Compatibility
Backwards compatibility is being broken intentionally to get rid of some of the poorly working or outdated features. Some of the differences in may be due to bugs or incomplete code however, but the following features have been deprecated:
- World exposure/range (use compositor).
- Backbuf image (use compositor).
- Energy Ramps (not possible anymore).
- Jittered sampling for AO and Area lamps (use QMC).
- Radiosity.
- Warping and stencils in the texture stack.
- Sticky texture coordinates.
New Features
- Raytraced indirect light
- Irradiance caching for AO, environment, indirect light
- Image tile caching (somewhat hidden feature, as Blender can't save in the right file format yet)
- SSS scale texturing
- Textured spot lamp halo's
- Some raytracing optimizations
- Tiled deep shadow buffers
Important Fixes
- Fixes for subpixel position problems (dots, light leaks)
- Fixes for antialiasing in passes with solid/ztransp
- Fix some solid/ztransp mixing artifacts (not all)
- Fix area light form factor, now consistent with brute force sampling
- Fix SSS not taking render layers into account correctly
- Fix incorrect sun/hemi shadows
- Fix incorrect lamp fallof
Unfinished/Hacky Features
- Per tile subdivision
- Test path tracer
- Light group local option
- Render layer material except
Other Code Changes
- Many functions have been move to different files and renamed. Things still work the same as before almost everywhere, the intention was to make the existing code more clear.
- The render global R was replaced by a variable passed to all functions that need it.
- Shading and pass combining for solid and z-transp is now unified.
- Threaded render no longer uses sleep(), can save about half a second on a render.
- Lamp shading loop has been reorganized, still more work needed but should be easier to understand how the final colors are achieved.
New File Organization
- Conversion from Blender data structures is now usually in the same file, i.e. camera.c contains the code to convert a blender camera into a render camera. This is not done for everything yet.
- A good starting point for understanding the structure are the header files which have been cleaned up as well. An overview of most changed files:
- camera.h camera related functions including coordinate space conversion.
- database.h main storage for data in the scene
- environment.h environment and atmosphere shading code
- lamp.h lamp related functions
- material.h material shading functions
- object.h objects and instances
- object_halo.h halo object create, access and rasterize
- object_mesh.h mesh object create and access
- object_strand.h strand object create, access, rasterize
- part.h render parts/tiles
- pixelfilter.h pixel filtering
- rendercore.h scanline rendering of parts
- render_types.h Render and nested structs
- result.h ShadeResult and RenderResult manipulation
- sampler.h QMC sampler
- texture.h texture create/free/sample
- texture_stack.h texture stack handling for material, lamp, ..
- zbuf.h: rasterization of objects into buffers
- Some files should still be split or better organized, hopefully these can be tackled later though the overall situation should still be better than before. In my opinion especially these files need work:
- pipeline.c interaction with result.c should be more clear, some initialization moved
- object_mesh.c no clear separation yet between object and object data conversion.
- object_strand.c shouldn't have this much shading and rasterization code
- object_halo.c contains most halo code, perhaps needs to be split up.
- convertblender.c move object and instancing conversion to object.c.
- rayshade.c mixes building acceleration structure and shading too much