[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12407] trunk/blender/source/blender: nodes from eechlo

Alfredo de Greef eeshlo at yahoo.com
Fri Oct 26 22:27:19 CEST 2007


Hi,

I'm sorry, no docs yet. I really didn't intend the
nodes to be included as is. As I wrote in the
patchtracker, I didn't consider them finished, so I
only put them in the patchtracker in case there was
anyone interested in working on them further.

Also, right now, I do not really have the time to make
some good examples and docs, I am very busy working on
the mprenderer since it has to pass a certain test
soon ;)

Maybe Matt Ebb could do something, he has some
experience with the nodes now (if he has the time of
course, I know he is very busy himself). Well, he
certainly would be able to come up with nicer example
pictures, that's for sure. :)

Anyway, otherwise, I'll do something myself as soon as
possible, but the mprenderer has priority now.

Alfredo

--- Chris Burt <desoto at exenex.com> wrote:

> Are there any docs on these anywhere aside from the
> one demo image in
> the bug tracker?
> 
> Thanks!
> 
> --Chris
> 
> On 10/26/07, Campbell Barton <cbarton at metavr.com>
> wrote:
> > Revision: 12407
> >          
>
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12407
> > Author:   campbellbarton
> > Date:     2007-10-26 17:32:36 +0200 (Fri, 26 Oct
> 2007)
> >
> > Log Message:
> > -----------
> > nodes from eechlo
> > * glare
> > * tonemap
> > * lense distort
> > * fast gauss blur
> >
> >
>
http://projects.blender.org/tracker/?func=detail&atid=127&aid=7505&group_id=9
> >
> > made fast gauss blur an option for the blur node
> rather then a separate node.
> >
> > Modified Paths:
> > --------------
> >    
> trunk/blender/source/blender/blenkernel/BKE_node.h
> >    
>
trunk/blender/source/blender/blenkernel/intern/node.c
> >    
>
trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
> >    
>
trunk/blender/source/blender/makesdna/DNA_node_types.h
> >    
>
trunk/blender/source/blender/makesdna/DNA_scene_types.h
> >     trunk/blender/source/blender/nodes/CMP_node.h
> >    
>
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
> >    
>
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
> >    
> trunk/blender/source/blender/nodes/intern/CMP_util.c
> >    
> trunk/blender/source/blender/nodes/intern/CMP_util.h
> >     trunk/blender/source/blender/src/drawnode.c
> >
> > Added Paths:
> > -----------
> >    
>
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_glare.c
> >    
>
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c
> >    
>
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c
> >
> > Modified:
> trunk/blender/source/blender/blenkernel/BKE_node.h
> >
>
===================================================================
> > ---
> trunk/blender/source/blender/blenkernel/BKE_node.h 
> 2007-10-26 15:13:50 UTC (rev 12406)
> > +++
> trunk/blender/source/blender/blenkernel/BKE_node.h 
> 2007-10-26 15:32:36 UTC (rev 12407)
> > @@ -303,6 +303,10 @@
> >  #define CMP_NODE_INVERT                251
> >  #define CMP_NODE_NORMALIZE      252
> >
> > +#define CMP_NODE_GLARE         301
> > +#define CMP_NODE_TONEMAP       302
> > +#define CMP_NODE_LENSDIST      303
> > +
> >  /* channel toggles */
> >  #define CMP_CHAN_RGB           1
> >  #define CMP_CHAN_A                     2
> >
> > Modified:
>
trunk/blender/source/blender/blenkernel/intern/node.c
> >
>
===================================================================
> > ---
>
trunk/blender/source/blender/blenkernel/intern/node.c
>       2007-10-26 15:13:50 UTC (rev 12406)
> > +++
>
trunk/blender/source/blender/blenkernel/intern/node.c
>       2007-10-26 15:32:36 UTC (rev 12407)
> > @@ -2365,6 +2365,10 @@
> >         nodeRegisterType(ntypelist,
> &cmp_node_flip);
> >         nodeRegisterType(ntypelist,
> &cmp_node_displace);
> >         nodeRegisterType(ntypelist,
> &cmp_node_mapuv);
> > +
> > +       nodeRegisterType(ntypelist,
> &cmp_node_glare);
> > +       nodeRegisterType(ntypelist,
> &cmp_node_tonemap);
> > +       nodeRegisterType(ntypelist,
> &cmp_node_lensdist);
> >  }
> >
> >  static void registerShaderNodes(ListBase
> *ntypelist)
> >
> > Modified:
>
trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
> >
>
===================================================================
> > ---
>
trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
>    2007-10-26 15:13:50 UTC (rev 12406)
> > +++
>
trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
>    2007-10-26 15:32:36 UTC (rev 12407)
> > @@ -161,8 +161,10 @@
> >
> >  int imb_is_a_hdr(void *buf)
> >  {
> > -       /* For recognition, Blender only loades
> first 32 bytes, so use #?RADIANCE id instead */
> > -       if (strstr((char*)buf, "#?RADIANCE"))
> return 1;
> > +       // For recognition, Blender only loads
> first 32 bytes, so use #?RADIANCE id instead
> > +       // update: actually, the 'RADIANCE' part
> is just an optional program name, the magic word is
> really only the '#?' part
> > +       //if (strstr((char*)buf, "#?RADIANCE"))
> return 1;
> > +       if (strstr((char*)buf, "#?")) return 1;
> >         // if (strstr((char*)buf,
> "32-bit_rle_rgbe")) return 1;
> >         return 0;
> >  }
> > @@ -176,7 +178,6 @@
> >         int found=0;
> >         int width=0, height=0;
> >         int x, y;
> > -       int ir, ig, ib;
> >         unsigned char* ptr;
> >         unsigned char* rect;
> >         char oriY[80], oriX[80];
> > @@ -225,18 +226,14 @@
> >                                        
> *rect_float++ = fcol[GRN];
> >                                        
> *rect_float++ = fcol[BLU];
> >                                        
> *rect_float++ = 1.0f;
> > -
> >                                         /* Also
> old oldstyle for the rest of blender which is not
> using floats yet */
> > -/* very weird mapping! (ton) */
> > -                                       fcol[RED]
> = 1.f-exp(fcol[RED]*-1.414213562f);
> > -                                       fcol[GRN]
> = 1.f-exp(fcol[GRN]*-1.414213562f);
> > -                                       fcol[BLU]
> = 1.f-exp(fcol[BLU]*-1.414213562f);
> > -                                       ir =
> (int)(255.f*pow(fcol[RED], 0.45454545f));
> > -                                       ig =
> (int)(255.f*pow(fcol[GRN], 0.45454545f));
> > -                                       ib =
> (int)(255.f*pow(fcol[BLU], 0.45454545f));
> > -                                       *rect++ =
> (unsigned char)((ir<0) ? 0 : ((ir>255) ? 255 : ir));
> > -                                       *rect++ =
> (unsigned char)((ig<0) ? 0 : ((ig>255) ? 255 : ig));
> > -                                       *rect++ =
> (unsigned char)((ib<0) ? 0 : ((ib>255) ? 255 : ib));
> > +                                       // e:
> changed to simpler tonemapping, previous code was
> rather slow (is this actually still relevant at
> all?)
> > +                                       fcol[RED]
> = fcol[RED]/(1.f + fcol[RED]);
> > +                                       fcol[GRN]
> = fcol[GRN]/(1.f + fcol[GRN]);
> > +                                       fcol[BLU]
> = fcol[BLU]/(1.f + fcol[BLU]);
> > +                                       *rect++ =
> (unsigned char)((fcol[RED] < 0.f) ? 0 : ((fcol[RED]
> > 1.f) ? 255 : (255.f*fcol[RED])));
> > +                                       *rect++ =
> (unsigned char)((fcol[GRN] < 0.f) ? 0 : ((fcol[GRN]
> > 1.f) ? 255 : (255.f*fcol[GRN])));
> > +                                       *rect++ =
> (unsigned char)((fcol[BLU] < 0.f) ? 0 : ((fcol[BLU]
> > 1.f) ? 255 : (255.f*fcol[BLU])));
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list