POV-Ray : Newsgroups : povray.binaries.images : using the CUBIC pattern with image_maps : Re: using the CUBIC pattern with image_maps Server Time
6 Nov 2024 22:16:04 EST (-0500)
  Re: using the CUBIC pattern with image_maps  
From: William F Pokorny
Date: 15 Jan 2018 15:03:44
Message: <5a5d0920@news.povray.org>
On 12/31/2017 07:36 PM, Kenneth wrote:

Just getting back to this after getting side tracked.

> ...... Unfortunately, there's no place in space to move the
> box to get *more* than one strictly x/y/z texture to fully 'blend together'
> inside the box. That's just the nature of the 'isolated pyramids' scheme.  I
> haven't completely given up on the idea, though...

I'm perhaps missing your intent, but the cubic pattern does map the 3D 
space inside the +x,+y,+z,-x,-y and -z pyramids. Meaning if the textures 
in the texture list change/blend along the appropriate axis you can 
blend multiple textures or images inside each pyramid/face. For example 
something like:

#declare MapRed     = color_map { [ 0 White ] [ 1 Red ] }
#declare MapGreen   = color_map { [ 0 White ] [ 1 Green ] }
#declare MapBlue    = color_map { [ 0 White ] [ 1 Blue ] }
#declare MapYellow  = color_map { [ 0 White ] [ 1 Yellow ] }
#declare MapCyan    = color_map { [ 0 White ] [ 1 Cyan ] }
#declare MapMagenta = color_map { [ 0 White ] [ 1 Magenta ] }
#declare Pred     = pigment { gradient +x color_map { MapRed } }
#declare Pgreen   = pigment { gradient +y color_map { MapGreen } }
#declare Pblue    = pigment { gradient +z color_map { MapBlue } }
#declare Pyellow  = pigment { gradient -x color_map { MapYellow } }
#declare Pcyan    = pigment { gradient -y color_map { MapCyan } }
#declare Pmagenta = pigment { gradient -z color_map { MapMagenta } }
#declare PigmentCubic = pigment {
     cubic
     pigment { Pred }
     pigment { Pgreen }
     pigment { Pblue }
     pigment { Pyellow }
     pigment { Pcyan }
     pigment { Pmagenta }
}

See the attached image where the cylinders use PigmentCubic at the 
origin and the boxes (scale -1 inverted boxes to the left) were textured 
at differing start sizes then scaled to a normalized size.

If your initial box centered at the origin is say 0.1 on a side it will 
be near white on all sides. If near 2 on a side, each face will be near 
the '1' color in the corresponding color map. To do something like this 
with multiple images per face, you use a pigment_map instead of a color 
map. Pick which 'image' by your initial box size within the cubic 
pattern and size afterward to need.

> 
> I don't yet know how or if this cubic pattern could be used for MEDIA inside the
> box. Or the use of df3 patterns.

I'm not looking to use such a result directly, but rather to create df3s 
from images created via the use of the cubic pattern. In other words I'm 
looking to use the cubic pattern to set up to render a cubic map image I 
can convert to a df3 file to use with warp { cubic }.

> 
> Trying to use 'transmit .x' (or 'transmit all .x' for image_maps) to get partial
> transparency of a  pigment/face doesn't seem to work at all.  Perhaps by design;
> or maybe it was left out by mistake(?) But I think it would make only a face's
> SURFACE semi-transparent-- which would not show the 'volumetric' nature of the
> box's other five pyramidal pigments anyway, just an empty box.
> 
> 

I've used the alpha channel transparency in png files to see through 
parts of the faces to the inside surface of opposing faces. I thought 
the transmit <n/all> and filter <n/all> were for use with indexed image 
file formats like gif, but perhaps I'm not up with current functionality?

Bill P.


Post a reply to this message


Attachments:
Download 'the.png' (42 KB)

Preview of image 'the.png'
the.png


 

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