POV-Ray : Newsgroups : povray.pov4.discussion.general : 3D warp repeat for primitives : Re: 3D warp repeat for primitives Server Time
31 Oct 2024 10:21:59 EDT (-0400)
  Re: 3D warp repeat for primitives  
From: Kenneth
Date: 16 Aug 2024 17:15:00
Message: <web.66bfc0a0c952a06991c33a706e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> When we have meshes, with multiple instantiations, we merely apply a
> transformation matrix to the reference mesh in order to do the calculations to
> find the new position of the copy.
>
> If we simply apply the same methods to ACTUAL TEXTURED OBJECTS, then we
> ought to be able to accomplish exactly the same thing.   When I texture an
> object, and THEN translate it, the texture "follows" it.  So i ought to be
> able to define a unit cell with a vector, and then simply use mod () to
> repeat that unit EVERYWHERE.
>
> The attached is an isosurface of a 100 x 100 grid using mod () which rendered
> in 7 seconds.  We KNOW primitives render much faster than isosurfaces, and
> so would be a feasible way to accomplish the same thing only using all of
> the native optimizing of CSG objects.

(Sorry for the long delay in responding. I finally got a little bit of free
time-- but then my internet connection went down completely for 3 days; no clue
as to why. There's a bad technical glitch somewhere...) Anyway...

SO...From your isosurface/spheres render-- as your analogue-- I have a much
clearer idea of what you're after: a (quasi-)infinite built-in 'pattern' of 3-D
objects via a warp/repeat or some such, using any(?) kind of pre-made object as
the 'unit', not just a sphere. Then the underlying pattern mechanism can place
the objects within a pre-defined(?) set of planes, appearing to go to infinity
in at least 2 if not all 3 axes (but constrained by the planes.) And
accomplished very quickly, because the basic pattern is built-in behind the
scenes, rather than having to code the entire shebang in SDL. Correct so far?

It's an intriguing idea...but I still wonder if *nearly* the same thing could be
accomplished visually-- albeit in a much slower way-- by nested #for loops, to
place the (*many!*) objects in such a grid-like arrangement, 'appearing' to go
to infinity even though the loops have finite start and end locations.

As has been mentioned, even POV-ray's typical built-in patterns-- when applied
to a plane, for example-- lose their definition the farther the pattern is from
the camera. So having the 3-D objects go all the way to 'infinity' (i.e.
quasi-infinity) may not be necessary anyway; instead, only as far as what looks
like infinity, before they lose their definition too. (I hope that makes sense.)

And if the camera moves during an animation, it seems to me that the #for-loop
construction could easily be adjusted to keep the many objects looking like they
still go out to quasi-infinity (by changing the finite start and end locations
in the loops.)

But I agree that it would be nice to have such an 'infinite 3-D-object pattern'
built-in, if only for the vast parse/render-speed increase.

BTW: If your code for your red-spheres-isosurface analogue scene is still
intact, would you mind posting it here? I would like to see how and where you
used your 'mod' code to get the repeating spheres in the isosurface. I haven't
used such a trick before.


Post a reply to this message

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