POV-Ray : Newsgroups : povray.newusers : using BMP as background for galaxies Server Time
6 Sep 2024 00:23:25 EDT (-0400)
  using BMP as background for galaxies (Message 1 to 4 of 4)  
From: Chuck Roberts
Subject: using BMP as background for galaxies
Date: 25 Aug 1999 15:15:16
Message: <37C44104.12D404A0@accn.org>
I'm using the Galaxy maker to make a BMP of a space background. But when
I map it to a plane, POV for windows 3.02 gives me an illegal operation. 
How do I use a BMP as a background to a plane where Z is the plane
normal? 

Here is my code:
plane
{
  z, // <X Y Z> unit surface normal, vector points "away from surface"
  1.0 // distance from the origin in the direction of the surface normal
   clipped_by {box { <0, 0, -1>, <1, 1, 1> } }

// texture pigment {} attribute
// create a texture that lays an image's colors onto a surface
// image maps into X-Y plane from <0,0,0> to <1,1,0>
   texture { pigment {
   image_map
   {
     sys "galaxy.bmp" // the file to read (iff/gif/tga/png/sys)
     map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
     interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized
distance
     once
   } // image_map
   }
   }

}


Post a reply to this message

From: Ken
Subject: Re: using BMP as background for galaxies
Date: 25 Aug 1999 16:16:49
Message: <37C44EFB.6DF03FD5@pacbell.net>
Chuck Roberts wrote:
> 
> I'm using the Galaxy maker to make a BMP of a space background. But when
> I map it to a plane, POV for windows 3.02 gives me an illegal operation.
> How do I use a BMP as a background to a plane where Z is the plane
> normal?


 plane { z, 1.0
  texture {
    pigment {
      image_map { sys "c:\images\galaxy.bmp"  map_type 0 interpolate 2 once
     }
   }
  }
 clipped_by {box { <0, 0, -1>, <1, 1, 1> } }
}

You are probably not including the path to the bit map image. If it is not
in one of your library paths or in the same diectroy as the .pov file pov
does not know where to find it. See example above for syntax.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Chuck Roberts
Subject: Re: using BMP as background for galaxies
Date: 25 Aug 1999 16:26:47
Message: <37C451C6.CE434F5@accn.org>
The BMP was in the same directory as the POV file. It rendered the plane
image fine, but after POV rendered the last line, I got the Invalid
Operation error in pvengine.exe.


Post a reply to this message

From: Ken
Subject: Re: using BMP as background for galaxies
Date: 25 Aug 1999 16:39:58
Message: <37C45468.3CECC416@pacbell.net>
Chuck Roberts wrote:
> 
> The BMP was in the same directory as the POV file. It rendered the plane
> image fine, but after POV rendered the last line, I got the Invalid
> Operation error in pvengine.exe.

Instead of clipping a plane you might try simply applying your image to
a flat box instead. For the sake of learning how to use image maps let
me give you my standard format example:

box {-0.5, 0.5 // a unit sized box
 pigment {
  image_map { sys "image.bmp interpolate 2 }
   translate -0.5 // center the image to the box
 } 
   scale <1,1,0.1> // scale box and image together to your size needed
  translate <somewhere>
}

I always start with a unit sized object like the one shown and then the
object and the image can be scaled and translated together.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

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