POV-Ray : Newsgroups : povray.newusers : "Floor" plane with tiled/checkered image : Re: "Floor" plane with tiled/checkered image Server Time
26 Apr 2024 13:17:23 EDT (-0400)
  Re: "Floor" plane with tiled/checkered image  
From: Alain Martel
Date: 25 Oct 2022 11:46:06
Message: <635804be$1@news.povray.org>
Le 2022-10-25 à 00:20, neri-engineering a écrit :
> I'm just trying to create an infinite "floor" (plane) which uses a JPEG image,
> attached for reference, and named "wood.jpg".
> 
> For example I can create a floor of two difference colors in a checkered pattern
> like this:
> 
> plane {
>    y, 0
>    pigment {
>      checker color Brown, color Violet
>      scale 13
>    }
> }
> 
> I've been banging my head against the wall trying to use the image "wood.jpg"
> for each of the checker boxes.  Tried using "checker" keyword, tried various
> other things, I can create mesh2 objects with UV-mappings and apply a custom
> texture like so:
> 
> mesh2 {
>    mesh_name
>    uv_mapping
>    pigment {
>      image_map {
>        png "cut-chapstick-label.png"
>        map_type 0
>      }
>    }
> }
> 
> But the moment I try to apply a similar strategy to my floor, I get stretched
> image in one of the directions.
> 
> Normally I would find the answer by experimentation and/or research but in this
> case I feel like I'm on the brink of insanity trying to do this.
> 
> Thanks for the help.

Initially, image_map are applied in the X-Y plane.
To apply them to your floor, you need to rotate it.

Just add : rotate 90*x

plane{y,0
	pigment{image_map {jpeg "wood.jpg" scale Something} rotate 90*x}
}
The image will repeat infinitely to cover all of the plane.
scale Something is used to adjust the size of the image if it's not 
square or need to be larger than a 1x1 repeating tile.


Post a reply to this message

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