Commit Graph

1809 Commits

Author SHA1 Message Date
Campbell Barton d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +00:00
Campbell Barton c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
Campbell Barton 34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
Campbell Barton 084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00
Campbell Barton 4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
Dalai Felinto d7fbe03a8a Fisheye Camera for Cycles
For sample images see:
http://www.dalaifelinto.com/?p=399 (equisolid)
http://www.dalaifelinto.com/?p=389 (equidistant)

The 'use_panorama' option is now part of a new Camera type: 'Panorama'.
Created two other panorama cameras:

- Equisolid: most of lens in the market simulate this lens - e.g. Nikon, Canon, ...)
             this works as a real lens up to an extent. The final result takes the
             sensor dimensions into account also.
             .:. to simulate a Nikon DX2S with a 10.5mm lens do:
                 sensor: 23.7 x 15.7
                 fisheye lens: 10.5
                 fisheye fov: 180
                 render dimensions: 4288 x 2848

- Equidistant: this is not a real lens model. Although the old equidistant lens simulate
               this lens. The result is always as a circular fisheye that takes the whole sensor
               (in other words, it doesn't take the sensor into consideration).
               This is perfect for fulldomes ;)

               For the UI we have 10 to 360 as soft values and 10 to 3600 as hard values (because we can).


Reference material:
http://www.hdrlabs.com/tutorials/downloads_files/HDRI%20for%20CGI.pdf
http://www.bobatkins.com/photography/technical/field_of_view.html

Note, this is not a real simulation of the light path through the lens.
The ideal solution would be this:
https://graphics.stanford.edu/wikis/cs348b-11/Assignment3
http://www.graphics.stanford.edu/papers/camera/


Thanks Brecht for the fix, suggestions and code review.
Kudos for the dome community for keeping me stimulated on the topic since 2009 ;)

Patch partly implemented during lab time at VisGraf, IMPA - Rio de Janeiro.
2012-05-04 16:20:51 +00:00
Brecht Van Lommel 68d9e73ecd Fix: forgot to commit these files as part of strand bugfix. 2012-05-04 12:46:51 +00:00
Alexander Kuznetsov 274d3d2daa Fixes opening video files on Windows. [#30752]
Thanks Lockal for finding faulty stat function which helped a lot. 
Now there BLI_stat. I will replace all other stat later.

*** Please use BLI_xxxx() functions ***
for file operations

Reported by Leon Cheung, Lockal, Believil
2012-05-01 21:46:55 +00:00
Campbell Barton 6327c9aae1 style cleanup: whitespace, braces 2012-05-01 20:08:23 +00:00
Campbell Barton 933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
Sergey Sharybin 6527f42b6b Fix #31193: Normals don't have any Z component
Issue was caused by heavily non-uniform scale applied on object.
Run scale correction on face and vertex normals draw if there's non-uniform scale.
2012-05-01 11:01:24 +00:00
Campbell Barton a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
Campbell Barton 112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
Sv. Lockal 435679b4b0 Word selection in the Text Editor:
* Fix word selection for words with multibyte characters. No need to call txt_move_left() or txt_move_right(), because these functions work with symbols, not bytes
* Word selection now treats tabs the same way as spaces. Also useful for words with multibyte characters
2012-04-30 13:14:15 +00:00
Campbell Barton 5979893711 style cleanup: edits to convex hull. 2012-04-30 10:39:35 +00:00
Campbell Barton 1b47e2678e style cleanup: missed these from previous cleanup 2012-04-29 17:55:54 +00:00
Campbell Barton 343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
Nicholas Bishop 650edc90b1 Add GHASH_ITER macro 2012-04-29 16:09:28 +00:00
Campbell Barton e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Campbell Barton 41a5e731a2 bmesh: new wireframe tool
- makes wireframe from faces.
- options similar to inset (even offset, relative scale)
- copies face settings and loops (uvs, vcolors)
- optionally replaces the existing geometry.
2012-04-29 10:44:00 +00:00
Campbell Barton ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
Campbell Barton c91fd5a0bf code cleanup: remove editmesh code left hanging around thats already been ported to bmesh, also remove main editmesh header. 2012-04-28 12:23:05 +00:00
Campbell Barton 4dd552fef9 patch [#31104] Correct comment for mul_qt_v3
from Bill Currie (taniwha)
2012-04-28 11:45:28 +00:00
Campbell Barton 950ed69297 code cleanup:
- replace inline face UV center calc.
- use const float[3] for mesh and uv functions.
- remove unused define
2012-04-28 08:29:20 +00:00
Campbell Barton b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Campbell Barton 4469ab9857 code cleanup:
- move lasso functions into BLI (were in 3D view but UV editor needs access)
- remove unused UV functions (ones that assumed 3-4 sized UVs only)
2012-04-27 07:26:28 +00:00
Campbell Barton bb4942c920 code cleanup: quiet msvc warnings 2012-04-27 03:01:27 +00:00
Campbell Barton 2118d3c19c code cleanup: bmesh comments/todos, no functional changes. 2012-04-26 08:27:50 +00:00
Antony Riakiotakis 4782522379 Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications.
Thanks!
2012-04-24 12:57:58 +00:00
Campbell Barton c1c022342c fix for invalid use of memset when loading tiff images
- memset(..., 1.0); // isnt valid
- memset(pointer, sizeof(pointer)) // was using the sizeof the pointer, not the size of the array, since this was to fill in alpha values it was obviously wrong.
2012-04-23 23:57:17 +00:00
Antony Riakiotakis 8b476d0275 First MinGW-w64 support for cmake has been added. To test I recommend this build:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-4.7.0-with-ada/mingw-w64-gcc-4.7.0-runtime-2.0.1-static-ada-20120330.7z/download

Other builds may also work but due to the constantly changing nature of the compiler this cannot be guaranteed. I often had to change compilers while building the libraries and this one is the one that did the job for most of them.

This first support is experimental and considered "advanced". To enable pass -DWITH_MINGW64 during cmake configuration. Also make sure to extract the compiler on C:/MinGW and that MinGW/bin is in your path. To build check out lib/mingw64.

Initially the support is lacking until I get every library compiled correctly. For now you should disable WITH_CYCLES(sorry, I know some people are dying to do benchmarks, but still a few libs to go), WITH_IMAGE_OPENEXR, WITH_OPENCOLLADA, WITH_LIBMV and WITH_CODEC_FFMPEG(links but hangs on startup).

Still the tools are working, the memory limit is increased and due to the experimental nature of the setup, full optimization with SSE2 is available, which makes the build quite fast. Also the compiler and especially, the linker are way faster than regular MinGW.

The wiki docs have also updated. Happy testing!
2012-04-23 20:09:59 +00:00
Campbell Barton 792f536b36 code cleanup: better use of BLI_array_* (grow in larger steps where possible), include BMO_iter_new in for loops. 2012-04-23 02:17:57 +00:00
Campbell Barton 5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
Campbell Barton b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
Campbell Barton 8765dfccf7 style cleanup: correct typos 2012-04-21 14:14:58 +00:00
Campbell Barton 6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
Bastien Montagne c7f8af329b BMESH_TODO: randomize vertices working again.
That whole "element re-arrange" area could use some love, though (e.g. make a single vert operator with more options, as faces; and make faces work in edit mode, probably no more reasons to switch to object mode?). Post-release TODO, anyway.

Also spotted a glitch in BLI_rand code, imho, which makes first element of an array not guarantied to be shuffled by BLI_array_randomize()... No correction though, as this might/would affect other parts of the code!
2012-04-19 18:53:32 +00:00
Campbell Barton d7542be6ac code cleanup: more minor changes to scanfill 2012-04-18 14:36:56 +00:00
Campbell Barton abcaec0edc code cleanup: replace magic numbers in scanfill with defines, also use some vector functions where possible 2012-04-18 14:30:57 +00:00
Campbell Barton ca913254aa fix for eternal loop in scanfill,
The cause for this is bmesh faces which have zero area have their normals set to a fake value (Z-Up), this would break scanfill, possible fixes are to calculate the faces normal each time or tag as invalid but its easiest to avoid the eternal loop with an extra test.
2012-04-18 14:06:59 +00:00
Campbell Barton 6389301eb5 fix for own error in recent scanfill updates, scanfill can hang if run on a polygon with no area. 2012-04-18 05:52:18 +00:00
Campbell Barton 195d6c1b1a minor speedup for scanfill, dont calculate the normal if its already known - use for editmode ngon filling. 2012-04-16 18:24:49 +00:00
Campbell Barton 67f8e3a3a7 inline function for "Newell's Method" used for normal calc. 2012-04-16 16:49:37 +00:00
Campbell Barton e889fa4678 improve scanfill for uneven ngons, previously scanfill would use the most angular corner, but this made non planer ngons rip frequently (often reported problem).
now calculate the normal as with ngons.
2012-04-16 16:24:55 +00:00
Campbell Barton 0f7ab89b4e fix for fail thumbs being used when the failed thumbnail image is older then the image/movie/blend. 2012-04-16 15:13:21 +00:00
Campbell Barton 0635f8101c make scanfill threadsafe (wasnt threadsafe before BMesh merge but before the merge it didn't need to be) - now rendering uses its better if its threadsafe. 2012-04-16 06:48:57 +00:00
Campbell Barton fb1e60762f style cleanup: scanfill, spelling and use NULL rather then 0 2012-04-16 05:23:40 +00:00
Campbell Barton 79693e4543 code cleanup: avoid confusion with incorrectly named argument to BLI_edgefill(), was 'mat_nr', now 'do_quad_tri_speedup' 2012-04-16 05:03:04 +00:00
Campbell Barton a73d0d3e72 code cleanup: dont include BLI_winstuff.h on non windows systems, also cleanup some defines/includes for windows. 2012-04-15 07:54:07 +00:00
Campbell Barton f8b7cfb6ae code cleanup: quiet some mingw warnings. 2012-04-12 02:50:21 +00:00