POV-Ray : Newsgroups : povray.binaries.images : Sphere_sweep: gradient along a curve. Server Time
29 Jul 2024 22:32:44 EDT (-0400)
  Sphere_sweep: gradient along a curve. (Message 11 to 20 of 51)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Fractracer
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 12:35:01
Message: <web.52e151aba5ee4db8f4b88430@news.povray.org>
"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.


Post a reply to this message


Attachments:
Download 'call_rand_curve_test_hair2.png' (112 KB)

Preview of image 'call_rand_curve_test_hair2.png'
call_rand_curve_test_hair2.png


 

From: LanuHum
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 13:00:01
Message: <web.52e15778a5ee4db87a3e03fe0@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:
>
> 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.

Help me, please!
Modify this text:


#version 3.7;
global_settings {
    assumed_gamma 1.0
    max_trace_level 3
}
background {rgbt<0.0509, 0.0509, 0.0509, 0>}

#declare Texture = pigment{
    gradient
    <1, 0, 0>
    color_map {
        [0 color rgbf<0,0,0,0>]
        [1 color rgbf<1,1,1,0>]
    }
    scale <200,1,1>
}
#declare Material_001_tex =
texture {pigment {Texture}}
#declare NurbsCurve_ob =
sphere_sweep { b_spline 11, //or cubic_spline
    <0.6332,1.591,-2.241>,0.024,
    <1.694,1.468,-1.64>,0.024,
    <2.423,1.241,-0.959>,0.024,
    <2.772,0.5467,0.466>,0.024,
    <1.655,-0.215,1.505>,0.024,
    <-0.1772,-0.4423,1.292>,0.024,
    <-1.707,-0.6573,1.161>,0.024,
    <-1.5,0,0>,0.024,
    <-1,-4.371e-08,-1>,0.024,
    <1,-4.371e-08,-1>,0.024,
    <1.5,0,0>,0.024
    texture{Material_001_tex}
    scale <1,1,1>
    rotate <-2.504e-06,-0,0>
    translate <0.000000, 0.000000, 0.000000>
}
object {NurbsCurve_ob}
light_source {
    <4.08,5.9,-1.01>
    color rgb<1, 1, 1>
}
camera {
    location  <0, 0, 0>
    look_at  <0, 0, -1>
    right <-1.6077777759896383, 0, 0>
    up <0, 1, 0>
    angle  49.134343
    rotate  <-27.098163, 46.688390, -0.903519>
    translate <7.481132, 5.343666, 6.507640>
}


Post a reply to this message


Attachments:
Download 'sphere_sweep.jpg' (13 KB)

Preview of image 'sphere_sweep.jpg'
sphere_sweep.jpg


 

From: FractRacer
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 13:25:20
Message: <52e15e90@news.povray.org>

> "Fractracer" <lg.### [at] gmailcom> wrote:
>>
>> 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.
>
> Help me, please!
> Modify this text:
>
>

  #version 3.7;
  global_settings {
       assumed_gamma 1.0
       max_trace_level 3
  }
  background {rgbt<0.0509, 0.0509, 0.0509, 0>}

#declare Texture = pigment{
	average
	pigment_map{
		[1
		    gradient x+1  // x+1 else we see a demarcation line
		    color_map {
		        [0 color rgbf<0,0,0,0>]
		        [1 color rgbf<1,1,1,0>]
		    }
		    scale x*11 //because 11 points in sphere_sweep
	    ]
	    [2
		    gradient y
		    color_map {
		        [0 color rgbf<0,0,0,0>]
		        [1 color rgbf<1,1,1,0>]
		    }
		    scale y*11
		]
	}
	}
  #declare Material_001_tex =
  texture {pigment {Texture}}
  #declare NurbsCurve_ob =
  sphere_sweep { b_spline 11, //or cubic_spline
       <0.6332,1.591,-2.241>,0.024,
       <1.694,1.468,-1.64>,0.024,
       <2.423,1.241,-0.959>,0.024,
       <2.772,0.5467,0.466>,0.024,
       <1.655,-0.215,1.505>,0.024,
       <-0.1772,-0.4423,1.292>,0.024,
       <-1.707,-0.6573,1.161>,0.024,
       <-1.5,0,0>,0.024,
       <-1,-4.371e-08,-1>,0.024,
       <1,-4.371e-08,-1>,0.024,
       <1.5,0,0>,0.024
       texture{Material_001_tex}
       scale <1,1,1>
       rotate <-2.504e-06,-0,0>
       translate <0.000000, 0.000000, 0.000000>
  }
  object {NurbsCurve_ob}
  light_source {
       <4.08,5.9,-1.01>
       color rgb<1, 1, 1>
  }
  camera {
       location  <0, 0, 0>
       look_at  <0, 0, -1>
       right <-1.6077777759896383, 0, 0>
       up <0, 1, 0>
       angle  49.134343
       rotate  <-27.098163, 46.688390, -0.903519>
       translate <7.481132, 5.343666, 6.507640>
  }

I have modified slightly the pigment, I think it is what you want. There 
is just one problem whith the gradient x which can let appear some 
demarcation line (it is why I wrote /gradient x+1/). Maybe you have to 
modify some parts to obtain the right result.

Lionel




-- 
Do not judge my words, judge my actions.

---

http://www.avast.com


Post a reply to this message

From: LanuHum
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 13:55:01
Message: <web.52e1656ca5ee4db87a3e03fe0@news.povray.org>
FractRacer <lg.### [at] gmailcom> wrote:

>
> I have modified slightly the pigment, I think it is what you want. There
> is just one problem whith the gradient x which can let appear some
> demarcation line (it is why I wrote /gradient x+1/). Maybe you have to
> modify some parts to obtain the right result.
>
> Lionel
>

Thanks! I will study

Other way also became more available Povray-3.7 after repeated assembly
It appeared, the povray.spec had an option --disable-optimiz, I removed it.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 14:42:58
Message: <52e170c2$1@news.povray.org>
Hi(gh)!

On 23.01.2014 13:04, FractRacer wrote:

> This image contains 5000 curves made with sphere_sweep and a while loop.
> It is that you want?

...and they do not intersect each other?!?

See you in Khyberspace!

Yadgar


Post a reply to this message

From: FractRacer
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 16:47:42
Message: <52e18dfe@news.povray.org>

> Hi(gh)!
>
> On 23.01.2014 13:04, FractRacer wrote:
>
>> This image contains 5000 curves made with sphere_sweep and a while loop.
>> It is that you want?
>
> ...and they do not intersect each other?!?
>
> See you in Khyberspace!
>
> Yadgar
>

I dont think they do not intersect, sorry, the curves are created one by 
one without calculations about positions of others. It was just a try.
Lionel.

-- 
Do not judge my words, judge my actions.

---

http://www.avast.com


Post a reply to this message

From: Cousin Ricky
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 20:30:01
Message: <web.52e1c16ca5ee4db8192ae5f10@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Could also save UV mapped parametric mesh representations of the sweeps and
> render those just as one normally would expect the hair to be textured.

Hmmmm... You just gave me an idea for the Object Collection.


Post a reply to this message

From: Alain
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 23 Jan 2014 23:29:35
Message: <52e1ec2f$1@news.povray.org>

> Le_Forgeron <jgr### [at] freefr> wrote:
>> One rule of povray: the pattern/color is 3D distributed, the shape is
>> just immersed in the pattern.
>> (forget about UV-mapping)
>
> That's right. It's just like that object intersect the pattern.
>

I like to imagine the patterns as huge blocks of rock or other materials 
from whitch the objects are carved out.


Post a reply to this message

From: And
Subject: Re: Sphere_sweep: gradient along a curve.
Date: 24 Jan 2014 00:55:01
Message: <web.52e1ff25a5ee4db86e3fa5c50@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > That's right. It's just like that object intersect the pattern.
> >
>
> I like to imagine the patterns as huge blocks of rock or other materials
> from whitch the objects are carved out.

Uh..
I never imagine it by this way, but it's the same and sounds more like an art
work.


Post a reply to this message

From: Mr
Subject: Re: Sphere_sweep: gradient along a curve.
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


 

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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