POV-Ray : Newsgroups : povray.general : material_map : Re: material_map Server Time
5 Aug 2024 02:22:42 EDT (-0400)
  Re: material_map  
From: Johannes Dahlstrom
Date: 30 Dec 2002 07:04:19
Message: <3e103643@news.povray.org>
Rafal 'Raf256' Maj wrote:

> Can I scale only image that is used in material_map leaving all used
> textures unchanged ?

You could use an image_pattern inside a pigment_pattern instead, it can 
essentially do everything a material_map can, but it is more versatile. 
Something like this should work:

texture {
  pigment_pattern {
    image_pattern { png "img.png" /*...*/ }
    // Do your transformations here
  }
  // Given an 8-bit grayscale image, this 
  // simulates the material_map behaviour.
  texture_map {
    [0 Tex1 ]
    [1/256 Tex1 ]
    [1/256 Tex2 ]
    [2/256 Tex2 ]
    [2/256 Tex3 ]
    [3/256 Tex3 ]
    // ...
  }
}


Post a reply to this message

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