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-10-30Complementary fix for rB8054372: Follow the common naming scheme byLukas Tönne
using negate_mat3_m4 instead of negate_m4. This avoids changing the behavior and only flips the 3x3 part of the matrix.
2014-10-30Fix negate_m3 (taking 4x4 matrix)Campbell Barton
Cycles bake used incorrectly.
2014-09-19Fix T40751 preview image not generated after baking.Antony Riakiotakis
A DAG_id_tag_update here is enough to fix the problem.
2014-08-31Bake-API: more MEM_callocN replacements by MEM_mallocNDalai Felinto
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D561
2014-08-28Bake-API: silencing warnings (and fixing a potential memory-access crash)Dalai Felinto
2014-08-27Bake-API: fix potential error for non square imagesDalai Felinto
Not reported, I wonder why, this should be easy to reproduce. I guess people really like their textures square ;)
2014-08-06Add some missng casts to the size_tSergey Sharybin
2014-08-01Bake-API: cleanup - missing (size_t) promotionDalai Felinto
2014-07-31Bake-API: use size_t instead of width, heightDalai Felinto
(original patch by Sergey Sharybin) Note: RNA API can't use size_t at the moment. Once it does this patch can be tweaked a bit to fully benefit from size_t larger dimensions. (right now num_pixels is passed as int) Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D688
2014-07-27T41196: Python call of bake operator cause Blender CrashDalai Felinto
We could make the exec to also show the progress bar, but I think it is not needed.
2014-07-23Bake-API: Test for cyclic node connectionDalai Felinto
If the active image node contributes to the final material shader (meaning it's either directly or indirectly connected to an Output Node) the user will receive an alert about circular dependency. Similar to what we do for Blender internal the baking will still happen, but the user will receive the alert which should prevent the image saving to happen if the result was not intentional. Core function to check for node output written by Lukas Toenne. Reviewers: lukastoenne, campbellbarton Differential Revision: https://developer.blender.org/D673
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-07-17Bake-API: progress (bar) workingDalai Felinto
Note: This makes no change to the user, the render engine (Cycles) still need to update the progress during baking. But this is the Blender side of this.
2014-06-22Code cleanup: styleCampbell Barton
2014-06-19Bake-API: small cleanup to prevent unfreed memory when there are baking errorsDalai Felinto
Fix to be included in 2.71
2014-06-19Bake-API: fix for non-NORMAL maps baking black when using cageDalai Felinto
Reported by Andy Davies (metalliandy) outside the tracker Fix to include in 2.71
2014-06-19Fix T4068787 Cycles Bake Selected To Active From Non-Mesh Object Fails With ↵Dalai Felinto
Error Users can now bake from Mesh, Font, Curve, Surface and Metaballs. Fix to include in 2.71
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: increase cage extrusion/ray distance limitDalai Felinto
Fix to include in 2.71 (asked via BlenderArtist)
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-12Bake-API: Set Custom Cage to be Cage ObjectDalai Felinto
Suggestion by Andy Davies (metalliandy) to conform with industry standard (custom cage is something else apparently) Note: this is the last bake related commit I plan for 2.71/rc (unless everyone agrees that we could squeeze in D546 - custom UVs, which would be really nice to add for 2.71 scripters) Note 2: I'll update the wiki docs shortly
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-11correction from last commitDalai Felinto
2014-06-11Bake-API: removal of unecessary UV tests, as suggested by Campbell BartonDalai Felinto
2014-06-06Code cleanup: styleCampbell Barton
2014-06-03Bake-API small cleanupDalai Felinto
2014-06-03Fix T40476 - Baking multiple selected objects in Cycles final resultDalai Felinto
depends on last selected object Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D577
2014-06-03Bake-API prevent baking for engines that dont support the baking APIDalai Felinto
In the future we can fallback to the Blender Internal baking. Review/Suggestions by Campbell Barton
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-26Usual UI messages tweaks.Bastien Montagne
2014-05-23Bake-API: shows the baked image in the biggest SpaceImage around (just like ↵Dalai Felinto
Blender Internal) Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D544
2014-05-23CleanupCampbell Barton
2014-05-23Bake-API: relaxing in the check for scale uniformityDalai Felinto
It still warns the user that there may be an error, but the baking goes on. Also using the new is_uniform_scaled_m4() instead of float comparison. Reported and fix suggested by Campbell Barton as a concern over 2bfc3deb
2014-05-22Bake-API: throws error if highpoly object(s) doesn't have uniform scale (fix ↵Dalai Felinto
T40156) The real fix would be to support non-uniform scaled highpoly objects. For more information see 8d29739
2014-05-22Bake-API: throws error if there is no UVDalai Felinto
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-13More UI messages fixes and tweaks.Bastien Montagne
2014-05-13Usual typo and style fixes in UI messages...Bastien Montagne
2014-05-09Revert "Fix wrong job type used in cycles bake operator, could cause crashes."Dalai Felinto
This reverts commit 97823f604796fb008fef03653974473ece75d18e. I was to push a fix based on Brecht's solution (this commit) when he did the same. This fix is correct, but it misses replacing WM_JOB_TYPE_OBJECT_BAKE with WM_JOB_OBJECT_BAKE_TEXTURE in the rest of the file, which may lead to problems when calling the operator in a quickly sucession - WM_jobs_test also tests for the same type of JOB. I created WM_JOB_TYPE_OBJECT_BAKE elsewhere, may as well use it. Unless we revert 20c90ea and f194da3. I'm fine with either way, just trying to get master to work again ;)
2014-05-09Bake API: reports were used after being freed leading to random crashes (fix ↵Dalai Felinto
T40077)
2014-05-09Fix wrong job type used in cycles bake operator, could cause crashes.Brecht Van Lommel
Ref T40077.
2014-05-09Bake API: small change, forcing Render to not have reportsDalai Felinto
Again, no functional change, just trying to narrow down the possible reasons for the random crashes in OSX.
2014-05-09Bake API: renaming WM_JOB_RENDER_BAKE to WM_JOB_OBJECT_BAKE and use it ↵Dalai Felinto
consistently Note: that doesnt change much. It definitively doesnt change the random crash OSX is experiencing sometimes.
2014-05-07Bake API: force opengl reload and mipmap recalc (fix T40055)Dalai Felinto
2014-05-07Bake API: fix T40054 - baked image update on uv/imag editor for ↵Dalai Felinto
linear/float/noncolor, ... All image colorspaces should be displaying correctly in the UV/Image Editor. Viewport may still present an issue, but it was reported separately anyways (T40055) Patch reviewed (and corrected) by Sergey Sharybin
2014-05-06Fix T40048: Cycles bake crashes Blender [when there is no image]Dalai Felinto
The struct with the images was not NULL initialized.
2014-05-03Code cleanup: styleCampbell Barton
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