POV-Ray : Newsgroups : povray.newusers : A cube with different bitmap images on each side. Server Time: 19 Dec 2018 11:23:27 GMT
  A cube with different bitmap images on each side. (Message 1 to 5 of 5)  
From: Lagipavi
Subject: A cube with different bitmap images on each side.
Date: 12 Nov 2017 21:40:00
Message: <web.5a08bea16ca4d5d9d8de543f0@news.povray.org>
Hello everyone,

I am trying to use different bitmap images on each side of a cube, but some
faces show only shadows. If I rotate the cube the problem changes as well - The
prior visible face turns shadowed and the shadowed image turns ok. What am I
doing wrong? Thanks in advance!


Post a reply to this message

From: Bald Eagle
Subject: Re: A cube with different bitmap images on each side.
Date: 12 Nov 2017 22:35:01
Message: <web.5a08cc0514546e2c5cafe28e0@news.povray.org>
"Lagipavi" <lag### [at] gmailcom> wrote:
> Hello everyone,
>
> I am trying to use different bitmap images on each side of a cube, but some
> faces show only shadows. If I rotate the cube the problem changes as well - The
> prior visible face turns shadowed and the shadowed image turns ok. What am I
> doing wrong? Thanks in advance!

Without seeing your specific code, it's hard to say exactly what you're doing
wrong, but perhaps looking over the details of the cubic pattern will help you
out.

3.6.2.1.6 Cubic Pattern

The cubic pattern takes six texture elements and maps each one to each of the
six pyramids centered at each half-axis, effectively mapping each texture
element to each side of a origin-centered cube.


The cubic pattern and the order of texture elements

The first group of elements map to the positive half-axis, in the X, Y and Z
axes respectively. The same order is applied to the last group of elements,
except on the negative half-axis.


The syntax is:
texture {
  cubic
    TEXTURE_ELEMENT_1
    ...
    TEXTURE_ELEMENT_6
  }



also:
http://www.f-lohmueller.de/pov_tut/tex/tex_750e.htm


Post a reply to this message

From: dick balaska
Subject: Re: A cube with different bitmap images on each side.
Date: 12 Nov 2017 23:30:39
Message: <5a08d99f$1@news.povray.org>
On 11/12/2017 04:35 PM, Lagipavi wrote:
> Hello everyone,
> 
> I am trying to use different bitmap images on each side of a cube, but some
> faces show only shadows. If I rotate the cube the problem changes as well - The
> prior visible face turns shadowed and the shadowed image turns ok. What am I
> doing wrong? Thanks in advance!
> 
> 
I would build 6 cubes, each with its own image, and then squish and 
union the cubes together.

It also sounds like you're applying the texture/image after rotating.

-- 
dik


Post a reply to this message

From: clipka
Subject: Re: A cube with different bitmap images on each side.
Date: 12 Nov 2017 23:53:45
Message: <5a08df09$1@news.povray.org>
Am 12.11.2017 um 22:35 schrieb Lagipavi:
> Hello everyone,
> 
> I am trying to use different bitmap images on each side of a cube, but some
> faces show only shadows. If I rotate the cube the problem changes as well - The
> prior visible face turns shadowed and the shadowed image turns ok. What am I
> doing wrong? Thanks in advance!

Maybe have a look at UV mapping.


Post a reply to this message

From: architype
Subject: Re: A cube with different bitmap images on each side.
Date: 18 Nov 2017 14:00:01
Message: <web.5a103c3214546e2c990be8aa0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 12.11.2017 um 22:35 schrieb Lagipavi:
> > Hello everyone,
> >
> > I am trying to use different bitmap images on each side of a cube, but some
> > faces show only shadows. If I rotate the cube the problem changes as well - The
> > prior visible face turns shadowed and the shadowed image turns ok. What am I
> > doing wrong? Thanks in advance!
>
> Maybe have a look at UV mapping.

Hmmm this is interesting. I would have done what dick balaska suggested ie:

"I would build 6 cubes, each with its own image, and then squish and
union the cubes together.

It also sounds like you're applying the texture/image after rotating."

I had no idea that you could do what bald eagle suggested ie:

"3.6.2.1.6 Cubic Pattern

The cubic pattern takes six texture elements and maps each one to each of the
six pyramids centered at each half-axis, effectively mapping each texture
element to each side of a origin-centered cube."

Thanks for this tip. ;)


Post a reply to this message

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