Commit Graph

49837 Commits

Author SHA1 Message Date
Ton Roosendaal
064297009c - shadeless rendering fixed!
error was due to new localized render result code... and of course only
  shading and tracing was tested :)
2003-12-16 16:07:46 +00:00
Ton Roosendaal
97d4dbc9c3 Another commit for raytracing, now with glass refraction & fresnel!
Changelog:

- enable refraction with button "Ray Transp" in Material buttons.
- set "Angular Index" value for amount of refraction.
- use the "Alpha" value to define transparency.
- remember to set a higher "Depth" too... glass can bounce quite some
  more than expected.
- for correct refraction, 3D models MUST have normals pointing in the
  right direction (consistently pointing outside).
- refraction 'sees' the thickness of glass based on what you model. So
  make for realistic glass both sides of a surface.

- I needed to do some rewriting for correct mirroring/refraction,
  especially to prevent specularity being blended away.
  Solved this with localizing shading results in the rendercore.c.
  Now specularity correctly is added, and reduces the 'mirror' value.
- Localizing more parts of the render code is being planned. The old
  render heavily relies on struct Render and struct Osa to store globals.
  For scanline render no problem, but recursive raytracing dislikes that.

- done test with gamma-corrected summation of colors during tracing, is
  commented out still. But this will give more balanced reflections. Now
  dark reflections that are reflected in a bright surface seem incorrect.

- Introduced 'Fresnel' effect for Mirror and Transparency. This
  influences the amount of mirror/transparency based at viewing angle.
  Next to a new Fresnel slider, also a 'falloff' button has been added to
  define the way it spreads.
- Fresnel also works for Ztransp rendering

- created new Panel for Raytrace options
  I have to evaluate still where it all should be logically located.
- material preview shows fake reflection and fake refraction as well.
2003-12-16 14:12:01 +00:00
Chris Want
356cf79534 OK, My turn to break things ...
The maximum vertex count for a mesh has been raised from 65000 to
2000000000L (yep, 2 billion!).

Please test!

Chris
2003-12-16 01:27:37 +00:00
Chris Want
e4d63d5764 The final piece to make blender build with the new python stuff
using the Makefiles (an #include was #excluded). Thanks
for doing the rest of it, Willian!
2003-12-16 01:15:52 +00:00
Willian Padovani Germano
966134c4fd Trying again to fix build problems with traditional makefiles.
I took a look at how other BPY_* functions were working in blenkernel/
and got to bad level calls (ah, so this is what that is for...).
As a test, I added BPY_clear_script to the "stubs", argh.  If this works,
I'm curious: are these bad level calls needed only by some targets (irix)
because of peculiarities in compiler linkage?

Thanks again, Chris, if this doesn't work, I'll move or copy  the function to
script.c, probably, also adding Python.h to it.
2003-12-16 00:17:59 +00:00
Willian Padovani Germano
050dc02134 Chris reported build errors w/ traditional makefiles.
This commit moves the 2 undefined references to BPY_interface.c and
changes things a little, hopefully fixing the problem.  I had to add a new dir,
source/blender/include/ to auto*'s Makefile.am in source/blender/python/.

Thanks Chris for the report, and Jiri, for adding a missing declaration.
2003-12-15 18:18:09 +00:00
Jiri Hnidek
436bb963f1 - added declaration SpaceType *spacescript_get_type (void); 2003-12-15 16:06:00 +00:00
Ton Roosendaal
8e6892174b - fix for particle duplicators:
when an object has an Ipo, the timing for each duplicated Object is
  corrected for the lifetime of particle. Looks great!
  Remark: this won't work  for object location (is at particle) or for
  particle type 'Vect' which gives a rotation already. But now you can
  scale an object small, and let it grow over time.
2003-12-15 14:18:37 +00:00
Martin Poirier
ec7c7d6983 BEVEL FOR MESH **** LONG LOG WARNING ****
The interesting part:

Bevelling functions for meshes.
Accessible through the Wkey menu.
You then have to enter the recursivity level (Warning, don't use 3 on a big mesh) and interactivly set the bevel width by moving the mouse. It draws the new faces in yellow. Ctrl constraint to 0.1 multiples, Shift switches to low gear, Space to type a value directly.
Support for selective bevelling isn't really working yet, so be sure to select all the vertices beforehand.


The less interesting part:

Code done by intrr (logical stuff, how the algorithm works) and me (math stuff and the interactive bevel width code).

The splitting and bevelling algorithm is not yet fully optimized, and the face shrinking math still doesn't like too big bevel width values. So this will have to be cleaned too.

Selective bevel is on the list next.

If you have any questions about how the code works, send the questions regarding the logic of the method to intrr and math questions to me.


This is very much testing code (or should I say teasing code), so please don't flood me with bug reports. (This excludes OFFICIAL Blender developpers who were there at the meeting and pretty much know what the limitations of the code is and what it should do.)
2003-12-15 04:38:30 +00:00
Martin Poirier
4760e53cc1 Some fix for local axis translation in edit mode. Sorry, I've fixed that weeks ago but never commit, so I really don't remember what the actual bug was. :o(
It wasn't from the bugtracker though.
2003-12-15 03:13:22 +00:00
Matt Ebb
67dab4a77e Updated some pulldown menus to be more consistent within themselves, and with the new guildelines. 2003-12-14 13:25:38 +00:00
Willian Padovani Germano
49021f7ec4 BPython - first step for better integration of Python in Blender:
- add a new space: Space Script
- add a new dna struct: Script
- add these two properly everywhere they are meant to

It's not a tiny commit, but most of it is ground work for what is still to be done.
Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window

Some files are added, so some build systems (not autotools) will need updates
2003-12-14 01:18:09 +00:00
Jacques Guignot
6653af7914 support for curve objects.(the code was ready, but commented out)
modified functions : New and Object_shareFrom
2003-12-13 17:15:15 +00:00
Roel Spruit
0a9f635972 I'm not quite awake yet. commiting wrong things all over the place... part3 of a simple commit, see my previous 2 commits... 2003-12-13 13:41:29 +00:00
Roel Spruit
29f6869267 Merge at center and at cursor update vertex-counter in the header.....
I will try to remember this stuff for my new stuff :)
2003-12-13 13:04:41 +00:00
Martin Poirier
8f58767ad3 By adding undo capability to the Mkey event calling for mirrormenu, I accidentilly disabled it for all other object type. Fixed now. 2003-12-12 23:44:07 +00:00
Ton Roosendaal
d0159a9879 - another fix, to make sure radio colors work local during tracing...
this will be quite a lot of reconstruction, if i want to go for
  refraction, caustics, pathlights, etc... :/
2003-12-12 23:40:35 +00:00
Ton Roosendaal
b2357b5bc6 - fix for error caused by last commit... colors changed by textures
during raytracing were 'hanging' and showing up in the first rendered
  material.
2003-12-12 23:04:05 +00:00
Roel Spruit
f574f38a39 Numpad - . (dot) now centers on selected vertices/controlpoints in editmode.
It already centered on selected objects outside of editmode, so this is just a consistency feature.
2003-12-12 20:54:12 +00:00
Ton Roosendaal
57afdf5231 - fixed tooltips for new 'ray' buttons in material buttons. 2003-12-12 20:00:15 +00:00
Ton Roosendaal
55c3082c6b - fix for AA of mirroring.
It appeared that the Osa vectors for view vector, and for rendered coord
  had an opposite sign...
2003-12-12 15:03:01 +00:00
Ton Roosendaal
7ea1d94032 - removed call to bzero, replaced with memset
(bzero seems to be old, not supported anymore, also not for windows)
- think I fixed the error compiling in Irix, for a correct cast now
  (added parentheses around the subject for cast)
- changed call to ray_mirror, now included in the shading loop, just
  before the addition happens for specular. That way specular is added
  over mirroring. This changes the appearance quite some!
2003-12-12 11:28:33 +00:00
Ton Roosendaal
71770977f2 - fix for error in octree traverse code, as appeared in sample provided
by Ztonzy. Error happened when:
  - ray intersects in first node of traversal
  - next ray should intersect in same first node as well
  - no other nodes were accessed inbetween
  It's a bit hard to explain! But the reason is in the optimize code
  in top of ocread() function, where binary XOR magic speeds up. Here
  some static variables needed a reset.
2003-12-11 16:28:04 +00:00
Martin Poirier
1bfa43da53 Fixes in ray.c for linking under windows (seems lie bzero doesn't exist).
Shouldn't affect other platform if I did it correctly.
2003-12-11 04:08:49 +00:00
Martin Poirier
76708e21f3 Fixed bug #794
The displist needed to be updated
2003-12-11 04:00:52 +00:00
Ton Roosendaal
a18cc02374 - Xmas special: shiny mirroring bells & whistles!
This is a revision of the old NeoGeo raytracer, dusted off, improved quite
a lot, and nicely integrated in the rest of rendering pipeline.
Enable it with F10-"Ray", and set either a 'ray-shadow' lamp or give the
Material a "RayMirror" value.
It has been added for 2 reasons:
- get feedback on validity... I need artists to play around with it if it's
  actually useful. It still *is* raytracing, meaning complex scenes will
  easily become slow.
- for educational purposes. All raytracing happens in ray.c, which can be
  quite easily adjusted for other effects.

When too many disasters pop up with this, I'll make it a compile #ifdef.
But so far, it seems to do a decent job.

Demo files: http://www.blender.org/docs/ray_test.tgz
An article (tech) about how it works, and about the new octree invention
will be posted soon. :)

Note: it doesn't work with unified render yet.
2003-12-10 20:41:53 +00:00
Ton Roosendaal
cad30134cb - Bug fix: lamp axis was not drawn at correct location. Was already wrong
since a long long time... :P
2003-12-10 19:01:26 +00:00
Ton Roosendaal
cc3c808ebb - committed fixes for tooltips as provided by Bischofftep. Thanks! 2003-12-10 16:22:30 +00:00
Kent Mein
da566a1102 Fixed error messages for saving jpeg files so its quite again.
(before I simplified it to return the result of the call to
imb_savejpeg turns out that makes it a little more verbose)

Kent
2003-12-09 19:25:30 +00:00
Ton Roosendaal
ed30332365 - fix: SHIFT+CTRL+P didn't work (make parent without inverse)
- added: when start blender in debug mode (blender -b) it prints the depth
  of framebuffer.
2003-12-09 17:46:40 +00:00
Ton Roosendaal
f27578eda2 - bug report #761
Subsurf, rendered in Wire, always displayed the 'optimal edges' version.
  Added check for 'optimal' flag here, now it renders as it draws in 3d win
2003-12-08 17:39:54 +00:00
Ton Roosendaal
825c40ed6a - and another fix needed due to the change in view3d matrices...
This one is the UV coord calculate function for FaceSelect mode.
2003-12-08 17:24:28 +00:00
Ton Roosendaal
77d934a813 - bug #766
the toolbox, editmode curve, 'edit' submenu had the wrong 'show/hide'
  sublevel. Was more of a typo...
2003-12-08 16:53:44 +00:00
Ton Roosendaal
23c1b0a7d4 - bug report Theeth, #772
When joining 2 unconnected control points in Curve/Surface (FKEY) Blender
  crashed.
  Was just assuming in this code that a knots vector array was there...
  simple fix!

  BTW: I think Theeth discovered here the oldest Blender ever, I could
  track it back to old Traces code from 1992. :)
2003-12-08 16:46:36 +00:00
Rob Haarsma
aefb33e8cf Corrected function name. 2003-12-08 15:13:00 +00:00
Jiri Hnidek
6c09dd6fc2 - some warning removed 2003-12-08 13:48:20 +00:00
Jiri Hnidek
06d0fa22d9 - bug of hidden MetaBalls removed :-) (some problems with old TubeX/Y/Z can occured)
- MetaBalls/MetaElems with too small stiffness are not polygonized, but still can influence others MetaBalls/MetaElems
- better behavior of negative MetaBalls/MetaElems
2003-12-08 13:30:04 +00:00
Rob Haarsma
b4192ad94b Prints current blend filename in windowheader. 2003-12-08 13:08:24 +00:00
Matt Ebb
d57df6373e * Renewed the constraints panel's design 2003-12-08 10:51:24 +00:00
Matt Ebb
89fa8449a6 * Further general tweaking to UI controls drawing
* Improved TOG3 buttons to communicate functionality better
2003-12-08 10:48:28 +00:00
Chris Want
b08cdfbdba A fix so that verts can be added or removed from a mesh with vertex keys
in editmode without damaging the mesh. Please test.
2003-12-08 05:07:36 +00:00
Ton Roosendaal
a6ed4d2d86 - Solution for fixing plugins, which now runs without -ldl at OSX 10.2/3
Code from Peter O'Gorman <ogorman@users.sourceforge.net which has
  been credited in the source.
  Basically the dlopen() and dlerror() calls have been recreated wrapping
  the standard OSX methods.
  Names used are osxdlopen() and osxdlerror(). So no naming conflict will
  occur.
2003-12-07 19:20:10 +00:00
Ton Roosendaal
a72fcb115b - fixed texture paint mode... and that all caused by fixing another bug!
again - reminder to self - the 3d window leaves in ortho mode default,
  and for evaluating it in 3d view you have to call persp(PERSP_VIEW)
2003-12-07 18:44:47 +00:00
Ton Roosendaal
dae2b17400 - committed in the 'hack' as mailed to committers list by Douglas B, which
he got from Nicolas Zinovieff, to solve the struct ID conflict with
  AIFF. By including a #define __AIFF__ in the top of the files, the
  blender includes won't get frustrated by an already defined struct ID.

  should still be tested for 10.3 and other OSX installs!
2003-12-07 12:55:18 +00:00
Matt Ebb
7ab1c64c7a Default buttons drawing update
* Big code cleanup and re-organisation, cleaner drawing
* Button alignment now enabled for default theme
* Sliders tweaked and improved
* Tooltip shadow cleaned up

Todo: Alignment looks pretty, but at this stage, what it *means* is not clear or consistent. Need to work out some UI guidelines for when to and when not to use the alignment code.
2003-12-07 06:05:08 +00:00
Martin Poirier
e5ab092f46 Fixed error in Face Normals toolbox. All the menu entries called the function to Recalculate Inside. 2003-12-07 03:44:36 +00:00
Kent Mein
24624501a4 This looks like a lot but its a few small changes.
Summary: standardized imageformat functions(make function names similar, and
parameters in same order where relavant), small code cleanups, and
added a description of how to add an image format to blender.

Kent

Specifics:
merged png_decode.c and png_encode.c to png.c and cleaned function calls.

fixed some spacing in IMB_imbuf_types.h

casting cleanups:
        intern/amiga.c
        intern/ham.c
        intern/iris.c

Modified switch statements to have a default type to insure values are set:
        intern/antialias.c

Initalization of some vars and make types similar.
        intern/bitplanes.c

cleaned function calls, and changed if else to if's with return:
        intern/jpeg.c

added {}'s in multidemensional arrays.
        intern/matrix.h

Made a little cleaner to read, and matched above changes.
        intern/readimage.c
        intern/writeimage.c
2003-12-04 18:18:05 +00:00
Ton Roosendaal
43369f076f - added wire color theme usage for drawing edges in editmode. 2003-12-04 11:37:39 +00:00
Ton Roosendaal
241906b588 - fixed matrix conversion to make rgb -> bw images.
somehow this was mixed up, or forgotten to fix when endian issues were
  solved in the past (1998)...
  To check: red color should be 30% grey, blue 10%. This was switched,
  making B&W images look unnatural.
2003-12-03 16:13:58 +00:00
Ton Roosendaal
50b6f0aa33 - another oldie! Bug 475, which was wrongly categorized by me as OpenGL
error... Jesterking report helped me finding the mistake! We found out
  that pressing F12 while rendering is in progress, crashes...

Hi Yamyam,

I beg you to forgive me! Totally misread the report... the error was only
in pressing F12 *during* rendering, it even restarts a render then. This
happens always, no matter what is being rendered.

I found the code for renderwindow doesn't use queues to store events, like
in the rest of Blender, but immediately executes incoming events. This
means you can even press ZKEY (zoom) or F11 (hide) while rendering.

In CVS I've committed a patch that checks if Blender renders, before
allowing to execute the F12 event. Also now blocked is F3 (!) during render.
The other options (zoom, push window) still work.

-Ton-
2003-12-03 15:44:11 +00:00