POV-Ray : Newsgroups : povray.binaries.images : using the CUBIC pattern with image_maps Server Time
10 Nov 2026 14:08:32 EST (-0500)
  using the CUBIC pattern with image_maps (Message 1 to 22 of 22)  
From: Kenneth
Subject: using the CUBIC pattern with image_maps
Date: 24 Dec 2017 10:30:01
Message: <web.5a3fc73f52f18fa389df8d30@news.povray.org>
For my continuing work on my 'city buildings' scene, I wanted to check out the
new(?) CUBIC pattern, to see if might be an easier way to apply my
building-window image_maps to the five visible sides of a box.

The docs explain only the very basics of using the pattern, as a simple list of
six textures to apply. This works fine as-is for applying 'typical' pigments--
bozo, bumps, gradients, etc.-- but doesn't work well with individual image_maps
on the cube's faces. How to do that turned out to be not quite so obvious, so I
thought I would post the basic procedure.

There might be other permutations of scale/translate that would also work, but
these are what I came up with. (Ideally, the same scales/translations should
also be used with POV-Ray's other pigment patterns, but are probably unnecessary
because of the visual nature of those patterns. The placement of image_maps is
more finicky.)

[NOTE: DON'T use the 'once' keyword in the image_maps; it causes that particular
face of the cube to disappear! Which might actually be useful, of course.]
------------
box{0,1
   translate -.5 // box needs to be centered on origin, as docs say
   texture{
        cubic

   // RIGHT-SIDE
   texture{pigment{image_map{jpeg "CUBIC image 1.jpg"}
   rotate -90*y translate <0,.5,.5>}}

   // TOP
   texture{pigment{image_map{jpeg "CUBIC image 2.jpg"}
   rotate 90*x translate <.5,0,.5>}}

   // REAR
   texture{pigment{image_map{jpeg "CUBIC image 3.jpg"}
   scale -1 rotate 180*x translate <.5,.5,0>}}

   // LEFT_SIDE
   // texture{pigment{cells scale .15}}
   texture{pigment{image_map{jpeg "CUBIC image 4.jpg"}
   rotate 90*y translate <0,.5,.5>}}

   // BOTTOM
   texture{pigment{image_map{jpeg "CUBIC image 5.jpg"}
   rotate -90*x translate <.5,0,.5>}}

   // FRONT
   texture{pigment{image_map{jpeg "CUBIC image 6.jpg"}
   translate <.5,.5,0>}}
          }
    }


Post a reply to this message


Attachments:
Download 'cubic_pattern_good.jpg' (377 KB)

Preview of image 'cubic_pattern_good.jpg'
cubic_pattern_good.jpg


 

From: William F Pokorny
Subject: Re: using the CUBIC pattern with image_maps
Date: 27 Dec 2017 09:19:29
Message: <5a43abf1$1@news.povray.org>
On 12/24/2017 10:26 AM, Kenneth wrote:
> For my continuing work on my 'city buildings' scene, I wanted to check out the
> new(?) CUBIC pattern, to see if might be an easier way to apply my
> building-window image_maps to the five visible sides of a box.
> 

Thanks for the information! On my list to try such a set up while 
creating my df3 cubic maps.

Bill P.


Post a reply to this message

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 29 Dec 2017 13:05:01
Message: <web.5a46828f1231bd0289df8d30@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

>
> Thanks for the information! On my list to try such a set up while
> creating my df3 cubic maps.
>

The 'internal volume' of the textured cube is quite interesting, as I discovered
while doing some CSG-differencing tests. Each of the six cube faces is actually
a volumetric pyramid, with the apexs all meeting at the center of the cube. Kind
of strange, but logical. If I understand df3s, that would present a visual
problem.

But I'm working out a way around that oddity, essentially by substituting some
duplicated/reversed textures-- so that there are only THREE continuous
non-pyramidal volumetric textures throughout the cube, oriented in x,y and z.
That should solve the df3 problem (and my intended CSG use.) Working on it now;
will post the updated code asap.


Post a reply to this message


Attachments:
Download 'cubic_pattern_csg_test.jpg' (984 KB)

Preview of image 'cubic_pattern_csg_test.jpg'
cubic_pattern_csg_test.jpg


 

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 31 Dec 2017 19:40:00
Message: <web.5a49819f1231bd0289df8d30@news.povray.org>
> > William F Pokorny <ano### [at] anonymousorg> wrote:
> >
> > Thanks for the information! On my list to try such a set up while
> > creating my df3 cubic maps.
>
>  [Kenneth wrote...]
> Each of the six cube faces is actually
> a volumetric pyramid, with the apexs all meeting at the center of the cube.
> If I understand df3s, that would present a visual problem.
>
> But I'm working out a way around that oddity...so that there are only THREE
> continuous non-pyramidal volumetric textures throughout the cube, oriented
> in x,y and z.

Well, there are some features of this cubic pattern that I didn't grasp at
first.

The docs say that the unit box must initially be centered on the origin before
the six textures are applied. (Otherwise, the texture applications look strange
and unexpected.) The 'center apex' of the six texture 'pyramids' is AT the
origin, <0,0,0>-- but the 'bases' of the six  pyramids actually extend out to
infinity in their respective directions-- i.e., gigantic pyramids!  A unit box
just samples a tiny chunk of the pattern at the origin. But by  making the
initial  box like this for example...

box{ 0,1 translate -.5 translate 1*x...}

.....before the textures are applied,  you can move the box AWAY from the apex
into JUST texture #1's pyramid volume (the 'right-most' pyramid'). Then the box
will have only ONE texure applied all the way through it-- and the other five
textures are not even needed! Of course, the end result is the same as if you
never used the cubic pattern in the first place, and just applied an image_map
to a box in the usual way. 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 don't yet know how or if this cubic pattern could be used for MEDIA inside the
box. Or the use of df3 patterns.

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 also found that the 'once' keyword *can* be used in the image_maps; the reason
it made a  face texture disappear was because my texture applications were in
the 'wrong  place' on some of the faces-- now fixed (see code below). Actually,
the 'once' behavior is only noticiable if you scale down an image_map; otherwise
it doesn't change the appearance on the box face.

In my initial code post, I also neglected to take SCALING of the image_maps into
account. I've since come up with better translations etc. to make this uniform--
each image_map now scales up from its lower left-hand corner, if you want to do
that. (The scaling point can be changed to the *center* of each face, BTW, with
some different translations.)

box{0,1
     translate -.5
     texture{
            cubic

   // RIGHT-SIDE
   texture{pigment{image_map{jpeg "CUBIC image 1.jpg"}
   rotate -90*y translate <0,-.5,-.5>}

   // TOP
   texture{pigment{image_map{jpeg "CUBIC image 2.jpg"}
   rotate 90*x translate <-.5,0,-.5>}

   // REAR
   texture{pigment{image_map{jpeg "CUBIC image 3.jpg"}
   scale <-1,1,1> translate <.5,-.5,0>}

   // LEFT_SIDE
   texture{pigment{image_map{jpeg "CUBIC image 4.jpg"}
   rotate 90*y translate <0,-.5,.5>}

   // BOTTOM
   texture{pigment{image_map{jpeg "CUBIC image 5.jpg"}
   rotate -90*x translate <-.5,0,.5>}

   // FRONT
   texture{pigment{image_map{jpeg "CUBIC image 6.jpg"}
   translate <-.5,-.5,0>}
         }
}


Post a reply to this message

From: William F Pokorny
Subject: Re: using the CUBIC pattern with image_maps
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


 

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 17 Jan 2018 04:40:00
Message: <web.5a5f18a91231bd02a47873e10@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

>
> 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:
[snip]

Yes, that's the idea that I had in mind-- and it looks like you've solved it! I
need to digest your idea further, to fully understand it. Nicely done. And
thanks for posting your image example.

>
> 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?
>

I actually haven't tried applying an alpha-channel image_map to one of the
faces; I should do that, to see the results.

'transmit all ..some value..' can be used with an image_map, to make it
semi-transparent or even to fade it out completely. It works with JPEG and PNG
images, although I haven't tried other types. (I'm not too familiar with indexed
images or how POV-ray handles them.)  A recent fix by Clipka even allows
*alpha-channel* images to be likewise faded, even though they already have an
alpha-channel mask (a feature that was 'broken' for a long time.)


Post a reply to this message

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 20 Jan 2018 12:40:00
Message: <web.5a637e511231bd02a47873e10@news.povray.org>
It occurs to me that there is another major use for this cubic pattern: as a
'cubic' environnment map. (Maybe that was the original reason for its creation?)

Fot distant environmment maps that envelop a scene--as for radiosity use or
reflections-- I always use a sphere or hemisphere as the object, with a texture
or suitable photograph on it. But 'cubic'-shaped maps can also be used. (I've
never worked with computer games or GPU processing, but it looks like cubic maps
are the main technique used there, not spherical maps.) One of the reasons seems
to be that a cubic map makes better use of the texture's pixels-- less
distortion when mapping the original texture onto the cube faces vs. the inner
surface of a sphere.

I came across an old Paul Bourke article that explains it better...

http://paulbourke.net/miscellaneous/cubemaps/


Post a reply to this message

From: Stephen
Subject: Re: using the CUBIC pattern with image_maps
Date: 20 Jan 2018 14:21:54
Message: <5a6396d2$1@news.povray.org>
On 20/01/2018 17:37, Kenneth wrote:
> It occurs to me that there is another major use for this cubic pattern: as a
> 'cubic' environnment map. (Maybe that was the original reason for its creation?)
> 
> Fot distant environmment maps that envelop a scene--as for radiosity use or
> reflections-- I always use a sphere or hemisphere as the object, with a texture
> or suitable photograph on it. But 'cubic'-shaped maps can also be used. (I've
> never worked with computer games or GPU processing, but it looks like cubic maps
> are the main technique used there, not spherical maps.) One of the reasons seems
> to be that a cubic map makes better use of the texture's pixels-- less
> distortion when mapping the original texture onto the cube faces vs. the inner
> surface of a sphere.
> 
> I came across an old Paul Bourke article that explains it better...
> 
> http://paulbourke.net/miscellaneous/cubemaps/
> 
> 
> 
> 

Worked out from first principles. Impressive. :-)

Have a look at this site.
http://www.pauldebevec.com/Probes/

And scroll down to:
Probes in the Vertical Cross Cube Format



-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: using the CUBIC pattern with image_maps
Date: 20 Jan 2018 14:45:00
Message: <web.5a639b811231bd025cafe28e0@news.povray.org>
http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm


Post a reply to this message

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 21 Jan 2018 11:35:06
Message: <web.5a64c0ff1231bd02a47873e10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm

Thanks; I hadn't seen that.


Post a reply to this message

From: news povray org
Subject: Re: using the CUBIC pattern with image_maps
Date: 22 Jan 2018 11:15:16
Message: <5a660e14$1@news.povray.org>
Am 20.01.2018 um 20:41 schrieb Bald Eagle:
> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
> 
OT

I would like to inform you and all who have benefited from this
site that Friedrich Lohmüller died on 22.12.2017. RIP

http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png


Post a reply to this message

From: Kenneth
Subject: Re: using the CUBIC pattern with image_maps
Date: 22 Jan 2018 13:15:01
Message: <web.5a66291f1231bd02a47873e10@news.povray.org>
"news.povray.org" <fbl### [at] webde> wrote:
> Am 20.01.2018 um 20:41 schrieb Bald Eagle:
> > http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
> >
> OT
>
> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP
>
> http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png

That is very sad to hear. He did *so* much good work for the POV-Ray community,
and will be greatly missed.


Post a reply to this message

From: Stephen
Subject: Re: using the CUBIC pattern with image_maps
Date: 22 Jan 2018 13:18:43
Message: <5a662b03@news.povray.org>
On 22/01/2018 16:15, news.povray.org wrote:
> Am 20.01.2018 um 20:41 schrieb Bald Eagle:
>> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
>>
> OT
> 
> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP
> 
> http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png
> 

I am sorry to hear that. My condolences to his family

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: using the CUBIC pattern with image_maps
Date: 22 Jan 2018 18:35:00
Message: <web.5a6674a81231bd025cafe28e0@news.povray.org>
"news.povray.org" <fbl### [at] webde> wrote:

> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP

:(

This is very sad indeed.

Mr. Lohmueller certainly had a lot of energy and passion for his studies and
hobbies, and it's evident that he was willing to share what he knew in a
structured, logical, easy to understand manner.
I'm sure those who knew him will miss an excellent coworker, teacher, and
friend.


Post a reply to this message

From: dick balaska
Subject: Re: using the CUBIC pattern with image_maps
Date: 22 Jan 2018 20:27:39
Message: <5a668f8b$1@news.povray.org>
On 01/22/2018 11:15 AM, news.povray.org wrote:
> Am 20.01.2018 um 20:41 schrieb Bald Eagle:
>> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
>>
> OT
> 
> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP
> 
> http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png
> 

Condolences.

We should see if we can get a copy of his site before it goes away. 
Perhaps mirror it somewhere?

-- 
dik
Rendered 920576 of 921600 pixels (99%)


Post a reply to this message

From: Thomas de Groot
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 03:00:52
Message: <5a66ebb4$1@news.povray.org>
On 22-1-2018 17:15, news.povray.org wrote:
> Am 20.01.2018 um 20:41 schrieb Bald Eagle:
>> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
>>
> OT
> 
> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP
> 
> http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png
> 

This is sad to hear indeed. My sincere condolences to his family.

-- 
Thomas


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 04:19:57
Message: <5a66fe3d$1@news.povray.org>
Hi(gh)!

On 23.01.2018 02:27, dick balaska wrote:

> We should see if we can get a copy of his site before it goes away. 
> Perhaps mirror it somewhere?

According to the copyright notes on the web page this would be illegal 
without permission - we should ask his widow before doing this!

And, yes, I think Friedrich Lohmüller's tutorials are worth to be 
preserved for the POV-Ray community!

Should we also contact the POV-Ray team to have it mirrored on its 
server? I think so...

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 04:43:06
Message: <5a6703aa@news.povray.org>
Hi(gh)!

As a German native speaker, I would like to ask Mrs. Andrea Lohmüller on 
behalf of the POV-Ray community to preserve these pages or, if not 
possibly, to allow to transfer them to another server.

May I do this?

See you in Khyberspace!

Yadgar


Post a reply to this message

From: William F Pokorny
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 09:38:48
Message: <5a6748f8$1@news.povray.org>
On 01/22/2018 11:15 AM, news.povray.org wrote:
> Am 20.01.2018 um 20:41 schrieb Bald Eagle:
>> http://www.f-lohmueller.de/pov_tut/backgrnd/p_sky9.htm
>>
> OT
> 
> I would like to inform you and all who have benefited from this
> site that Friedrich Lohmüller died on 22.12.2017. RIP
> 

I'm saddened to hear this news. His POV-Ray web site lessons have 
certainly been of great help to me over the years. My condolences to his 
family and friends.

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 10:10:00
Message: <web.5a67501f1231bd02c437ac910@news.povray.org>
http://static.iannounce.mobi/static/1514491351/images/93/31/52363193_large.png

http://www.f-lohmueller.de/pov_tut/using/a_light1.jpg


Post a reply to this message

From: clipka
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 11:50:06
Message: <5a6767be@news.povray.org>
Am 23.01.2018 um 10:43 schrieb Jörg "Yadgar" Bleimann:
> Hi(gh)!
> 
> As a German native speaker, I would like to ask Mrs. Andrea Lohmüller on
> behalf of the POV-Ray community to preserve these pages or, if not
> possibly, to allow to transfer them to another server.
> 
> May I do this?

I've only read about these sad news just now.

I think it would be fitting if I contact Mrs. Lohmüller. Not only as a
German member of the POV-Ray dev team, but also as someone who has lost
two close relatives myself in the past year.

I'll try to contact her by snail mail, hoping that the address is still
up to date.


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: using the CUBIC pattern with image_maps
Date: 23 Jan 2018 13:12:01
Message: <5a677af1$1@news.povray.org>
Hi(gh)!

On 23.01.2018 17:50, clipka wrote:

> I think it would be fitting if I contact Mrs. Lohmüller. Not only as a
> German member of the POV-Ray dev team, but also as someone who has lost
> two close relatives myself in the past year.
> 
> I'll try to contact her by snail mail, hoping that the address is still
> up to date.

O.k., that's a good idea! As a member of the POV-Ray development team, 
you certainly are better suited to do this task than a (relative) 
outsider like me!

Will you let us know of the results of your efforts?

See you in Khyberspace!

Yadgar


Post a reply to this message

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