POV-Ray : Newsgroups : povray.newusers : checkered plane not looking as (I) expected Server Time
6 Sep 2024 02:19:58 EDT (-0400)
  checkered plane not looking as (I) expected (Message 1 to 6 of 6)  
From: Guido Heer
Subject: checkered plane not looking as (I) expected
Date: 13 Jun 1999 16:34:10
Message: <376415CE.4B2BE93F@pobox.com>
Hi Experts,

I've done a few things with 3D graphics before, but I'm completely new
to PovRay.

Doing my first steps with the tutorial in the help file ("Pov Ray
Documentation" of PovRay 3.02 for Windows) I tried to put a checkered
plane into my scene. Changing the normal vector of the plane to
something different than y, I walked into something that confused me.

Using the normal vector "y, -3" gives the expected result, but if I use
"<-1, 1, 0>, -5" the plane starts looking weird and with "<-1, 1, -2>,
-5" it looks really wrong.

First I thought of some kind of bug in Pov but (as always in computer
programming) the error must be something I haven't understood yet.

What am I missing?

In case the error is somewhere in my scene file I attached it.

Greetings, Guido
-- 
>- Live long and prosper. -<>- Guido Heer, Basel, Switzerland -<
>- http://pobox.com/~heer -<>- Home of the german Newton FAQs -<
>- Get my public PGP key @ http://pobox.com/~heer/pgpkey.html -<


Post a reply to this message


Attachments:
Download 'checker.pov.txt' (1 KB)

From: Remco de Korte
Subject: Re: checkered plane not looking as (I) expected
Date: 13 Jun 1999 17:12:36
Message: <37641F0F.60B7E330@xs4all.nl>
It looks wrong allright! (but it isn't)

You've rotated the plane but not the pigment.

Remco


Post a reply to this message

From: Alan Kong
Subject: Re: checkered plane not looking as (I) expected
Date: 13 Jun 1999 22:26:00
Message: <376567ec.160433619@news.povray.org>
On Sun, 13 Jun 1999 22:34:22 +0200, Guido Heer <hee### [at] poboxcom> wrote:

>Doing my first steps with the tutorial in the help file ("Pov Ray
>Documentation" of PovRay 3.02 for Windows) I tried to put a checkered
>plane into my scene. Changing the normal vector of the plane to
>something different than y, I walked into something that confused me.

  Hi, Guido. You might check the docs again because to change the
surface normal of the plane you need only use x,y, and z, respectively
for <1,0,0>, <0,1,0>, and <0,0,1>.

  For example, your code with my modifications:

>#include "colors.inc"
>
>camera
>{
>	location <0, 2, -5>
>	look_at <0, 1, 2>
>}
>
>sphere
>{
>	<0, 2, 0>, 0.5
>	texture
>	{
>		pigment { color Yellow }
>	}
>}
>
>plane
>{
>	y, -3				// looks as expected

// to change the surface normal vector use:
// x, -1
// z, -1

>//	<-1, 1, 0>, -5		// looks weird
>//      <-1, 1, -2>, -5		// looks completely wrong
>	pigment
>	{
>		checker color White, color Black
>	}

// or, to rotate the plane on a given axis use:
        rotate 25*z

>}
>
>light_source {
>	<2, 4, -3>
>	color White
>}

  You might also consider downloading the latest version of POV-Ray
v3.1e.

-- 
Alan
--------------------------------------------------------------------
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
news.povray.org - where POV-Ray enthusiasts around the world can get
together to exchange ideas, information, and experiences with others
--------------------------------------------------------------------


Post a reply to this message

From: Jean Montambeault
Subject: Re: checkered plane not looking as (I) expected
Date: 19 Jun 1999 17:36:18
Message: <376c0d52@news.povray.org>
I'd follow Alan's advice to stick to simple normal orientations,
for the least, but I find it even easier to use only normal = y and
then transform by rotating, translating, etc. This way I can link the
object (any object, not just a plane) to its texture in a declaration
and do without fussing with the normal (just try to find the right
rotation to align the pigment on, let's say, normal <.4, .55, 22.2> ;}
I don't want to spend my brain muscle on that kind of exercice).

    Check this exemple :


global_settings {
        assumed_gamma 1.0}


#include "colors.inc"

#declare Orientation = <0, 1, 0>;

#declare Kodak = camera {
                location <0,1,-4>
                look_at <0,0,0>
                }

#declare Point1 = light_source { <2, 20, -30> White }

#declare Plancher = plane {Orientation, 0
        pigment {checker Red, White}
        }

camera {Kodak}

object {Point1}

object {Plancher
//        rotate x*-45
//        rotate y*-45
        rotate z*-45}


Post a reply to this message

From: Guido Heer
Subject: Re: checkered plane not looking as (I) expected
Date: 20 Jun 1999 16:46:33
Message: <376D51A6.A2175586@pobox.com>
Hi Jean,

Jean Montambeault wrote:
>     I'd follow Alan's advice to stick to simple normal orientations,
> for the least, but I find it even easier to use only normal = y and
> then transform by rotating, translating, etc.

First I thought of a texture as some two dimensional thing being wrapped
around an object. With this picture in mind it made no no sense to me to
rotate a texture with an object (because I wouldn't have much influence
on the positioning anyway).

Now as I got some explanations I see that a texture is something like a
"space coloring rule" intersecting an object. What I see in the output
is the surface of the through and through colored object.
In this case it makes sense for me to "attach" a texture to an object.

> This way I can link the
> object (any object, not just a plane) to its texture in a declaration
> and do without fussing with the normal (just try to find the right
> rotation to align the pigment on, let's say, normal <.4, .55, 22.2> ;}
> I don't want to spend my brain muscle on that kind of exercice).

Ok, got it. I have to put my texture onto (into?) my object BEFORE
rotating and scaling it because this is the only way to guarantee the
texture's correct orientation relative to the object. When I rotate both
in common the patches/stripes on the object don't change their position.

Correct?

Thanks, Guido.
-- 
>- Live long and prosper. -<>- Guido Heer, Basel, Switzerland -<
>- http://pobox.com/~heer -<>- Home of the german Newton FAQs -<
>- Get my public PGP key @ http://pobox.com/~heer/pgpkey.html -<


Post a reply to this message

From: Bob
Subject: Re: checkered plane not looking as (I) expected
Date: 21 Jun 1999 00:35:58
Message: <376DC12C.D49E9657@aol.com>
You are right sir. Even image_maps fill all the space of an object in the direction or
orientation they are applied. And when scaling rotating translating is done it is
applied when and where it is put, meaning you can put these keywords into the object
alone, the texture alone, pigment alone, etcetera, or any combination thereof. The
place
you apply these is where it gets done and the order they are applied within the
possible
statements will effect them in that order. You can not always put such transformations
anywhere at will either; for instance, if 'scale' were placed before any relavant
parameters for a primitive or predefined object inside a object statement it will
generate an error.


Guido Heer wrote:
> 
> Ok, got it. I have to put my texture onto (into?) my object BEFORE
> rotating and scaling it because this is the only way to guarantee the
> texture's correct orientation relative to the object. When I rotate both
> in common the patches/stripes on the object don't change their position.
> 
> Correct?
> 

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto://inversez@aol.com?Subject=PoV-News


Post a reply to this message

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