Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-23T39690: Modifications to Blender's 'temp dir' system.Bastien Montagne
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never automatically cleaned up, and can end being quite big when used by Blender, especially when we have to store per-process data (using getpid() in file names). To address this, this patch: * Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path), the other is a mkdtemp-generated sub-dir, specific to each Blender instance. * Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always reuse the same filename (quit.blend...) or generate small file (crash reports...). * Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option). * Erases temp sub-dir on quit or crash. To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows. Note that, as in current code, the 'recover render result' hack-feature that was possible with SaveBuffer option is still removed. A real renderresult cache feature will be added soon, though. Reviewers: campbellbarton, brecht, sergey Reviewed By: campbellbarton, sergey CC: sergey Differential Revision: https://developer.blender.org/D531
2014-06-23Fix T40764: Keyframed Render Layers Don't Work as IntendedSergey Sharybin
2014-06-20Implement resolution divider in the Blender InternalSergey Sharybin
Currently resolution divider is not exposed to the interface yet, and i'm not even sure it needs to be exposed because it's somewhat weird configuration. Need to check how often artists are changing start resolution in Cycles. Pretty much straightforward implementation with the only weak part: render result is getting re-allocated and upscaled when current resolution is finished. Not sure how to make it faster actually. Maybe it's just a matter of making upscale fast enough. Needed to fix some possible memory leak happening in Freestyle when canceling rendering on a special stage -- it was missing temp bmain free, Reviewers: campbellbarton, dingto CC: sebastian_k, fsiddi, venomgfx Differential Revision: https://developer.blender.org/D609
2014-06-19Fixup for fd0b7428 Bake-API: allow custom UV to be bakedDalai Felinto
2014-06-17Bake-API: allow custom UV to be bakedDalai Felinto
Note: the custom UV option is only available when calling the operator via a script. It's currently not exposed in the UI since it's intended to be used by scripters To test it: bpy.ops.object.bake(type='UV', use_clear=True, uv_layer='MyNewUV') Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D546
2014-06-13Bake-API: handle objects with no faces (fix T40601)Dalai Felinto
Also it has a better error handling for the BVHTree creation Fix for 2.71
2014-06-13Code cleanup: spellingCampbell Barton
2014-06-11Bake-API: new approach for cageDalai Felinto
There is a new option to select whether you want to use cage or not. When not using cage the results will be more similar with Blender Internal, where the inwards rays (trying to hit the highpoly objects) don't always come from smooth normals. So if the active object has sharp edges and an EdgeSplit modifier you get bad corners. This is useful, however, to bake to planes without the need of adding extra loops around the edges. When cage is "on" the user can decide on setting a cage extrusion or to pick a Custom Cage object. The cage extrusion option works in a duplicated copy of the active object with EdgeSplit modifiers removed to inforce smooth normals. The custom cage option takes an object with the same number of faces as the active object (and the same face ordering). The custom cage now controls the direction and the origin of the rays casted to the highpoly objects. The direction is a ray from the point in the cage mesh to the equivalent point to the base mesh. That means the face normals are entirely ignored when using a cage object. For developers: When using an object cage the ray is calculated from the cage mesh to the base mesh. It uses the barycentric coordinate from the base mesh UV, so we expect both meshes to have the same primitive ids (which won't be the case if the cage gets edited in a destructive way). That fixes T40023 (giving the expected result when 'use_cage' is false). Thanks for Andy Davies (metalliandy) for the consulting with normal baking workflow and extensive testing. His 'stress-test' file will be added later to our svn tests folder. (The file itself is not public yet since he still has to add testing notes to it). Many thanks for the reviewers. More on cages: http://wiki.polycount.com/NormalMap/#Working_with_Cages Reviewers: campbellbarton, sergey CC: adriano, metalliandy, brecht, malkavian Differential Revision: https://developer.blender.org/D547
2014-06-05Blender Internal: Fix for lamp option "Specular" not working when "Only ↵IRIE Shinsuke
Shadow" is enabled. This is followup to rB8008d9bdfd57. Blender Render and GLSL preview now produce the same results.
2014-06-01Fix T40315: Boolean modifier with Freestyle edges.Tamito Kajiyama
The helper function `make_freestyle_edge_mark_hash()` was referring to the original mesh to determine Freestyle edge marks for individual derived mesh edges. This is no longer necessary now that derived meshes deliver CD_FREESTYLE_EDGE and CD_FREESTYLE_FACE layers of their own. The reference of the original mesh was also inappropriate since the edges coming from one of the operands of a boolean modifier don't have proper CD_ORIGINDEX values but ORIGINDEX_NONE's. Many thanks to Sergey Sharybin for patch contributions and discussions.
2014-05-30Bake-API: replacing some MEM_callocN by MEM_mallocNDalai Felinto
As suggested and reviewed by Campbell Barton. This is the most trivial of the cases. I will look if I can do it elsewhere in the bake code
2014-05-30Bake-API: Support for batch bakingDalai Felinto
When "Selected to Active" is not on, we bake all the selected objects. This is the same behaviour we have for Blender Internal. Dev note: I moved most of the validation tests to outside the bake() routine so the function can be called in loop. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D560
2014-05-29Proper fix T40156 Cycles Baking and applyRotation issuesDalai Felinto
This should be the final fix for the applyrotation issue. It baffles me that the fix involves discarding the scale transformations for the normals but it works so I'm happy with it. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D554
2014-05-23Fix crash rendering linked scenes in compoSergey Sharybin
Simply linking scene (lib.blend) without compo into another one (compo.blend), using it in a compositor and rendering it would crash.
2014-05-23Bake API: compare with NULL rather then casting to boolCampbell Barton
2014-05-22Fix T39901: Crashes if the resolution % is changed while rendering an animationSergey Sharybin
Copy render percentage. dimensions and border settings and use them for all the frames in the animation render.
2014-05-22Fix for image garbage collection failing to run for render-only viewsCampbell Barton
Check for freeing old images was running per-object, move this to viewport drawing.
2014-05-21Bake API: partial fix T40156 (applyRotation issues)Dalai Felinto
This fixes most of the cases, the only situation not addressed is when the highpoly object(s) has non-uniform scale. mul_transposed_mat3_m4_v3() should take care of non-uniform scales so I'm a bit confused on why it doesn't work. The lowpoly object can have any transformation, the only issue is if the highpoly object has non-uniform scale. Test file of the remaining issue: https://developer.blender.org/file/info/PHID-FILE-tpw2xgddyzxtpg3e7xzs/ Reference reading: http://www.unknownroad.com/rtfm/graphics/rt_normals.html
2014-05-21Fix T39711: cycles particle motion blur affected by viewport draw method.Brecht Van Lommel
2014-05-17Fix T39669: Freestyle: Curve with extrude>0 causes warnings in console.Tamito Kajiyama
The reported Freestyle warnings were due to wrong normals of filled faces at both ends of a 2D extruded curve. The problem is detailed in the comment #19 of T39669. The cause of the bug was an inconsistency in the use of vertex indices between BKE_mesh_nurbs_displist_to_mdata() and init_render_curve() in the case of DispList::type equal to DL_INDEX3. This commit also fixes a related bug that the normals of filled faces were not inverted when a scale of the curve object is set to a negative value (e.g., the Z scale was -1). Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D532
2014-05-15Fix T39763: Blender renders disabled Render Layers using Blender InternalSergey Sharybin
For now only disables scene render if all the layers are disabled, but scene will still be rendered if it's used in compo, has enabled layers which are not used by compo. Current pipeline doesn't allow to handle such cases nicely, so leaving it for later.
2014-05-14Code cleanup: doxy commentsCampbell Barton
2014-05-12Fix T40142: Objects restricted in render/view don't produce duplis inLukas Tönne
with correct transform for Blender Internal. According to previous code the obmat must be modified even if the duplicated object itself is filtered later. TBH i have no idea how/why this works, but nobody else does either ... All obmats are restored after BI messes with them during render, so should be fine ...
2014-05-10Bake API: selected to active needs differentials or it renders black when ↵Dalai Felinto
bump/displacement (fix T40101)
2014-05-08ammend to [31cb7e39] Bake API: calculating differentialsDalai Felinto
2014-05-08Bake API: calculating differentialsDalai Felinto
Code with contribution from Brecht Van Lommel (he wrote the bake_differentials actually ;) Reviewers: brecht Differential Revision: https://developer.blender.org/D510
2014-05-06Followup fix to T39966.Lukas Tönne
The previous fix was not quite correct: * It would use the same wireframe/bbox check in viewport- and regular render * The duplicator loop in Blender Internal is more permissive now to avoid disabling wireframe duplicators, but this means we need to check is_object_hidden right before making render objects to ensure this still works.
2014-05-05Fix T39322, hair not rendered in rendered mode viewport after returningAntony Riakiotakis
from particle edit mode. Check for object particle edit mode, not psys->edit. This won't get freed on exit (which might be worth considering doing, maybe?)
2014-05-03Doxy cleanup: formattingCampbell Barton
2014-05-03Alternative fix for T39941, this also fixes odd behavior of rendered preview.IRIE Shinsuke
The rendered preview didn't show active layer or wasn't updated if the layer was disabled. Now the viewport always shows an active layer regardless of whether it's enabled or disabled.
2014-05-03Bake API - bpy.ops.object.bake()Dalai Felinto
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api. The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result. The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit Python Operator: ---------------- The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False) Note: external save mode is currently disabled. Supported Features: ------------------ * Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture. * Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object. * Cage Extrusion - distance to use for the inward ray cast when using selected to active * Custom Cage - object to use as cage (instead of the lowpoly object). * Normal swizzle - change the axis that gets mapped to RGB * Normal space - save as tangent or object normal spaces Supported Passes: ----------------- Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled" Development Notes for External Engines: --------------------------------------- (read them in bake_api.c) * For a complete implementation example look at the Cycles Bake commit (next). Review: D421 Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge Normal map pipeline "consulting" by Andy Davies (metalliandy) Original design by Brecht van Lommel. The entire commit history can be found on the branch: bake-cycles
2014-05-02Fix T39985: crash while rendering a scene with compositing nodes using ↵Sergey Sharybin
another scene The issue was caused by the wrong scene used to acquire render result for. Now made it so render pipeline reports currently rendering scene to the job via special callback. This also solves missing tile highlight issue when rendering multiple scenes in the compositor.
2014-05-02Fix for missing render layer display buffer allocationSergey Sharybin
2014-05-02Fix T39966: Whole Group option of dupligroup visualization of particlesLukas Tönne
does not work as expected for Viewport and Blender Internal. As @sergey noticed, this was caused by rBfbf8595, which disabled rendering for wireframe objects in the viewport. However, the same function `is_object_hidden` is also used for skipping dupli objects then which may themselves be renderable. Now use two variants: * is_object_restricted is the previous test for general viewport/render visibility (lets wireframe duplicators pass) * is_object_hidden includes the wireframe check for actual render instances
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-30Fix T39952: Printing tiles gives negative numbersCampbell Barton
2014-04-29Fix for wrong behavior of 'darken' blend mode with factor.Kevin Dietrich
The formula was not consistent across Blender and behaved strangely, now it is a simple linear blend between color1 and min(color1, color2). Reviewed By: brecht Differential Revision: https://developer.blender.org/D489
2014-04-29Fix T39940: animation of render layer on/off toggle not working during render.Brecht Van Lommel
2014-04-29Fix T39942: Displacement of group instance objects when switching to ↵Sergey Sharybin
textured viewport shading Usual dupli object issue, sometimes it's needed that all the object in dupli group have modified obmat. Made it an utility function now, which is used by convertblender and dupli draw code now.
2014-04-29Fix T39941: Freestyle: Rendered preview crashes when non-primary render ↵Tamito Kajiyama
layer is selected and disabled. Freestyle relies on render layer name (RenderLayer::name) to find the render layer that corresponds to a scene render layer being rendered. When the active render layer is disabled during preview rendering, the function render_result_new() populates the list of render layers (RenderResult::layers) with an unnamed render layer while setting the active scene render layer index to zero. This commit fixes the missing initialization of the render layer name by referring to that of the first in the list of scene render layers.
2014-04-29Code cleanup: remove redundant matrix initializationCampbell Barton
2014-04-26Code cleanup: use 'const' for arrays (render)Campbell Barton
2014-04-23Fix T39852: Crash (Blender internal) large objectsCampbell Barton
Add check when bounds reached inf
2014-04-23Add asserts to raytrace get/set_cut functionsCampbell Barton
2014-04-23Blender Internal: Add material property "Cast" which can disable both ray ↵IRIE Shinsuke
and buffer shadows. Also refactor: - Material property UI related to shadows - Preparation of OR-ed mode flags (ma->mode_l) of render materials Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D313
2014-04-21Follow up to previous commit: tweak RE_RAYTRACE_EPSILON (correction value usedBastien Montagne
when checking neighbor faces against shadowing).
2014-04-21Fix T39735: New auto smooth creates artifacts with flat shaded faces(BI)Bastien Montagne
This actually had nothing specific to new split normals, it was an internal limitation of BI raytracer, which would check against neighbor face shadowing only when they shared a common vertex, now it also performs checks when both faces have a vertex with a common "ancestor" (org index). Note this allows to also fix same issue when using SplitEdges modifier (and potentially others?), but only when AutoSmooth is enabled (due to some compute/mem overhead, we do not want to enable this code systematically). Thanks to Brecht for advices and review!
2014-04-20Code cleanup: correct abs useCampbell Barton
also minor cleanup to rotation code
2014-04-17BI: cleanup in autosmooth area.Bastien Montagne
2014-04-15Fix T37675: blender internal viewport render wrong for volumes after rotation.Brecht Van Lommel
We really should not have Object.imat_ren, that's the wrong place to put render data. But just update it now on rotation rather than doing a bigger refactor to remove it.