POV-Ray : Newsgroups : povray.binaries.images : Sphere_sweep: gradient along a curve. : Re: Sphere_sweep: gradient along a curve. Server Time
30 Jul 2024 00:18:13 EDT (-0400)
  Re: Sphere_sweep: gradient along a curve.  
From: Mr
Date: 27 Jan 2014 13:30:00
Message: <web.52e6a1e3a5ee4db8321f9fe70@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > Hair in a blender are presented by the array from splines.
> > Developers of the official version of the Blender2Povray exporter used these
> > splines for sphere_sweeps array creation.
> > Povray counts sphere_sweep enough, but,
> >
> > I had an idea to streak hair, to decolour tips of hair as it is done by some
> > people in beauty shops or hairdressing salons.
> >
> > I tried to paint sphere_sweep as necessary.
> > At me it didn't turn out.
> >
> > Therefore I addressed to other way to use the array of splines of the Blender:
> > while
> > But, I can't use the second way to receive all hair: the system hangs.
> >
> > Therefore here I asked a question of opportunity correctly to paint sphere_sweep
> > From all comments I understood that such opportunity isn't present.
> > I can't make transformation of hair after texturing
> > Maximum of hair by means of while
>
> Is the gradient in this image coorect for you? For this I use gradient x pigment
> scaled in x by the length of the sphere_swep
>
> Lionel.

Hi,
The amount-of-hair-problem is much improved in latest commits. I was able to
export 800000 hair in the attached image. Did you try to download
the script from the source LanuHum?
Anyway you are right that it does not solve the texture problem, but we did
choose sphere sweep because of the variable width along hair and the ability to
make them have different textures per strands or per hair, even in the same
array, this is planned like this:

#declare HairArray = array[1000] {
sphere_sweep{linear_spline 9,
<0.472978,0.924672,-1>,0.005,
<0.472978,0.924672,-1.43039>,0.005,
<0.472978,0.924672,-2.0315>,0.005,
<0.472978,0.924672,-2.47244>,0.005,
<0.472978,0.924672,-3>,0.005,
<0.472978,0.924672,-3.52756>,0.005,
<0.472978,0.924672,-3.9685>,0.005,
<0.472978,0.924672,-4.56961>,0.005,
<0.472978,0.924672,-5>,0.005
pigment{ color rgb <0.8, 0, 0> }
}
,
sphere_sweep{linear_spline 9,
<0.988603,0.173921,-1>,0.005,
<0.988603,0.173921,-1.43039>,0.005,
<0.988603,0.173921,-2.0315>,0.005,
<0.988603,0.173921,-2.47244>,0.005,
<0.988603,0.173921,-3>,0.005,
<0.988603,0.173921,-3.52756>,0.005,
<0.988603,0.173921,-3.9685>,0.005,
<0.988603,0.173921,-4.56961>,0.005,
<0.988603,0.173921,-5>,0.005
pigment{ color rgb <0, 0.8, 0> }}
,
sphere_sweep{linear_spline 9,
<0.191728,0.708456,-1>,0.005,
<0.191728,0.708456,-1.43039>,0.005,
<0.191728,0.708456,-2.0315>,0.005,
<0.191728,0.708456,-2.47244>,0.005,
<0.191728,0.708456,-3>,0.005,
<0.191728,0.708456,-3.52756>,0.005,
<0.191728,0.708456,-3.9685>,0.005,
<0.191728,0.708456,-4.56961>,0.005,
<0.191728,0.708456,-5>,0.005
pigment{ color rgb <0, 0, 0.8> }}
,
etc...


 I am hoping that we will be able to evaluate the hair color from a UV image or
pattern applied to the emitter.

But, for variations of texture along the sphere sweep,  though the simple media
with double_illuminate that is used should automatically add some variations,
these will not be as controllable as if a gradient could be mapped along it's
spline instead of a single vector. Still, with the root/tip factor available in
Blender that is already linked to the sphere sweep thickness. (0.005 constant in
the example given) the color of the hair will change with it's thickness because
of slight transparency and media.
If there is another way I would be glad to add it to the export process...

The best would be if the pigment could be assigned to spline nodes instead of
whole splines, just as if they were blobs. this would definitely alow us to do
what we want.

If only one vector is possible, I think the gradient is not a bad path, maybe
some vector from root to tip of the hair could provide the illusion of desired
effect decently enough?


Post a reply to this message


Attachments:
Download '800000hair52min11sec41.png' (333 KB)

Preview of image '800000hair52min11sec41.png'
800000hair52min11sec41.png


 

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