|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |