POV-Ray : Newsgroups : povray.binaries.images : no water in the garden Server Time
3 May 2024 12:35:36 EDT (-0400)
  no water in the garden (Message 28 to 37 of 37)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: no water in the garden
Date: 16 Nov 2017 09:05:00
Message: <web.5a0d9a75b458f717c437ac910@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> Yes, a lot of. I have made a debug file to see the values output by
> asin(2.*_x/_l-1.0) // in the #while (_x<=_l-_xp) loop drawing spheres and
> cylinders for the barbs //. SOme of this values are > to 1.5 (when _x = 0). In
> fact the errors appears at the start and at the end of the loop. Maybe easy to
> fix, I will see this this evening.

I noticed that it was just a string of errors in two lines of the code.
That's where the cylinders are generated.
And it's only in the second calculation where (_x+_xp) is used
I just did a quick
#declare _X = (2.*(_x+_xp)/_l-1.0);
and then did 2 sequential #if statements to check if <-1 or >1, and then set it
to -1 or 1 to eliminate out-of-bounds values.
That got rid of all the errors.

There might be a more elegant faster way with select(), but it was getting late.



> The barbs may also made with sphere_sweep (like on my previous picture), but
> this need a lot of objects to obtain a tighten feather.

Right - as it is, these feathers take up a lot of memory.  The 10 feathers I'm
testing with gobble [sic] up >700 MB.  :O

Modeling a bald eagle - with 7000 feathers - wouldn't be possible.
Perhaps one of the things to look at is adjusting the number of steps in the
loop to get a feather with fewer primitives.
Of course, somehow generating a mesh that could be instantiated would be pretty
great as well.


> > Yes, I was wondering how to get something other than a banded pattern, and
> > more of a realistic pattern.  Possibly as another parameter for the macro so
> > that the pattern can be defined in the scene and passed to the macro.
> >
> See the picture, I made it fast...

Excellent - I'm glad it's that easy.
Another common coloration is a slightly different color going up the edge of one
side of the feather.


> > There also seems to be some unnecessary calculations, and "magic numbers" - it
> > would be great to simplify a lot of that, move the equations out into some
> > descriptive #declare or #local statements, and then use those meaningful
> > variable names in the calculations so that it's easier to follow what's going
> > on.
>
> Some cleaning...
> Two brains are better than one.

We hope   ;)


― Robert A. Heinlein


Hope you have a great day  :)


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 16 Nov 2017 12:45:01
Message: <web.5a0dcd78b458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Fractracer" <lg.### [at] gmailcom> wrote:
>
> > Yes, a lot of. I have made a debug file to see the values output by
> > asin(2.*_x/_l-1.0) // in the #while (_x<=_l-_xp) loop drawing spheres and
> > cylinders for the barbs //. SOme of this values are > to 1.5 (when _x = 0). > In
fact the errors appears at the sta
rt and at the end of the loop. Maybe easy   > to fix, I will see this this evening.

Oops! I'm stupid! Working too fast, not enough time, not thinking... And I got
the output of asin rather than the input of asin...

> I noticed that it was just a string of errors in two lines of the code.
> That's where the cylinders are generated.
> And it's only in the second calculation where (_x+_xp) is used
> I just did a quick
> #declare _X = (2.*(_x+_xp)/_l-1.0);
> and then did 2 sequential #if statements to check if <-1 or >1, and then set
> it > to -1 or 1 to eliminate out-of-bounds values.
> That got rid of all the errors.

Maybe one #if statement can make the job, with #if (abs(_X) <= 1)

> There might be a more elegant faster way with select(), but it was getting late.
Time, O time...

> Modeling a bald eagle - with 7000 feathers - wouldn't be possible.
> Perhaps one of the things to look at is adjusting the number of steps in the
> loop to get a feather with fewer primitives.
> Of course, somehow generating a mesh that could be instantiated would be
> pretty great as well.

Since the loop is based on _x, it is possible to get this value and store it in
an array for a sphere_sweep or a mesh.


> Another common coloration is a slightly different color going up the edge of
> one side of the feather.

No problems, I just have to define another texture. I wrote a test in the top of
the macro:
#ifndef(tx_feather)
#declare Texture_all = 0;
#end

Another in the sphere and cylinder
#if (Texture_all = 0)
then the original pigment is applied.

And in the end of the union block for the two sides:
#if (Texture_all = 1)
texture {tx_feather}
#end

> There also seems to be some unnecessary calculations, and "magic numbers" - it
> would be great to simplify a lot of that, move the equations out into some
> descriptive #declare or #local statements, and then use those meaningful
> variable names in the calculations so that it's easier to follow what's going
> on.

Right. More visibility help to better understand.


> ― Robert A. Heinlein
> Hope you have a great day  :)

Thank you, you too.


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 16 Nov 2017 13:15:01
Message: <web.5a0dd51cb458f717c437ac910@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> Maybe one #if statement can make the job, with #if (abs(_X) <= 1)

yes, excellent.
I'll replace my kludge tonight with:

#if (abs(_X) <= 1)
     #declare _X = sgn(_X);
#end


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 16 Nov 2017 14:25:00
Message: <web.5a0de5fdb458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Fractracer" <lg.### [at] gmailcom> wrote:
>
> > Maybe one #if statement can make the job, with #if (abs(_X) <= 1)
>
> yes, excellent.
> I'll replace my kludge tonight with:
>
> #if (abs(_X) <= 1)
>      #declare _X = sgn(_X);
> #end

If I am not wrong, I think that sgn() only return 1 or -1, in this case I
believe it is better to do:

 #if (abs(_X) > 1)
      #declare _X = sgn(_X);
 #end


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 16 Nov 2017 14:50:00
Message: <web.5a0deba2b458f717c437ac910@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> If I am not wrong, I think that sgn() only return 1 or -1,

Yes, sorry - I read what I wanted to read, or what I was expecting to read - not
what was actually there.
You understood what I meant even though I copied-and-pasted the conditional.


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 16 Nov 2017 15:05:01
Message: <web.5a0def47b458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Fractracer" <lg.### [at] gmailcom> wrote:
>
> > If I am not wrong, I think that sgn() only return 1 or -1,
>
> Yes, sorry - I read what I wanted to read, or what I was expecting to read - not
> what was actually there.
> You understood what I meant even though I copied-and-pasted the conditional.

It is the end of the week, I made also some mistakes, due to fatique and speed
of action. And yes I understood :).


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 19 Nov 2017 08:30:03
Message: <web.5a11865bb458f717666005640@news.povray.org>
Final (...) rendering.

All ideas, advices, tips, etc.., are welcome for improve the scene.

An unexpected crack in the shadows appear...


Post a reply to this message


Attachments:
Download 'inside_wall_000.png' (2964 KB)

Preview of image 'inside_wall_000.png'
inside_wall_000.png


 

From: Thomas de Groot
Subject: Re: no water in the garden
Date: 20 Nov 2017 02:48:00
Message: <5a1288b0$1@news.povray.org>
On 19-11-2017 14:25, Fractracer wrote:
> 
> Final (...) rendering.
> 
> All ideas, advices, tips, etc.., are welcome for improve the scene.
> 
> An unexpected crack in the shadows appear...
> 

I like this, no question.

-- 
Thomas


Post a reply to this message

From: Kontemplator
Subject: Re: no water in the garden
Date: 21 Nov 2017 17:05:01
Message: <web.5a14a2eeb458f717b266f0730@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > IIRC, I found a great little feather macro a few years ago.
> > I can't seem to find it online, but I can check on my laptop at home.
> >
>
> I have found this in newsgroup but the link is dead.
>
>
http://news.povray.org/povray.binaries.images/message/%3C39ea2c56%40news.povray.org%3E/
>
> I have made a feather for my picture but only one side is good.

you may try

https://web.archive.org/web/20050905225952/http://baillp.free.fr/feather.html


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 22 Nov 2017 06:15:01
Message: <web.5a155bd9b458f717666005640@news.povray.org>
"Kontemplator" <haf### [at] yahoocom> wrote:
> you may try
>
> https://web.archive.org/web/20050905225952/http://baillp.free.fr/feather.html

Thank you for the link, but I already had it (Bald Eagle gave it to me in a
previous post). This feather is good  but is not in the way I want.
Actually Bald Eagle works on the maths of the Baillehache' macro, and I also try
to modified the macro.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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