POV-Ray : Newsgroups : povray.tools.general : Mesh etc. : Re: Mesh etc. Server Time
2 Jun 2024 11:11:49 EDT (-0400)
  Re: Mesh etc.  
From: Jim Charter
Date: 9 Mar 2004 12:34:27
Message: <404e0023$1@news.povray.org>
Warp wrote:
> Jim Charter <jrc### [at] msncom> wrote:
> 
>>How is it that case 1 gets a performance/memory gain and case 2 doesn't?
> 
> 
>   When you create instances of a mesh, the mesh data is not copied. However,
> when creating instances of a union, the contents are copied for each
> instance.
>   The reason is that transformations made to the instance may change the
> contents of the union.
>   In order to get the same advantage as with a mesh, all transformation
> optimizations would need to be removed from all existing primitives.
> This might have a negative impact on the rendering speed of some
> scenes... (It's not an impossible idea, but it would be nice to know
> how much it would impact in practice.)
> 
Thanks Warp, that helps.  For the record, I did check your FAQ before 
asking.

Two follow up questions if I may...

I have:

#local Shape =
sphere { ... }

#local Pattern =
union {
	sphere { ... }
	sphere { ... }
	...
}

#local Result =
object { Shape
	clipped_by { Pattern }
}

LOOP ( many times )
	object { Result translate ... }
END LOOP

1) How expensive is this...
compared with if Result was just a simple unclipped sphere 			primitive? 
  ie If the clipping Pattern is some complex thing, how does that 
contribute to the expense of the instantiated Result?

2) Is there any general way of estimating computational expense of 
different primitives?  ie Are two triangle primitives exactly twice as 
expensive as one box?


Post a reply to this message

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