Commit Graph

154 Commits

Author SHA1 Message Date
fd7068ee28 Fix T48550: Imperfections when Bake displacement map to plane if camera is not in front
The issue was caused by non-watertight nature of intersection, which is now addressed.

Hopefully it doesn't cause any regression caused by uninitialized precalculated storage.
2016-06-06 13:55:04 +02:00
21fddf7d1c C99/C++11: replace deprecated finite() by isfinite(). 2016-05-17 21:39:16 +02:00
8f1223b636 Move some debug print under G.debug
It's not like every debug build is benefiting from this print..
2016-04-04 09:58:14 +02:00
acebfbb666 Cleanup: unnecessary comma use 2016-03-05 09:12:07 +11:00
559e1434d8 parenthisize macro args to avoid errors 2015-08-02 13:54:06 +10:00
7a0f57cd01 Cleanup: clarify order of precedence: &/? 2015-06-04 15:41:27 +10:00
3a40aed3d5 Cleanup: use float versions of functions when in/output are floats 2014-09-24 14:55:02 +10:00
1e6fa59e4f Fix T39852: Crash (Blender internal) large objects
Add check when bounds reached inf
2014-04-24 03:07:45 +10:00
7cdf5992dd Add asserts to raytrace get/set_cut functions 2014-04-24 02:30:39 +10:00
fc28732ba6 Blender Internal: Add material property "Cast" which can disable both ray 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-23 15:03:34 +09:00
3de8f255d7 Fix T39735: New auto smooth creates artifacts with flat shaded faces(BI)
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-21 20:27:19 +02:00
15169c71a6 Blender Internal: remove BLI BVH for raytracing.
It has no benefits over other BVH types, as far as I know it was only added
because it was possible. This also fixes T39344.
2014-04-11 13:20:41 +02:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
6b693ab7bf NDOF: add navigation modes to user preferences
also comment debug prints for raytracing
2014-03-01 21:47:46 +11:00
d95b378c4d Blender Internal: Fix regression that sometimes shadows are not rendered, caused by rBec4ed2e3df507245aceb7341b4fdf2f5ed935067.
Easy mistake in code cleanup. :)
2014-02-14 08:02:16 +09:00
38e58612ef Revert own previous commit rBe2f9afbaabbd.
The "Cast Shadows" worked as expected, but it can cause problem in some cases.
For example, when using strand render, we need disabling only buffer shadows,
but the previous changes made that impossible. "Cast Shadows" should be added
as a newly created option.
2014-02-12 05:46:26 +09:00
e2f9afbaab Blender Internal: Modify material property "Cast Buffer Shadows" to affect ray shadows also, and rename it to "Cast Shadows".
This allows us to make materials that don't cast ray shadows.
Turning off this property can reduce the rendering time slightly.

Note: RNA path is changed to "use_cast_shadows" as well. The older
path "use_cast_buffer_shadows" still can be used as its alias, but
it will be removed after updating some addons.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D272
2014-02-11 17:06:21 +09:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
ec4ed2e3df Code Cleanup: replace global debug checks in raycast with DEBUG ifdef 2013-12-12 15:30:50 +11:00
efe690a3a5 code cleanup:
- incorrect NULL check in logic UI drawing
- incorrect NULL check in octree quad test
2013-08-02 13:21:32 +00:00
357655af32 use static functions for raycast functions. 2013-05-08 12:55:05 +00:00
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
655ed9cc7f style cleanup 2013-03-18 11:44:56 +00:00
6fd187e4df code cleanup: 0 --> NULL 2013-03-08 06:32:00 +00:00
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
c411cde415 header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree 2013-01-24 21:57:13 +00:00
7c4f70178f fix for glitch with vertex bake:
- the mesh would be tagged to update, then updated before bake finished.
- also increase self-shadow offset, in some cases the offset wasn't enough.
2013-01-23 04:22:02 +00:00
6747dec926 style cleanup 2013-01-07 03:24:22 +00:00
857df8065f style cleanup 2012-12-28 14:19:05 +00:00
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
6571713ddb Ambient occlusion baker from multi-resolution mesh
This implements AO baking directly from multi-resolution mesh with much
less memory overhead than regular baker.

Uses rays distribution implementation from Morten Mikkelsen, raycast
is based on RayObject also used by Blender Internal.

Works in single-thread yet, multi-threading would be implemented later.
2012-12-18 17:46:42 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
634b22fc46 code cleanup: spelling labda -> lambda 2012-12-11 14:18:37 +00:00
cf6994b910 code cleanup: spelling,
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00
7579a9ec37 code cleanup: double promotions 2012-11-04 10:20:16 +00:00
0c6a0b293f style cleanup 2012-10-28 15:23:16 +00:00
fec81d9b56 use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
9f8070d047 code cleanup:
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +00:00
76d0ae0b3e fix for incorrect initial boundbox with svbvh raytracing. (bad use of FLT_MIN) 2012-10-14 13:18:32 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
97d4fb4161 code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
a4ff2b9140 code cleanup: warnings 2012-09-18 03:15:12 +00:00
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
9ddbd8329e fix uninitialized memory use for mask feather points, also remove some double promotions. 2012-08-05 13:26:39 +00:00
e86e5074f6 code cleanup: double promotion warnings 2012-08-02 21:17:12 +00:00
7217927414 add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these). 2012-07-29 18:14:20 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
4bc818d240 code cleanup: quiet uninitialized memory use warning for X11 - harmless in this case but always gave warnings with memcheck (RGB color for alpha zero icon color wasnt initialized).
also some other minor changes.
2012-07-08 12:23:58 +00:00