POV-Ray : Newsgroups : povray.unofficial.patches : On the long unfinished normal related warps in warp.cpp. : Re: On the long unfinished normal related warps in warp.cpp. Server Time
17 Aug 2022 10:49:17 EDT (-0400)
  Re: On the long unfinished normal related warps in warp.cpp.  
From: William F Pokorny
Date: 18 May 2021 06:53:08
Message: <60a39c94$1@news.povray.org>
On 5/17/21 2:26 PM, Bald Eagle wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> So, I started to play with an idea for new normal pattern which
>> allows/enables this. It's currently working with the difference between
>> the intersection location and the warp{} / turbulence affected EPoint.
>> In other words, there isn't an actual specific perturbation method /
>> pattern - it's whatever your warp{}s create.
> So it would be much like doing normal {null warp repeat x turbulence 0.3}
> where "null" is just sort of like an identity matrix - no change.

(1) - I forgot to add the planned footnote in my original post. :-) Was 
just some ramble about options and complications.

Yes, that's a good way to think about it. Might even add 'null" as the 
normal pattern name in the end(2) - it's currently the default option in 
the normal bevy "collection."

(2) - I'm playing with two actual methods. "null type n" - don't know.

> That second one seems like it has real potential.  Given that one of the mothods
> for arranging things "evenly" on the surface of a sphere is using a spiral /
> loxodrome, then accomplishing a very close approximation to that using only a
> simple normal statement would be a really powerful and welcome development.

Yes, I've been thinking some about geodesic centered - normal direction 
sets where the incoming normal would be matched to closest direction 
match creating a frame for normal perturbations. As you suggest, others 

I need at some point to go back and work more on the black hole 
'spherically contained' warps. Perhaps adding cylindrical black holes, 
etc, with an ability to orient to an arbitrary direction vector. With 
warps too there is more possible.

> This reminds me of my unsolved problem applying normals to bezier patches:
> http://news.povray.org/web.5f6a91889d9b31d91f9dae300%40news.povray.org
> regarding
> 45adba5d69181b1f9dae300%40news.povray.org%3E
> Do you have any inkling if the uv-mapping coordinates affect the application of
> the normal pattern, and where in the code that factors in?  Because I see that
> as being another thing that's hiding in there that we might not be fully aware
> of.

I've not spent any time looking at it, but there is a normal block uv 
mapping in normal.cpp. I don't use uv mapping much, but when active it 
should map the intersection location on the uv map-able shape/object to 
the appropriate 2d uv map position in the normal pattern in the 0-1, xy 
square in the z=0 plane. Said another way, when uv mapping normals you 
are explicitly setting the perturbed normal for the 3d surface 
intersection from a 2d map. This is the normal pattern method if uv 
mapping used for the normal block of the texture.

A point on your first link, given the questions asked there. There is 
only one normal per material/texture for an object. That normal can 
itself be and average, normal list or normal map of other normals, but 
it's one normal as included in the texture. When you add a normal block 
after an existing texture on an object as follows:

sphere { ... texture { T_wNormal } normal { granite } }

The normal in the sphere's texture is now 'normal { granite }' with 
everything else the same; the normal originally in the texture 
T_wNormal is gone for this sphere's texture.

> So I guess maybe what I'm asking is, do the uv-mapping vectors override the
> global POV-space location vectors, in essence (locally/temporarily) redefining
> the EPoint?  

If I understand your question, yes, in that you are not using a warped 
EPoint when uv mapping. The 'EPoint' is the local shape intersection 

> And with regard to applying a global normal pattern that is
> dependent upon an object's location in POV-space, is this desirable, expected,
> and can it be overridden?

Again not quite sure I follow. You can delay defining all shape's 
textures until you are at the global scene level. Say a set of 50 
spheres in a union where the (not uv mapped) texture including the 
normal is defined at the union definition or later. There the position 
of the 50 spheres within the texture eventually applied will result in 
differences sphere to sphere.

Bill P.

Post a reply to this message

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