POV-Ray : Newsgroups : povray.unofficial.patches : 2 suggestions for Megapatch 0.5 Server Time
2 Nov 2024 07:27:08 EDT (-0400)
  2 suggestions for Megapatch 0.5 (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: H E  Day
Subject: 2 suggestions for Megapatch 0.5
Date: 10 Feb 2000 20:47:38
Message: <38A36986.1A5FCD1A@fci.net>
My first suggestion deals with the Soft_Blur feature.  Could someone put
a
third value, "tolerance"  to the syntax?  This would be helpful if the
artist wants only the bright parts to glow. (Like the lights on the
surface of a spaceship :)  1 would be only the brightest parts and 0
would be all the picture.

The second request is to add a trace2 feature.  This would only return
the normal and position if the ray collides with a declared object *and
doesn't collide with any declared other objects*.
I mean like this.

trace2(object,testobject,start,vector,normal)

Where "object" is the object you're shooting at, and "testobject" is the

object you want to test.  This method would only test the "testobject"
BEFORE the ray hits the "object".
Can these be done???
Thanks in advance!

--
H.E. Day


Post a reply to this message

From: Chris Huff
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 10 Feb 2000 21:06:24
Message: <chrishuff_99-B18EAD.21072610022000@news.povray.org>
In article <38A36986.1A5FCD1A@fci.net>, Pov### [at] aolcom wrote:

> My first suggestion deals with the Soft_Blur feature.  Could someone put
> a
> third value, "tolerance"  to the syntax?  This would be helpful if the
> artist wants only the bright parts to glow. (Like the lights on the
> surface of a spaceship :)  1 would be only the brightest parts and 0
> would be all the picture.

That sounds like a good idea to me...


> The second request is to add a trace2 feature.  This would only return
> the normal and position if the ray collides with a declared object *and
> doesn't collide with any declared other objects*.
> I mean like this.
> 
> trace2(object,testobject,start,vector,normal)
> 
> Where "object" is the object you're shooting at, and "testobject" is the
> 
> object you want to test.  This method would only test the "testobject"
> BEFORE the ray hits the "object".

Why not just use a macro for this? Trace against both objects, and use 
the relative distances of the intersection points from the start point 
to decide which was hit first.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Ron Parker
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 10 Feb 2000 21:07:47
Message: <slrn8a6s6k.rm.ron.parker@linux.parkerr.fwi.com>
On Thu, 10 Feb 2000 17:44:38 -0800, H.E. Day wrote:
>the normal and position if the ray collides with a declared object *and
>doesn't collide with any declared other objects*.
>I mean like this.
>
>trace2(object,testobject,start,vector,normal)
>
>Where "object" is the object you're shooting at, and "testobject" is the
>
>object you want to test.  This method would only test the "testobject"
>BEFORE the ray hits the "object".
>Can these be done???

#macro trace2(Object, TestObject, Start, Vector, Normal )
  #local TestNorm = <0,0,0>;
  #local ONorm = <0,0,0>;
  #local TestInt = trace(TestObject, Start, Vector, TestNorm);
  #local Int = trace(Object,Start,Vector,ONorm);
  #if (vlength(TestNorm)>.1 & vlength(ONorm)>.1)
    #if (vlength(TestInt-Start)>vlength(Int-Start))
      #declare Normal=ONorm;
      Int
    #else
      #declare Normal=<0,0,0>;
      <0,0,0>
    #end
  #else
    #declare Normal=ONorm;
    Int
  #end   
#end


Post a reply to this message

From: Glen Berry
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 12:21:40
Message: <4kCkON82VrkeyrJZYDr6QYRpJQfc@4ax.com>
On Thu, 10 Feb 2000 17:44:38 -0800, "H.E. Day" <hed### [at] fcinet> wrote:

>My first suggestion deals with the Soft_Blur feature.  Could someone put
>a
>third value, "tolerance"  to the syntax?  This would be helpful if the
>artist wants only the bright parts to glow. (Like the lights on the
>surface of a spaceship :)  1 would be only the brightest parts and 0
>would be all the picture.

I had also thought of basically the same idea, but it would be better
grammar to use the word "Threshold" instead of "Tolerance", if you
don't mind my saying so. Basically any pixel who's brightness exceeds
a certain "threshold" would be made to glow. Alternately, one could
assign two numbers instead of one, and declare a "range" of values
that would have glow applied.  This might allow some interesting
experimental special effects, because you could selectively blur only
the shadows, midtones, or anything else that you desire.

My original idea was to keep track of the individual image pixel
values in floating point format and only apply effects to pixels that
*exceeded* 1.0 in value. The actual threshold would be changeable for
example, to something like 3, 12, or whatever you want. This way,
perfect white surfaces which might have a value of 1.0 would not be
blurred, but light sources which might exceed a value of 1.0 by a
significant amount *would* be blurred. 

In fact, this threshold could be applied to things other than the
current blur feature. Lens flare, comma distortion, and "cross" or
star-shaped highlights come to mind as possible candidates for effects
that would depend on a pixel brightness threshold.

Does anyone else like the idea?

later,
Glen Berry


Post a reply to this message

From: Bob Hughes
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 12:44:20
Message: <38a44a74@news.povray.org>
I like it, mainly because of the control over scene illumination.
You're suggesting a frosted filter effect having both a threshold and a
tolerance then I suppose.  Better yet would be a user-defined filter way of
doing it, perhaps an array describing the baseline method to use.  Something
similar to what I've seen in paint programs which might allow for a strength and
pattern to be set.  If anyone knows what I'm talking about.

Bob

"Glen Berry" <7no### [at] ezwvcom> wrote in message
news:4kCkON82VrkeyrJZYDr6QYRpJQfc@4ax.com...
| On Thu, 10 Feb 2000 17:44:38 -0800, "H.E. Day" <hed### [at] fcinet> wrote:
|
| >My first suggestion deals with the Soft_Blur feature.  Could someone put
| >a
| >third value, "tolerance"  to the syntax?  This would be helpful if the
| >artist wants only the bright parts to glow. (Like the lights on the
| >surface of a spaceship :)  1 would be only the brightest parts and 0
| >would be all the picture.
|
| I had also thought of basically the same idea, but it would be better
| grammar to use the word "Threshold" instead of "Tolerance", if you
| don't mind my saying so. Basically any pixel who's brightness exceeds
| a certain "threshold" would be made to glow. Alternately, one could
| assign two numbers instead of one, and declare a "range" of values
| that would have glow applied.  This might allow some interesting
| experimental special effects, because you could selectively blur only
| the shadows, midtones, or anything else that you desire.
|
| My original idea was to keep track of the individual image pixel
| values in floating point format and only apply effects to pixels that
| *exceeded* 1.0 in value. The actual threshold would be changeable for
| example, to something like 3, 12, or whatever you want. This way,
| perfect white surfaces which might have a value of 1.0 would not be
| blurred, but light sources which might exceed a value of 1.0 by a
| significant amount *would* be blurred.
|
| In fact, this threshold could be applied to things other than the
| current blur feature. Lens flare, comma distortion, and "cross" or
| star-shaped highlights come to mind as possible candidates for effects
| that would depend on a pixel brightness threshold.
|
| Does anyone else like the idea?
|
| later,
| Glen Berry


Post a reply to this message

From: Nathan Kopp
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 13:28:18
Message: <38a454c2@news.povray.org>
Glen Berry <7no### [at] ezwvcom> wrote...
> My original idea was to keep track of the individual image pixel
> values in floating point format and only apply effects to pixels that
> *exceeded* 1.0 in value. The actual threshold would be changeable for
> example, to something like 3, 12, or whatever you want. This way,
> perfect white surfaces which might have a value of 1.0 would not be
> blurred, but light sources which might exceed a value of 1.0 by a
> significant amount *would* be blurred.
>
> In fact, this threshold could be applied to things other than the
> current blur feature. Lens flare, comma distortion, and "cross" or
> star-shaped highlights come to mind as possible candidates for effects
> that would depend on a pixel brightness threshold.
>
> Does anyone else like the idea?

I do.  The functionality to do this (in terms of using the original,
unclipped float values) is already part of the post-processing framework.
If anybody want's to develop more post-processing filters and would like
some advice, let me know.  Hopefully this weekend I will have some time to
write up a little tutorial on writing new filters.

-Nathan


Post a reply to this message

From: Nathan Kopp
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 13:31:23
Message: <38a4557b@news.povray.org>
H.E. Day <hed### [at] fcinet> wrote...
> My first suggestion deals with the Soft_Blur feature.  Could someone put
> a
> third value, "tolerance"  to the syntax?  This would be helpful if the
> artist wants only the bright parts to glow. (Like the lights on the
> surface of a spaceship :)  1 would be only the brightest parts and 0
> would be all the picture.

This would be quite easy to implement.  I do want to update the syntax,
though.  Also, glows or other effects could be applied based on the
non-clipped float value (as described by Glenn) or even by an ID that is
tagged on specific objects (not fully implemented yet).

-Nathan


Post a reply to this message

From: Glen Berry
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 18:15:51
Message: <7YWkOCAIPNx4pqB5Ucg+TA0cZtau@4ax.com>
On Fri, 11 Feb 2000 11:44:35 -0600, "Bob Hughes"
<omn### [at] hotmailcom?subject=PoV-News:> wrote:

>I like it, mainly because of the control over scene illumination.
>You're suggesting a frosted filter effect having both a threshold and a
>tolerance then I suppose.  

That's one way to think of it. I was actually thinking of setting a
minimum and maximum value, instead of the single  one-parameter
"threshold", as first suggested. Perhaps "post_process_min" and
"post_process_max", or some similar syntax.

To specify  a threshold, and then specify a (+-) tolerance amount for
that threshold would achieve about the same thing. It seems to be just
a matter of which syntax one might prefer to achieve the same result.

>Better yet would be a user-defined filter way of
>doing it, perhaps an array describing the baseline method to use.  Something
>similar to what I've seen in paint programs which might allow for a strength and
>pattern to be set.  If anyone knows what I'm talking about.

I think I know what you mean. I have used paint programs that allow
users to set a grid of multiplier values to create a custom filter. 

Something like this creates a strong blur filter::

   1    1    1    1    1
   1    1    1    1    1
   1    1    1    1    1
   1    1    1    1    1
   1    1    1    1    1

   Divisor: 25
   Offset: 0

This, would create a sharpen filter:

   0     0    0    0    0
   0   -2   -2   -2    0
   0   -2  32   -2    0
   0   -2   -2   -2    0
   0     0    0    0    0

   Divisor: 16
   Offset: 0

Blur, sharpen, linear blur(streaking), bas relief, find edges,
negative effects, contour, edge enhancement, and other effects can be
achieved in this manner. I've used a 5x5 matrix for this example, but
larger matrices can sometimes achieve more dramatic or accurate
effects. They also require more computations. Sometimes it is also
desireable to perform these matrix operations upon only one color
channel, or to supply a different matrix for each channel. This might
especially be handy for people working with an alpha channel.

I also wanted to mention that the contour and edge effects can be
played with to achieve some cartoon or line drawing effects. This
might come in handy for the post-process cartoon effect Nathan was
working on.

I assume that Nathan's vision of Mega-POV will allow several
post-process effects to be appled in sucession, if desired. It would
be nice to set the post-process "thresholds" or "ranges" seperately
for each post-process effect performed, instead of having some global
variables that controlled all the post-processing within the scene
file. For example, one might want to focal blur the whole scene, but
also have added blur only on the strongest of highlights.

later,
Glen Berry


Post a reply to this message

From: Glen Berry
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 18:20:13
Message: <2JekOHCH+AElDZT=3fB+3ZIe6i8V@4ax.com>
On Fri, 11 Feb 2000 13:25:54 -0500, "Nathan Kopp" <Nat### [at] Koppcom>
wrote:

>If anybody want's to develop more post-processing filters and would like
>some advice, let me know.  Hopefully this weekend I will have some time to
>write up a little tutorial on writing new filters.

I'd like to try this. Any assistance you could provide would be
greatly appreciated. Feel free to email me personally, if you like.
Especially if you have some tips or recent info that isn't in the
Mega-POV source code.

thanks,
Glen Berry
pho### [at] ezwvcom


Post a reply to this message

From: Peter Popov
Subject: Re: 2 suggestions for Megapatch 0.5
Date: 11 Feb 2000 21:28:50
Message: <csSkOOLMLk7AIGMqxxvg6PdfG1xX@4ax.com>
On Fri, 11 Feb 2000 13:25:54 -0500, "Nathan Kopp" <Nat### [at] Koppcom>
wrote:

>If anybody want's to develop more post-processing filters and would like
>some advice, let me know.  

I'm not your man on this account but I have quite some experience in
2D image manipulation and I think can give you or anyone interested
some neato ideas on other post-processing filters and combinations
thereof. Drop me a line if anyone is interested.


Peter Popov
pet### [at] tagpovrayorg
ICQ: 15002700


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.