Commit Graph

1127 Commits

Author SHA1 Message Date
Ton Roosendaal
761fd601ea - brought back to render.h includes... ifdef SGI and Windows... 2003-12-21 22:31:03 +00:00
Ton Roosendaal
26df64a691 - removed render.h from this file. 2003-12-21 22:23:20 +00:00
Ton Roosendaal
ec99255c27 Phew, a lot of work, and no new features...
Main target was to make the inner rendering loop using no globals anymore.
This is essential for proper usage while raytracing, it caused a lot of
hacks in the raycode as well, which even didn't work correctly for all
situations (textures especially).

Done this by creating a new local struct RenderInput, which replaces usage
of the global struct Render R. The latter now only is used to denote
image size, viewmatrix, and the like.

Making the inner render loops using no globals caused 1000s of vars to
be changed... but the result definitely is much nicer code, which enables
making 'real' shaders in a next stage.
It also enabled me to remove the hacks from ray.c

Then i went to the task of removing redundant code. Especially the calculus
of texture coords took place (identical) in three locations.
Most obvious is the change in the unified render part, which is much less
code now; it uses the same rendering routines as normal render now.
(Note; not for halos yet!)

I also removed 6 files called 'shadowbuffer' something. This was experimen-
tal stuff from NaN days. And again saved a lot of double used code.

Finally I went over the blenkernel and blender/src calls to render stuff.
Here the same local data is used now, resulting in less dependency.
I also moved render-texture to the render module, this was still in Kernel.
(new file: texture.c)

So! After this commit I will check on the autofiles, to try to fix that.
MSVC people have to do it themselves.
This commit will need quite some testing help, but I'm around!
2003-12-21 21:52:51 +00:00
Alexander Ewering
16eec383fd Fixed the call to CalcNormFloat to use neweve[]->co.
Goofster: The difference between you and Ton reporting the problem was
that he actually took the time to analyze the warning and pin down the
problem, while your "hahaha, your code has a warning!" didn't really
help me a lot in the first place.
2003-12-20 13:46:50 +00:00
Ton Roosendaal
0060be6603 More render stuff:
- added 'Mapping to" channel "RayMirror", to control mirror with texture
- fixed bug in using mirror-rgb as texture channel... this is cumbersome
  because it is abused by Envmap in a not nice way. Fixing the abuse will
  cause compatibility errors, which can be fixed when we up release # to
  2.32.

- added "Translucency", which is nothing else than allowing another
  shading pass for the backside of a face (with normal inverted). This
  is interesting for all kinds of situations where you want light from
  behind to 'shine through'. Also works to reduce dark areas in
  unlighted parts of rendering transparent faces. Light from behind on
  transparent red window should make it glowing some, right?!
- added texture channel for this as well

- Reorganized Material Panels to reveil some consistancy where buttons
  can be found. Not perfect yet, but at least all options for Shaders and
  options for Mirror & Transparency now are together.
  This gives some space in Shader Panel for nice expansion.
2003-12-19 15:23:12 +00:00
Matt Ebb
2cac5e0dda Updated the Mac OS X blender file icon with standard background and xype's nice shiney blender logo 2003-12-19 12:07:24 +00:00
Jacques Guignot
0468a787d7 Bug fixes (sigh...) 2003-12-18 21:45:15 +00:00
Ton Roosendaal
cb20f1cdb4 another trace commit
- implemented tracing of transparency for shadows. This is a material
  option, in the new RayTrace panel.
  it only traces color and alpha, not shading. So the results of some
  transparant colored unlit faces can look odd. I will look onto that.
- changed fresnel formula (got hint from eeshlo!). this simplifies the UI,
  now only one button needed. The fresnel value "should" be identical as
  the refraction index, but that is booooring! So i added a special fresnel
  refraction slider for both mirroring and transparency. By setting all 3
  sliders equal, you get 'realism'.
- fresnel for transparancy works for Ztra rendering too. Same for transpa-
  rent shadow. But then you need to set 'ray' on in F10 menu.
- uploaded new monkey_glass blend in download.blender.org/demo/test/

Next stage: killing the globals from render, and implement "translucency"
which is effectively allowing faces being lit from behind, as paper or
cloth.
2003-12-18 21:34:48 +00:00
Martin Poirier
d1122ae917 Yay! Bevel is back in business. Thanks to intrr for pointing out the problem (flag check missing). 2003-12-18 01:37:50 +00:00
Jacques Guignot
4b813c5c81 Modification of the function getCurvecurval suggested by Jiba. This function can take an integer argument (the position of the curve) or a string (the name of the curve)
Updated documentation in doc/Ipo.py
2003-12-17 14:15:14 +00:00
Martin Poirier
ed67092601 Nathanael Law's fix to make numerical input more compatible with axis constraints.
I thought this was a nice addition, so I'm commiting it.

To Ton for easier changelog creation: When constraining to an axis, numerical input is limited (and will switch automaticly) to that axis.

Original e-mail
-------------------------------
I was playing with the axis constraints for grab and scale transforms
and I thought that the behavior was slightly illogical.  Without axis
constraints, I think everything is great, but once a constraint is used
some irregularities show up.  (Note, this is not a bug, it's more of a
possible improvement)

When you enter grab or scale mode, then constrain the transformation to
a
particular axis, then enter numeric entry mode by hitting a number or
'n', there is no reason for you to try and edit the numeric value of a
non-constrained axis which is the current behavior.

E.g. You grab an object and want to move it along the z-axis, so you
enter grab mode and either hit 'z' or the middle mouse button and you
move the mouse to get an idea of how it looks.  You decide that you
want to use a value of +4.2 with numeric entry; now you have to enter
the following sequence: 'g', 'z', 'move mouse', 'tab', 'tab', '4.2',
'enter'.  However, you're already constrained to the z-axis, so you
should not have to enter 'tab', 'tab'.

The included patch changes the behavior of grab and scale transforms so
that if you are constrained to an axis, and enter numeric entry mode
via
'n' or by hitting a number, you will immediately begin editing the
appropriate axis, and will not have to hit 'tab'.

This may not seem like a big improvement (because it's not), but I feel
that it improves the workflow of a commonly used task slightly and does
not negatively impact any other aspects of the program.

I welcome feedback on this idea.

--
 - Nathanael Law <njlaw@xyrodian.com>
2003-12-17 04:27:29 +00:00
Martin Poirier
8c570d4bb4 Fix for the bevel wrapping face detection algorithm. Still some case where quad will wrap. From the test I did, this seems to happen most of the time with MAJORLY non-coplanar faces. Still trying to find a final fix that would work all the time. 2003-12-17 04:16:32 +00:00
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