Le 27/02/2013 20:05, Ryan Budney nous fit lire :
> Greetings,> > I'm a long-time PoVRay user and I'm encountering a problem with PovRay 3.7 RC7,> when it comes to parametric surfaces.> > I have a small scene that renders fine when the surface is *not* in it, but with> the surface, the scene renders to 99% complete (rather quickly, using 8 cores),> but then it just sits there, with only 1 core running (via system monitor) at> 100%. It almost appears as if PovRay is failing to collect a "rogue thread"> but I can't really tell what's happening. The scene is very small so I've> copied it below.>
Thanks.
in 3.7, image is rendered in small square chunk. What you see is the
last chunk being very long (very very .... very ... very long) to trace.
> Are there any known issues with parametric surfaces and the PovRay beta? I've> seen a post concerning textures but my surface is not textured -- it's just> partially transparent.> > Thanks for any information. The scene is copied below.> > #declare C1 = function(r,A,l) { 1.0 - (r*sin(A)/sqrt(sinh(l)*sinh(l) +> cosh(l)*cosh(l))) }
You could speed up a bit by replacing sinh^2(l)+cosh^2(l) with cosh(2l)
(+Q3 went from 28 seconds to 22 seconds with that change)
----------------------------------------------------------------------------
Ray->Shape Intersection Tests Succeeded Percentage
----------------------------------------------------------------------------
Parametric 119326 477 0.40
Parametric Bound 119326 119326 100.00
Function VM calls: 100309541
Trace Time: 0 hours 0 minutes 22 seconds (22.167 seconds)
Trace Time: 0 hours 0 minutes 28 seconds (28.655 seconds)
> clipped_by { plane { <0,0,-1>, -2 } }> clipped_by { plane { <0,0,1>, 2.14 } }
Double clipped_by ? not sure it does what you expect
Use a single box instead. (but does it only appear at all ? as the
quadric is a duplicate of the previous one, clipped by a sphere)
The parametric can enjoy being clipped_by sphere { <0,0,1>, 0.4 } }
Parametric 8776 477 5.44
Parametric Bound 9500 8776 92.38
You are also using radiosity with a parametric surface and a large area
light (16 x 16!). That's slow. (something like 256 slower)
Last: simplify your formula, C2(r,A)*sin(T) when T=0 is a waste of time
for Tx.
Same for Ty, the sinh(l)*sin(T)*C1(r,A,l) is also 0.
Just dropping these 2 zero rendered in 15 seconds at +Q3. (instead of 22)
And if you comment the cos(T) in Tx & Ty (because cos(0)=1), it drops to
12 seconds (with +Q3).
+Q4 push me at 51 seconds, and going +Q5 is far too long for something
that look like a small sphere at the bottom of the parabola.

Thanks for the comments Forgeron and Clipka. I didn't think there would be such
a massive change in render times! Without the parametric surface the scene
renders on my laptop in a couple seconds.
I lowered the quality and got a quick render-time again.
The surface isn't supposed to be that blob, it's supposed to be a small tube
around a hyperbola... It looks like I don't understand how PovRay "functions"
work... but that's something that I should be able to sort out.

"Ryan Budney" <ryb### [at] uvicca> wrote:
> Thanks for the comments Forgeron and Clipka. I didn't think there would be such> a massive change in render times! Without the parametric surface the scene> renders on my laptop in a couple seconds.>> I lowered the quality and got a quick render-time again.>> The surface isn't supposed to be that blob, it's supposed to be a small tube> around a hyperbola... It looks like I don't understand how PovRay "functions"> work... but that's something that I should be able to sort out.
Ah! Figured it out. I hadn't realized parametric objects have a default
contained_by. My PovRay world is back in order.

Le 2013-02-27 19:22, clipka a écrit :
> Am 27.02.2013 20:05, schrieb Ryan Budney:>>> light_source>> {>> <-5, -2, 1 >>> color White>> area_light <0.6,0,0>,<0,0.6,0>,16,16>> }>> When using area lights, /always/ make them adaptive. Size should be> 2^N+1 for that, so for example:>> area_light <0.6,0,0>,<0,0.6,0>,17,17> adaptive 1>> I usually also use "circular orient".>
For a test render, I usualy use adaptive 0, then, if needed, up this to
adaptive 1 or 2.