 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <chrishuff-DDBC53.06140904112000@news.povray.org>, Chris
Huff <chr### [at] mac com> wrote:
> I'm having a hard time getting it to work though...I suspect the problem
> is in my parsing code, though I'm not sure why it is misbehaving.
I found the problem, a rather nasty bug in Copy_Spline(). It allocates
room for the spline data, but doesn't copy the old data to the new
spline. I have no idea how this wasn't noticed before...the fixed
version is below(all that was needed was the addition of one line, the
call to memcpy()). I am still not sure it is right, I have never used
memcpy() before, but it works. :-)
SPLINE2 * Copy_Spline(SPLINE2 * se)
{
SPLINE2 * New;
New = (SPLINE2 *)POV_MALLOC(sizeof(SPLINE2), "spline");
New->SplineEntries =
POV_MALLOC(se->Number_Of_Entries*sizeof(SPLINE_ENTRY), "spline entry");
memcpy(New->SplineEntries, se->SplineEntries,
se->Number_Of_Entries*sizeof(SPLINE_ENTRY));
New->Number_Of_Entries = se->Number_Of_Entries;
New->Type = se->Type;
return New;
}
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>I found the problem, a rather nasty bug in Copy_Spline(). It allocates
>room for the spline data, but doesn't copy the old data to the new
>spline. I have no idea how this wasn't noticed before...the fixed
>version is below(all that was needed was the addition of one line, the
>call to memcpy()). I am still not sure it is right, I have never used
>memcpy() before, but it works. :-)
Thanks!
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3a03ab54$1@news.povray.org>, "Mark Wagner"
><mar### [at] gte net> wrote:
>
>(got a better name for the last one? "all"?)
"all" makes more sense than "grey".
>
>> I'm going to be removing the limit on the number of points in a spline,
>
>There is a limit? I hadn't noticed...
The limit is 256 points -- enough for most uses, but why have a limit when
there doesn't need to be one?
>Also, it would be useful if you could access the control points, with
>functions that behave similar to the array functions and an array-like
>syntax.
This might be very difficult to implement -- there are enough problems with
the spline syntax as it is.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
That worked much better. Thanks for the assist.
Mark Wagner wrote:
>
> Try the links from my POV-Ray downloads page to see if they work for you.
>
> http://www.geocities.com/rengaw03/povray.html
>
> --
> Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a04ed21@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> "all" makes more sense than "grey".
That is what I finally implemented it as. It took me a while to figure
out how to allow rgb, red, green, and blue to be used, though.
> The limit is 256 points -- enough for most uses, but why have a limit
> when there doesn't need to be one?
It looks to me like that was just a stopgap measure...it looks like you
could implement it mostly by adding code to the Insert_Spline_Entry()
function.
I don't have any experience with growing dynamically allocated
arrays...I tend to use linked lists for everything.
> >Also, it would be useful if you could access the control points, with
> >functions that behave similar to the array functions and an array-like
> >syntax.
> This might be very difficult to implement -- there are enough
> problems with the spline syntax as it is.
I think could get it working with functions, but I have no idea how to
do the array like syntax...
INT spline_points(SPLINE_IDENT) Retrieves the number of points in the
spline.
EXPRESS get_spline_point(INT_INDEX) Returns the corresponding point on
the spline.
BTW, I implemented the SPLINE_IDENT(T, TYPE) syntax. You can now do
something like this:
#declare Spl = spline {linear_spline ...}
#declare Val1 = Spl(T);
#declare Val2 = Spl(T, cubic_spline);
#declare Val3 = Spl(T, quadratic_spline);
I will send you the code soon.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <chrishuff-AE6B1C.09490803112000@news.povray.org>, Chris
Huff <chr### [at] mac com> wrote:
> I will send you the code as soon as it is tested.
I've found a couple more bugs, for example, Insert_Spline_Entry() took a
vector and tried to pass 5 float values through it. I changed that to an
expression... However, it might be a good idea to have separate
Insert_Spline_Vector_Entry() and maybe Insert_Spline_Float_Entry()
functions for ease of use in other code.
I also cleaned up a lot of the code, mostly just reformatting it, but
partly rewriting some functions. And I fixed some typos in the
comments...:-)
I plan on doing more, but I thought you would like to have what I have
done so far. I hope this is helpful in the work you are doing.
The spline code changes are here:
http://homepage.mac.com/chrishuff/mpovplus/splines.zip
I will upload the curves post_process patch soon.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mark Wagner wrote:
>
> Chris Huff wrote in message ...
> >In article <3a03ab54$1@news.povray.org>, "Mark Wagner"
> ><mar### [at] gte net> wrote:
> >
> >(got a better name for the last one? "all"?)
>
> "all" makes more sense than "grey".
>
I think it depends on what the spline does exactly: is it the same as:
rgb SPLINE, SPLINE, SPLINE
Or does it only change the brightness? A good thing to add too:
spline-based manipulations on hue and saturation...
Jérôme
--
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] iname com
* Settle for a good fantasy. * http://www.enst.fr/~jberger
*********************************
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A059156.6903634A@enst.fr>, Jérôme M. Berger
<Jer### [at] enst fr> wrote:
> > "all" makes more sense than "grey".
> I think it depends on what the spline does exactly: is it the same as:
> rgb SPLINE, SPLINE, SPLINE
> Or does it only change the brightness?
It uses the same spline to adjust each channel. The current value of the
channel is taken as the "t" value of the spline, and the result of the
spline is used as the new value for the channel.
> A good thing to add too: spline-based manipulations on hue and
> saturation...
Not as a special feature of the spline patch...just use a rgb_to_hsl
filter, then use the ordinary curves filter to adjust hue or saturation,
then use hsl_to_rgb to get the corrected image back. More flexible, less
complicated, and you can combine it with other things to get special
effects. And I *am* planning to write these conversion filters...as soon
as I figure out the math. I've found lots of information about
converting between color spaces, but little or nothing about the actual
equations used to convert between rgb and hsl. That, or I'm just not
recognizing it when I see it...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <chrishuff-2DD880.12353405112000@news.povray.org>, Chris
Huff <chr### [at] mac com> wrote:
> ...as soon as I figure out the math. I've found lots of information
> about converting between color spaces, but little or nothing about
> the actual equations used to convert between rgb and hsl. That, or
> I'm just not recognizing it when I see it...
Never mind, I just came across a couple files Nathan sent me which
should do everything that I need. I had set them aside and completely
forgotten about them...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3a04ed21@news.povray.org>, "Mark Wagner"
><mar### [at] gte net> wrote:
>> The limit is 256 points -- enough for most uses, but why have a limit
>> when there doesn't need to be one?
>
>It looks to me like that was just a stopgap measure...it looks like you
>could implement it mostly by adding code to the Insert_Spline_Entry()
>function.
>I don't have any experience with growing dynamically allocated
>arrays...I tend to use linked lists for everything.
I've already got the code for this written -- it's just a matter of copying
it from my personal version to SkyPOV.
>> >Also, it would be useful if you could access the control points, with
>> >functions that behave similar to the array functions and an array-like
>> >syntax.
>> This might be very difficult to implement -- there are enough
>> problems with the spline syntax as it is.
>
>I think could get it working with functions, but I have no idea how to
>do the array like syntax...
>INT spline_points(SPLINE_IDENT) Retrieves the number of points in the
>spline.
>EXPRESS get_spline_point(INT_INDEX) Returns the corresponding point on
>the spline.
I think that, usage-wise, it would be better to use the array syntax. This
would allow points to be changed and read using a single syntax.
>BTW, I implemented the SPLINE_IDENT(T, TYPE) syntax. You can now do
>something like this:
>#declare Spl = spline {linear_spline ...}
>
>#declare Val1 = Spl(T);
>#declare Val2 = Spl(T, cubic_spline);
>#declare Val3 = Spl(T, quadratic_spline);
>
>I will send you the code soon.
Thanks!
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: color definition (Re: Announce: SkyPOV 0.1)
Date: 6 Nov 2000 04:15:53
Message: <3a0676c9@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
> Anyway, this is the syntax I am planning to use(I am currently working
> on the first form):
don't you like pov schema for color definition ?
> curves {rgb RED_SPLINE, GREEN_SPLINE, BLUE_SPLINE}
curves {red RED_SPLINE green GREEN_SPLINE blue BLUE_SPLINE}
> curves {red RED_SPLINE}
> curves {green GREEN_SPLINE}
> curves {blue BLUE_SPLINE}
ok.
> curves {gray GRAY_SPLINE}
> (got a better name for the last one? "all"?)
curves {rgb GRAY_SPLINE}
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a0676c9@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> Chris Huff wrote in message ...
> > Anyway, this is the syntax I am planning to use(I am currently working
> > on the first form):
>
> don't you like pov schema for color definition ?
Uh, POV doesn't let you specify colors with splines. And you don't
specify colors in the curves patch, it simply reuses the keywords as
names for color channels.
Some of those would be pretty easy to do, but they would just be
confusing...since you are not specifying a color. Would you like it
better if it required the "type" keyword before the type?
And anyway, the syntax I use is better suited for expansion to other
color spaces. I plan to allow other color spaces to be manipulated by
adding a filter to convert to those spaces, but a future version of the
curves patch may allow a shortcut for modifying those spaces. Your
syntax will cause confusion("I can modify red and green at the same
time, but not blue and saturation?").
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 6 Nov 2000 08:21:02
Message: <3a06b03e@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>Uh, POV doesn't let you specify colors with splines.
yes, I know
but this could be useful - color curves like color_map
#declare Curve=curve{red Spline1 green Spline2 filter Spline3}
#declare Pigment=pigment{pattern color_map{curve Curve}}
therefore I thought about similiar syntax
this also allow extension to other color spaces I think
>And anyway, the syntax I use is better suited for expansion to other
>color spaces.
but you put sign "=" between meaning of "all" and "gray"
is it true in other color spaces ?
>Your
>syntax will cause confusion("I can modify red and green at the same
>time, but not blue and saturation?").
it depends of implementation in your planned patch :-)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a06459f$1@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> >I don't have any experience with growing dynamically allocated
> >arrays...I tend to use linked lists for everything.
> I've already got the code for this written -- it's just a matter of
> copying it from my personal version to SkyPOV.
:-)
> I think that, usage-wise, it would be better to use the array syntax.
> This would allow points to be changed and read using a single
> syntax.
Arrays don't have any special syntax for insertion...and I don't think
reading the points with [] brackets will be very easy. As for changing
existing points...what would this do?
#declare Spl[2] = 0.4;
Would this set the t value of the third point to 0.4, or would it set
the x value? Also, this syntax would be a problem for using arrays of
splines.
I would suggest using functions for most of these:
Getting number of control points:
INT spline_points(SPLINE_IDENT)
Reading a point:
FLOAT get_spline_t(SPLINE_IDENT, INDEX)
Returns the "distance" of the point at INDEX.
EXPRESS get_spline_value(SPLINE_IDENT, INDEX)
Returns the value of the spline at INDEX. I'm not sure how to handle
floats, vectors, and colors...maybe this function will work for all of
them.
Modifying a point:
set_spline_t(SPLINE_IDENT, INT_INDEX, FLOAT_NEW_T)
Changes the "distance" of the point at INDEX.
set_spline_value(SPLINE_IDENT, INT_INDEX, EXPRESS_VALUE)
Changes the value of the spline at INDEX. You can specify a float,
vector, color...
Adding a point should be possible already, it should work fine with the
modifications I made(mainly the fix to Copy_Spline()). Just do something
like this:
#declare Spline = spline {Spline NEW_POINTS}
And one other thing that should probably be taken care of: multiple
points with the same t value should probably not be allowed. New points
with the same t value of an existing point should replace that point. I
don't remember seeing anything about this in the source code...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a06b03e@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> but this could be useful - color curves like color_map
>
> #declare Curve=curve{red Spline1 green Spline2 filter Spline3}
> #declare Pigment=pigment{pattern color_map{curve Curve}}
I have been thinking the possibility of something like this...I think it
might be useful. But I don't think it applies to the curves patch...
> this also allow extension to other color spaces I think
No, it won't. See explanation below.
> but you put sign "=" between meaning of "all" and "gray"
> is it true in other color spaces ?
The "=" operator isn't used in this patch...I don't know what you mean.
> >Your
> >syntax will cause confusion("I can modify red and green at the same
> >time, but not blue and saturation?").
> it depends of implementation in your planned patch :-)
No, it doesn't. For example, you can't manipulate red and hue
simultaneously, you can only manipulate one color space at a time. This
is because saturation and hue affect red, green, and blue, and the same
goes for the reverse. My syntax will allow the addition of hsl, hue and
saturation modes, yours won't, at least not in a way that makes sense.
However, those shouldn't be necessary anyway, since you can just use
other conversion filters before and after the curves filter to get the
same result. So we are back to whether or not to use the color syntax
for splines.
What exactly is deficient in the syntax I chose? Why do you think
specifying splines representing color channel curves with a color-like
syntax is a better idea than specifying a channel and a spline to go
with it?
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3a06459f$1@news.povray.org>, "Mark Wagner"
><mar### [at] gte net> wrote:
>
>> >I don't have any experience with growing dynamically allocated
>> >arrays...I tend to use linked lists for everything.
>> I've already got the code for this written -- it's just a matter of
>> copying it from my personal version to SkyPOV.
>
Update: I implemented it today. For unknown reasons, POV_REALLOC doesn't
work properly for this. I'm using Borland C++ Builder 4.0, if that makes
any difference.
>
>> I think that, usage-wise, it would be better to use the array syntax.
>> This would allow points to be changed and read using a single
>> syntax.
>
>Arrays don't have any special syntax for insertion...and I don't think
>reading the points with [] brackets will be very easy. As for changing
>existing points...what would this do?
>#declare Spl[2] = 0.4;
The obvious fix would be to do something like
#declare Spl[2].x = 0.4; // Sets the x value at the fourth item
#declare Spl[2].y = 0.4; // Sets the y value at the fourth item
#declare Spl[2].z = 0.4; // Sets the z value at the fourth item
#declare Spl[2].red = 0.4; // Sets the red value at the fourth item (same as
.x)
#declare Spl[2].green = 0.4; // Sets the green value at the fourth item
(same as .y)
#declare Spl[2].blue = 0.4; // Sets the blue value at the fourth item (same
as .z)
#declare Spl[2].filter = 0.4; // Sets the filter value at the fourth item
#declare Spl[2].transmit = 0.4; // Sets the transmit value at the fourth
item
#declare Spl[2].t = 0.4; // Sets the t value
Arrays of splines would be treated as multi-dimensional arrays, with the
last dimension being the spline index.
>Adding a point should be possible already, it should work fine with the
>modifications I made(mainly the fix to Copy_Spline()). Just do something
>like this:
>#declare Spline = spline {Spline NEW_POINTS}
It does.
>And one other thing that should probably be taken care of: multiple
>points with the same t value should probably not be allowed. New points
>with the same t value of an existing point should replace that point. I
>don't remember seeing anything about this in the source code...
The source code doesn't do anything about this right now. I'll add that to
my list of things to do.
On the lines of splines and the problems with them:
1) Parse_Spline() will accept "quadratic_spline", but quadratic splines does
not exist. They are treated as cubic splines.
2) Cubic interpolation is not done properly. It appears that the "cubic
interpolation" is actually done by averaging two quadratic interpolations of
the spline data. Fixing this will result in minor changes to all scenes
that use cubic splines.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 7 Nov 2000 04:48:23
Message: <3a07cfe7@news.povray.org>
|
|
 |
|  |
|  |
|
 |
my english may be poor sometimes :-(
Chris Huff wrote in message ...
>> but you put sign "=" between meaning of "all" and "gray"
>> is it true in other color spaces ?
>
>The "=" operator isn't used in this patch...I don't know what you mean.
I mean that in your first post you don't know what is better
name - "all" or "gray" - but you don't precise what "all" should
represent - if the same as gray than what should be used for
all curves in other color spaces ?
>> >Your
>> >syntax will cause confusion("I can modify red and green at the same
>> >time, but not blue and saturation?").
>> it depends of implementation in your planned patch :-)
>
> No, it doesn't. For example, you can't manipulate red and hue
> simultaneously, you can only manipulate one color space at a time.
This
> is because saturation and hue affect red, green, and blue, and the
same
> goes for the reverse.
yes I know this
> My syntax will allow the addition of hsl, hue and
> saturation modes, yours won't, at least not in a way that makes sense.
> However, those shouldn't be necessary anyway, since you can just use
> other conversion filters before and after the curves filter to get the
> same result. So we are back to whether or not to use the color syntax
> for splines.
> What exactly is deficient in the syntax I chose? Why do you think
> specifying splines representing color channel curves with a color-like
> syntax is a better idea than specifying a channel and a spline to go
> with it?
I don't think that your syntax is wrong
but I think that there should be first discussion
about implement other color spaces in all ways where old colors
can be use, than how to extend it to use curves and than
use this curves syntax in post-processes
your way is to implement it to one usage but
perhaps it is hardly to extend in the future for rest of pov syntax
perhaps:
COLOR_DEFINITION:
color SPACE_NAME value_for_all | SPACE_COORDINATES
SPACE_NAME:
rgb | hsl | hue | etc ...
SPACE_COORDINATES:
vector | COORDINATES_SPECIFICATION
COORDINATES_SPECIFICATION:
COORDINATE_IN_SPACE value_of_coordinate
[COORDINATE_IN_SPACE value_of_coordinate ...]
COORDINATE_IN_SPACE:
red | green | blue | cyan | magenta | filter | transmit | saturation
...
as you see this is nearly the same like old definition
and not to much to change in old scripts
COLOR_MAP:
color_map {
curve { SPACE_NAME curve_identifier } /* for all coordinates in
space */
curve { SPACE_NAME
COORDINATE_IN_SPACE curve_identifier
[COORDINATE_IN_SPACE value_of coordinate ...]
} /* for specification */
}
i'm not specialist, forgive me than if i'm wrong with something
and what's more important - since year I slowly but carefully
read archiv of news.povray.org, but still I have
46205 messages to read - perhaps there is discussion of our problem
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <8FE01D1B3markwagner17gtenet@204.213.191.228>,
mar### [at] gte net wrote:
> Announcing.....SkyPOV 0.1!
> SkyPOV is an unofficial version of POV-Ray designed to do atmospheric
> effects. It is based on MegaPOV 0.6a. Due to computer problems beyond
> my control, it is currently available only as source code. If I can
> find time, I will upload a Windows binary tomorrow. If I can't, it
> will be available next Tuesday.
> To compile, download the SkyPOV and MegaPOV 0.6a source code, copy the
> SkyPOV source over the MegaPOV source, and compile.
Out of curiousity, have you looked at possibly just integrating your
changes into MegaPOV for a 0.7 release? I'm only asking, becouse with
all of the 'sub releases' of different things, it could get confusing
over time.. This really also applies for 'MegaPOVPlus' as well.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a07969c@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> Update: I implemented it today. For unknown reasons, POV_REALLOC doesn't
> work properly for this. I'm using Borland C++ Builder 4.0, if that makes
> any difference.
I've never used POV_REALLOC()(or realloc())...maybe it is a bug in the
pov_realloc() function. Did you get it working with realloc(), or did
you try some other way?
> #declare Spl[2].t = 0.4; // Sets the t value
I think f and t are already reserved for filter and transmit...you would
have to use something else.
> Arrays of splines would be treated as multi-dimensional arrays, with the
> last dimension being the spline index.
This probably would work...it certainly looks simpler and cleaner than
my syntax, though a bit less clear in some rare circumstances.
How about a similar syntax for getting textures, pigments, colors, etc.
from blend maps?
> 2) Cubic interpolation is not done properly. It appears that the
> "cubic interpolation" is actually done by averaging two quadratic
> interpolations of the spline data. Fixing this will result in minor
> changes to all scenes that use cubic splines.
These definitely need fixing...
Hmm, another thing that would be nice is a larger assortment of spline
types. Catmull-rom, b-splines, etc...
Keep up the good work.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a085f02$1@news.povray.org>, "Thomas Charron"
<tch### [at] ductape net> wrote:
> Out of curiousity, have you looked at possibly just integrating your
> changes into MegaPOV for a 0.7 release? I'm only asking, becouse with
> all of the 'sub releases' of different things, it could get confusing
> over time.. This really also applies for 'MegaPOVPlus' as well.
SkyPOV and MegaPOVPlus are based on MegaPOV, so their features are
already integrated into MegaPOV. And whether or not features in them get
into the next release of MegaPOV depends mostly on Nathan(who is also
busy working on POV 3.5) and the Smellenberghs...I just use MegaPOVPlus
as a way to develop my patches to a point where they are complete enough
to be added to MegaPOV and to play around with patches by other people
before they have a chance to get into MegaPOV.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a07cfe7@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> my english may be poor sometimes :-(
>
> Chris Huff wrote in message ...
> >> but you put sign "=" between meaning of "all" and "gray"
> >> is it true in other color spaces ?
> >
> >The "=" operator isn't used in this patch...I don't know what you mean.
>
> I mean that in your first post you don't know what is better
> name - "all" or "gray" - but you don't precise what "all" should
> represent - if the same as gray than what should be used for
> all curves in other color spaces ?
Oh, I see what you mean, "all" will mean something different in other
color spaces...I will probably change it to use "rgb" instead of "all".
> > > >Your syntax will cause confusion("I can modify red and green at
> > > >the same time, but not blue and saturation?").
> > > it depends of implementation in your planned patch :-)
> > No, it doesn't. For example, you can't manipulate red and hue
> > simultaneously... yes I know this
But your syntax would allow something like:
red SPLINE hue SPLINE
which doesn't make sense.
(interesting stuff about color syntax)
I have been thinking about new ways of specifying colors(which I still
think is a separate issue from the curves filter), but I would use a
slightly different syntax:
color (tells POV a color is coming)
rgb|hsl|cmy| (color space name)
< c1, c2, c3> (A 3 component vector specifying the color values)
Keywords red, green, and blue wouldn't be used any more, at least not
for specifying colors. You wouldn't need hue, saturation, magenta,
yellow, etc. either. This would be less backwards compatible, but
simpler and better for future syntax. It would be easier for new users
to learn, and doesn't have the problem of someone specifying something
like "red Something hue SomethingElse".
Filter and transmit wouldn't be specified as part of the color, they
would be part of a separate "transparency" block in the pigment. Layered
textures would also have a way to specify different transparency effects
that would only affect the texture layering.
Splines would be able to directly replace color maps:
pigment {
PATTERN
color_spline rgb|hsl|cmy spline {...}
color_spline rgb|hsl|cmy spline {...}, spline {...}, spline {...}
}
This is something that should be easy to add while keeping the current
syntax.
Or maybe just use one spline that interpolates between colors...that
would be very easy to do, since splines can already interpolate between
5-dimensional vectors. However, it would make modifying one color a bit
more difficult.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3a07969c@news.povray.org>, "Mark Wagner"
><mar### [at] gte net> wrote:
>I've never used POV_REALLOC()(or realloc())...maybe it is a bug in the
>pov_realloc() function. Did you get it working with realloc(), or did
>you try some other way?
POV_REALLOC() is just a wrapper for pov_realloc(), which itself calls
realloc(). My solution is to call POV_MALLOC() to create a larger array,
followed by memcpy() to copy the old array to the new, and POV_FREE() to get
rid of the old array.
>> #declare Spl[2].t = 0.4; // Sets the t value
>
>I think f and t are already reserved for filter and transmit...you would
>have to use something else.
As of POV 3.1g, t is only used for referring to the fourth component of a
four-dimensional vector. Thus, it is available for using here, since all
splines are technically 5-dimensional vectors.
>> Arrays of splines would be treated as multi-dimensional arrays, with the
>> last dimension being the spline index.
>
>This probably would work...it certainly looks simpler and cleaner than
>my syntax, though a bit less clear in some rare circumstances.
>How about a similar syntax for getting textures, pigments, colors, etc.
>from blend maps?
Possible. I don't know how difficult it will be to implement.
>These definitely need fixing...
>Hmm, another thing that would be nice is a larger assortment of spline
>types. Catmull-rom, b-splines, etc...
I'll do so if someone can point out some references for these, preferably
with C code examples. I'm having enough trouble trying to decipher the
cryptic pseudo-code from my Numerical Analysis textbook to want to deal with
Fortran.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>I just use MegaPOVPlus
>as a way to develop my patches to a point where they are complete enough
>to be added to MegaPOV and to play around with patches by other people
>before they have a chance to get into MegaPOV.
This is the same thing I'm doing with SkyPOV.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mark Wagner wrote:
>
> Chris Huff wrote in message ...
>
> >These definitely need fixing...
> >Hmm, another thing that would be nice is a larger assortment of spline
> >types. Catmull-rom, b-splines, etc...
>
> I'll do so if someone can point out some references for these, preferably
> with C code examples. I'm having enough trouble trying to decipher the
> cryptic pseudo-code from my Numerical Analysis textbook to want to deal with
> Fortran.
>
( NB! Shameless self-promotion follows ;o)
If You can read _my_ C code, then download source code for POVMan and
look file shdrexec.c, it contains implementation for Catmull-Rom,
Hermite, Bezier and B-splines.
(Or alternatively mail me and I'll send You only this file...)
HTH
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Jérôme M Berger
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 8 Nov 2000 06:02:24
Message: <3A0932BE.240AA5C@enst.fr>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> But your syntax would allow something like:
> red SPLINE hue SPLINE
> which doesn't make sense.
>
> (interesting stuff about color syntax)
>
> I have been thinking about new ways of specifying colors(which I still
> think is a separate issue from the curves filter), but I would use a
> slightly different syntax:
> color (tells POV a color is coming)
> rgb|hsl|cmy| (color space name)
> < c1, c2, c3> (A 3 component vector specifying the color values)
>
> Keywords red, green, and blue wouldn't be used any more, at least not
> for specifying colors. You wouldn't need hue, saturation, magenta,
> yellow, etc. either.
Why not? Actually, red SOMETHING hue SOMETHING does make sense: first
work in rgb color-space and change red without touching green and blue,
then work in hsl and change hue without touching saturation or
brightness...
This would make for an easy way to get the grayscale equivalent of a
color for example (color rgb <whatever> saturation 0) or other effects
of the kind...
> Filter and transmit wouldn't be specified as part of the color, they
> would be part of a separate "transparency" block in the pigment. Layered
> textures would also have a way to specify different transparency effects
> that would only affect the texture layering.
>
I prefer to have the color and transparency defined together (the way
they are now) since they usually follow the same pattern. Needing to
specify the pattern twice would be redundant, more difficult and
error-prone...
Just my 2 copecks,
Jérôme
--
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] iname com
* Settle for a good fantasy. * http://www.enst.fr/~jberger
*********************************
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a08ea5b$1@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> POV_REALLOC() is just a wrapper for pov_realloc(), which itself calls
> realloc().
But it isn't a direct call to realloc(). There is still room for a bug
in there...it seems strange that you couldn't get it to work.
> My solution is to call POV_MALLOC() to create a larger array,
> followed by memcpy() to copy the old array to the new, and POV_FREE()
> to get rid of the old array.
I thought realloc() was supposed to make it so you didn't have to do
this. :-(
I was wondering if calling realloc() directly might bypass something
POV's functions are breaking.
> >Hmm, another thing that would be nice is a larger assortment of spline
> >types. Catmull-rom, b-splines, etc...
> I'll do so if someone can point out some references for these,
> preferably with C code examples. I'm having enough trouble trying to
> decipher the cryptic pseudo-code from my Numerical Analysis textbook
> to want to deal with Fortran.
Hmm, my copy of "3D Graphics Programming" has some explanations of
cubic, Hermite, and Bezier splines...not that I can make much sense of
it. Not much in the way of examples either...mostly just the math.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A0### [at] enst fr>, Jérôme M. Berger
<Jer### [at] enst fr> wrote:
> Why not? Actually, red SOMETHING hue SOMETHING does make sense: first
> work in rgb color-space and change red without touching green and blue,
> then work in hsl and change hue without touching saturation or
> brightness...
But what would the resulting vector be? Would it be a rgb vector, or a
hsl, etc...
#declare Color = color red 0.6 hue 0.75;
Is Color.x red or hue? Is Color.y green or saturation?
"color rgb" should only accept red, green, and blue...
> This would make for an easy way to get the grayscale equivalent of a
> color for example (color rgb <whatever> saturation 0) or other effects
> of the kind...
I think this would be better done with color conversion functions, not
the color specification. The idea is that you pick a color space and
then set each component, when you try to set a component that isn't part
of the color space things get messy. To get the grayscale of a color, it
would be something like:
#declare Color = color rgb rgb_to_hsl(<whatever>).z;
> I prefer to have the color and transparency defined together (the way
> they are now) since they usually follow the same pattern. Needing to
> specify the pattern twice would be redundant, more difficult and
> error-prone...
It could be done so you don't have to specify the pattern twice, and it
would give much more flexibility. And I never have understood why
transparency was considered part of the color...the only explanation I
can think of is that it developed from the use of alpha channels in
images. It seems more of an interior feature to me, or a separate
texture attribute.
And they usually follow the same pattern because it would be very
difficult (impossible?) to get them to do otherwise with the current
syntax. If it was easily possible to do it differently that might not be
the case.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A01D3E8.8C98EF92@unforgettable.com>,
inq### [at] unforgettable com wrote:
> So to those of you out there concerned with such things.. how long until
> someone churns out a Mac binary? What are the odds that any of this will
> be added to the next version of the Ultra-Giganto Patch?
I plan on including these features in MegaPOVPlus, but probably not
until the next version of SkyPOV is released.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>I plan on including these features in MegaPOVPlus, but probably not
>until the next version of SkyPOV is released.
The next version of SkyPOV will be released when I've managed to get the
splines working properly.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>> My solution is to call POV_MALLOC() to create a larger array,
>> followed by memcpy() to copy the old array to the new, and POV_FREE()
>> to get rid of the old array.
>
>I thought realloc() was supposed to make it so you didn't have to do
>this. :-(
>I was wondering if calling realloc() directly might bypass something
>POV's functions are breaking.
There's a very good reason for using POV_REALLOC etc.: garbage tracking and
collection. By using the POV_*ALLOC functions, it is much easier to track
down memory leaks.
>
>> >Hmm, another thing that would be nice is a larger assortment of spline
>> >types. Catmull-rom, b-splines, etc...
>> I'll do so if someone can point out some references for these,
>> preferably with C code examples. I'm having enough trouble trying to
>> decipher the cryptic pseudo-code from my Numerical Analysis textbook
>> to want to deal with Fortran.
>
>Hmm, my copy of "3D Graphics Programming" has some explanations of
>cubic, Hermite, and Bezier splines...not that I can make much sense of
>it. Not much in the way of examples either...mostly just the math.
I'll see what Vahur Krouverk's code is like for this.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> But what would the resulting vector be? Would it be a rgb vector, or a
> hsl, etc...
> #declare Color = color red 0.6 hue 0.75;
> Is Color.x red or hue? Is Color.y green or saturation?
Whatever you do, you'll need a unique internal representation (which
should probably be rgb to avoid breaking something elsewhere in the
code). If Color.(x/y/z) is to make any sense, it would be with relation
to this internal representation. I personnally would favor using
Color.red or Color.hue...
> I think this would be better done with color conversion functions, not
> the color specification. The idea is that you pick a color space and
> then set each component, when you try to set a component that isn't part
> of the color space things get messy. To get the grayscale of a color, it
> would be something like:
> #declare Color = color rgb rgb_to_hsl(<whatever>).z;
>
This makes for more things to type and isn't any clearer or easy to
understand. Moreover, if you need to remember in wich space you defined
each color, you're in for a lot of bugs in your scenes ("Why the h*** is
that sphere white instead of blue???")
> It could be done so you don't have to specify the pattern twice, and it
> would give much more flexibility. And I never have understood why
> transparency was considered part of the color...the only explanation I
> can think of is that it developed from the use of alpha channels in
> images. It seems more of an interior feature to me, or a separate
> texture attribute.
> And they usually follow the same pattern because it would be very
> difficult (impossible?) to get them to do otherwise with the current
> syntax. If it was easily possible to do it differently that might not be
> the case.
>
Maybe, but OTOH you don't need to specify a color where the object is
fully transparent, so their patterns are related. I've never felt the
need to specify transparency independently from color...
Jérôme
--
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] iname com
* Settle for a good fantasy. * http://www.enst.fr/~jberger
*********************************
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a0a439b@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> There's a very good reason for using POV_REALLOC etc.: garbage
> tracking and collection. By using the POV_*ALLOC functions, it is
> much easier to track down memory leaks.
But that won't help you figure out if there is a bug in POV_REALLOC().
:-)
I can understand working around it using the POV_*() functions, but I
was talking about figuring out where the problem was. Oh, well...there
are a couple places in my work with glows that could use POV_REALLOC(),
I will try to figure it out myself...
> >Hmm, my copy of "3D Graphics Programming" has some explanations of
> >cubic, Hermite, and Bezier splines...not that I can make much sense of
> >it. Not much in the way of examples either...mostly just the math.
> I'll see what Vahur Krouverk's code is like for this.
And I'll poke around in the "other" spline patch...I think it had
something like a "rational bezier spline".
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a0a3db8$1@news.povray.org>, "Mark Wagner"
<mar### [at] gte net> wrote:
> The next version of SkyPOV will be released when I've managed to get the
> splines working properly.
No hurry. :-)
I have plenty of other coding stuff to do(I think I finally got glows to
attach to objects properly!), and plenty of other stuff that I *should*
do...MP+ 0.6a mod 0.1 will have some other new stuff.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A0A735E.A48E843C@tapasmail.net>, Jérôme M. Berger
<jbe### [at] tapasmail net> wrote:
> Maybe, but OTOH you don't need to specify a color where the object is
> fully transparent, so their patterns are related. I've never felt the
> need to specify transparency independently from color...
Simplest case: a multicolored transparent ball which is evenly
transparent and has a big color_map. You decide you want to change the
amount of transparency...you have to change every color in the
color_map. If you had it specified in a separate block, you would only
have to change one value. It would also make specifying transparence for
image_maps a lot easier.
It becomes an even better idea when you add blurred transparency, etc.
Other programs do it because they often use image maps that use the
alpha channel to define transparency...but does *tranparency* really
belong in a *color*? Especially in POV, where image maps are relatively
rarely used.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mark, did you ever post a Windows binary? Sorry, but my newsgroup time is
limited and this thread is full of messages...
Grim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 08 Nov 2000 16:48:36 -0500, Chris Huff <chr### [at] mac com>
wrote:
>But what would the resulting vector be? Would it be a rgb vector, or a
>hsl, etc...
>#declare Color = color red 0.6 hue 0.75;
>Is Color.x red or hue? Is Color.y green or saturation?
>"color rgb" should only accept red, green, and blue...
Color.x is just a hack used by those who have been RTTL :) If you have
Color.r and Color.hue, why use Color.x and make your life harder? Of
course, for backwards compatibility it should be kept equivalent to
Color.r
Another approach is to use rgb space and automatically convert hsb to
it. So color hsb <2/3,1,1> would make a color rgb <0,0,1>. One may
still access the hsb values of this color, though.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usa net
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
GrimDude wrote in message <3a0b768a@news.povray.org>...
>Mark, did you ever post a Windows binary? Sorry, but my newsgroup time is
>limited and this thread is full of messages...
Yes. Use the links from http://www.geocities.com/rengaw03/povray.html
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thank you, sir!
Grim
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Geoff Wedig
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 10 Nov 2000 08:18:09
Message: <3a0bf591@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] mac com> wrote:
> In article <3A0A735E.A48E843C@tapasmail.net>, J?r?me M. Berger
> <jbe### [at] tapasmail net> wrote:
>> Maybe, but OTOH you don't need to specify a color where the object is
>> fully transparent, so their patterns are related. I've never felt the
>> need to specify transparency independently from color...
> Simplest case: a multicolored transparent ball which is evenly
> transparent and has a big color_map. You decide you want to change the
> amount of transparency...you have to change every color in the
> color_map. If you had it specified in a separate block, you would only
> have to change one value. It would also make specifying transparence for
> image_maps a lot easier.
Well, this, at least, is easy. If you want a constant transparency that you
want to be able to change, just declare it as a variable (say, Trans) and
use that in your color map. All you have to do is change one place. I
often do this with variables that are used many places (the size of certain
objects in relation to one another, for instance), and are likely to be
changed while tuning the scene.
The transparency for image maps, I agree, though.
Geoff
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <in0n0ts7vbq5e22kq7rjlb04ib7t4od0pu@4ax.com>, Peter Popov
<pet### [at] usa net> wrote:
> Color.x is just a hack used by those who have been RTTL :) If you have
> Color.r and Color.hue, why use Color.x and make your life harder? Of
> course, for backwards compatibility it should be kept equivalent to
> Color.r
RTTL? Ray Tracing Too Long?
My syntax suggestion was to store all colors as 3D vectors and get rid
of the r, g, b, red, green, blue, etc... keywords.
> Another approach is to use rgb space and automatically convert hsb to
> it. So color hsb <2/3,1,1> would make a color rgb <0,0,1>. One may
> still access the hsb values of this color, though.
I still don't like the "automatically convert to rgb" part. If I set the
first component of a vector to 1, the first component should be 1 when I
come back to it later. If I set a color to hsb <2/3,1,1> and try to put
a sphere at the point in space equivalent to that point in hsb space
(say I am making a graphical representation of the relationships between
colors), I shouldn't get xyz < 0, 0, 1>!
On the other hand, automatic converting would probably make mixing
colors from different systems easier...
How about this: when you specify a color in a pigment or something, it
is converted to rgb for internal use, but color variables store the
color space as well as the components. You could get the rgb version of
a declared color with "rgb(COLOR)", the hsl version with "hsl(COLOR)",
etc. These conversion functions use the extra "color space" variable.
You get a parse error if you try to use ".hue" on a rgb color, ".green"
on a hsl color, etc.
Adding two colors or a color and a vector adds the values of their
components, ignoring the system they are from. To add two colors of
different systems, you would usually want something like: "rgb(COL_A) +
rgb(COL_B)" to be safe.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a0bf591@news.povray.org>, Geoff Wedig
<wed### [at] darwin epbi cwru edu> wrote:
> Well, this, at least, is easy. If you want a constant transparency
> that you want to be able to change, just declare it as a variable
> (say, Trans) and use that in your color map.
That is what you have to do now...
And what about blur and other transparency effects? Things like
fade_color, dispersion, ior, etc. would also fit better in a block
dedicated to simulating transparency. Transparency just isn't a color
attribute, and has no business being there.
> The transparency for image maps, I agree, though.
And why not for all textures?
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 10 Nov 2000 17:25:04 -0500, Chris Huff <chr### [at] mac com>
wrote:
>How about this: when you specify a color in a pigment or something, it
>is converted to rgb for internal use, but color variables store the
>color space as well as the components.
This seems overkill.
<snip>
I think it should be enough if colors are kept the way they are and
there are introduced parser functions to convert a 3D vector to and
from hsb and rgb. This will keep backwards compatibility and will
offer the user more power. I am not sure how useful this will be,
though, as everything here mentioned can be done with simple macros.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usa net
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Vahur Krouverk
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 13 Nov 2000 05:09:02
Message: <3A0FBE25.A71EEB8A@aetec.ee>
|
|
 |
|  |
|  |
|
 |
Peter Popov wrote:
>
> On Fri, 10 Nov 2000 17:25:04 -0500, Chris Huff <chr### [at] mac com>
> wrote:
>
> >How about this: when you specify a color in a pigment or something, it
> >is converted to rgb for internal use, but color variables store the
> >color space as well as the components.
>
> This seems overkill.
>
> <snip>
>
> I think it should be enough if colors are kept the way they are and
> there are introduced parser functions to convert a 3D vector to and
> from hsb and rgb. This will keep backwards compatibility and will
> offer the user more power. I am not sure how useful this will be,
> though, as everything here mentioned can be done with simple macros.
>
Seems reasonable. RenderMan Shading Language supports various color
spaces and conversion functions between them, but it is totally up to
coder to ensure, that correct color space is used. If this solution is
usable in "real CGI" world, then it could be used in "amateur league" as
well?
As Einstein said:
Keep it as simple as possible, but no simpler.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <kn8v0tkg6h7ddc5j1q81ehvclvanuq06v1@4ax.com>, Peter Popov
<pet### [at] usa net> wrote:
> I think it should be enough if colors are kept the way they are and
> there are introduced parser functions to convert a 3D vector to and
> from hsb and rgb. This will keep backwards compatibility and will
> offer the user more power. I am not sure how useful this will be,
> though, as everything here mentioned can be done with simple macros.
It would be very simple to do once you have the code for converting
between the color systems. I can think of two possible ways of doing the
syntax:
1: Separate rgb_to_hls(), rgb_to_cmy(), rgb_to_hsv() functions.
2: Three functions: rgb_to(COLOR_SYS, COLOR), to_rgb(COLOR_SYS, COLOR),
convert_color(COLOR_SYS_SRC, COLOR_SYS_DEST, COLOR). This has the
advantage of being simpler when there are a lot of color systems.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> It would be very simple to do once you have the code for converting
> between the color systems. I can think of two possible ways of doing the
> syntax:
> 1: Separate rgb_to_hls(), rgb_to_cmy(), rgb_to_hsv() functions.
> 2: Three functions: rgb_to(COLOR_SYS, COLOR), to_rgb(COLOR_SYS, COLOR),
> convert_color(COLOR_SYS_SRC, COLOR_SYS_DEST, COLOR). This has the
> advantage of being simpler when there are a lot of color systems.
Actually, this kind of function could be usefull for users, but if in
addition you want to improve the final quality of rendering, Spectral
Color Space has to be implemented into PoV. There's a BIG difference of
quality between an image rendered using spectral space and the same one
rendered in RGB...
S.M.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A10777B.294FE50F@videotron.ca>, Stephane Marty
<alb### [at] videotron ca> wrote:
> Actually, this kind of function could be usefull for users, but if in
> addition you want to improve the final quality of rendering, Spectral
> Color Space has to be implemented into PoV.
I suspect that in addition to having to rewrite the renderer, you would
also have to redesign a lot of stuff...you wouldn't be able to use many
of the old algorithms. Not a small job...even bigger than the planned
C++ rewrite for POV 4.0. However, it would make some things easier and
far more accurate...(dispersion, iridescence...)
Maybe 4.0 will be done so some areas could do calculations in spectral
space and others in RGB, so it would be possible to switch to spectral
space a bit at a time, and having a working renderer in the meantime.
> There's a BIG difference of quality between an image rendered using
> spectral space and the same one rendered in RGB...
Do you have any examples? Any links to information on using spectral
color spaces?
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > Actually, this kind of function could be usefull for users, but if in
> > addition you want to improve the final quality of rendering, Spectral
> > Color Space has to be implemented into PoV.
>
> I suspect that in addition to having to rewrite the renderer, you would
> also have to redesign a lot of stuff...you wouldn't be able to use many
> of the old algorithms. Not a small job...even bigger than the planned
> C++ rewrite for POV 4.0. However, it would make some things easier and
> far more accurate...(dispersion, iridescence...)
> Maybe 4.0 will be done so some areas could do calculations in spectral
> space and others in RGB, so it would be possible to switch to spectral
> space a bit at a time, and having a working renderer in the meantime.
Yes, I know... :)
I wrote a small (commercial) monte carlo ray-tracing program 3 years ago
able to work *exclusively* in spectral space. It was a bit limited in
texture models, but gave quite good lighting and rendering results.
However, the first version worked in RGB space and my client asked me to
improve it because he suddenly needed to use only spectral colors in his
applications. So, I had to rewrite several functions, actually, every
color and shading manipulation routines...
But you're right, to implement spectral color space rendering in
(mega)PoV from now, every color, light, shading and texture manipulation
functions have to be completly redesigned ; and at this level of
evolution, it won't be an easy task, or at least, it'll take a certain
time...
> > There's a BIG difference of quality between an image rendered using
> > spectral space and the same one rendered in RGB...
>
> Do you have any examples? Any links to information on using spectral
> color spaces?
I have to find again my links and notes. They should be somewhere in my
archives. I will send an email in this news group when I can put my
hands on it...
S.M.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Mark Wagner
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 14 Nov 2000 01:28:56
Message: <3a10dba8@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Stephane Marty wrote in message <3A10A387.872C4863@videotron.ca>...
>But you're right, to implement spectral color space rendering in
>(mega)PoV from now, every color, light, shading and texture manipulation
>functions have to be completly redesigned ; and at this level of
>evolution, it won't be an easy task, or at least, it'll take a certain
>time...
Actually, POV does do a little bit of spectral color space rendering.
Photon mapping with dispersion uses spectral color space, and
wavelength-dependant Rayleigh scattering also has support for spectral color
space.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 14 Nov 2000 03:43:59
Message: <3a10fb4f@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3A10777B.294FE50F@videotron.ca>, Stephane Marty
><alb### [at] videotron ca> wrote:
>> There's a BIG difference of quality between an image rendered using
>> spectral space and the same one rendered in RGB...
>Do you have any examples? Any links to information on using spectral
>color spaces?
I think I have two books about this problem but unfortunatelly in polish
but one of it is translation from english: James D. Foley, Andries van
Dam, Steven K. Feiner, John F. Huges, Richard L. Phillips "Introduction
to computer graphics" (c) 1994, 1990 by Addison Wesley Publishing
Company
as title said this is introduction but with over 300 positions in
bibliography
if anybody want I can scan some parts of chapter about space (but
polish!!!) or scan bibliography
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: color definition (Re: Announce: SkyPOV 0.1)
Date: 14 Nov 2000 03:47:02
Message: <3a10fc06@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Wlodzimierz ABX Skiba wrote in message <3a10fb4f@news.povray.org>...
>if anybody want I can scan some parts of chapter about space
of course about color space :-)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |