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 08:54:27 EDT (-0400)
  Re: On the long unfinished normal related warps in warp.cpp.  
From: William F Pokorny
Date: 18 May 2021 14:56:24
Message: <60a40dd8$1@news.povray.org>
On 5/18/21 1:34 PM, Bald Eagle wrote:
> What I'm asking about is the separability of the texture and the normal.
> Can I have a distinct uv-mapped texture for each object (which is bounded /
> defined by the uv vectors), but have them all share a "regular" normal that
> extends throughout all of POV-space and is calculated based on the POV-space
> <x,y,z> location vector?
> So: can I apply a POV-space normal to an object but then also apply the local
> shape intersection point uv-mapped texture.  Or some other way of accomplishing
> the same end result.

OK. Thanks. I believe I better understand your question.

With the repeated disclaimer I'm not a regular uv map user, I think the 
answer is no, but...

The reason is uv mapping works with primitives(1). It's a mechanism 
which associates the ray intersection on the surface of that primitive 
with a 2d map position. This mapping comes from the primitive 
shape/surface code and is the same for pigments and normals.

(1) You can use the uv_mapping keyword for csg entities, but I believe 
it simply does a default (planar?) map. Somewhere in recent years there 
are posts related to someone trying this.

Because uv mapping works at the primitive level you must define a 
texture's pigment and normal mapping at the base shape/surface - and 
once (a) texture(s) are defined for the surfaces of something - they are 
set - even if the object is included in later CSG. You cannot change 
them or add to them.

--- but
What you should be able to do - since you can define pigments and 
normals independently ahead of inclusion in a texture for each 
shape/surface - is use different maps for the pigment and normal 
uv_mapping for 'each' low level uv map-able thingy. Pigments, normals or 
both could use maps created for the object as they need to be when 
placed in global space. No automation for this as far as I know - you'd 
have to work out how to create the thingy by thingy map(s) cut from 
global space on your own.

All as far as know - maybe I've got something wrong, or someone has done 
something clever(2).

Bill P.

(2) - A very rough idea would be to do something with _map values based 
on passing global space values to a function, but I don't see all of how 
it would work at the moment - and the _map would either be huge to 
encompass all the global positions or limited. Another idea might be to 
make use of povr like normal chaining within average maps, but I have no 
idea, if, or how uv mapped normals might work/act within a normal { 
average ... } alongside other types of normals. Never tried to mix uv 
mapped types with others for pigments or normals.

Post a reply to this message

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