POV-Ray : Newsgroups : povray.general : How to alter existing texture? : Re: How to alter existing texture? Server Time
19 Aug 2022 19:35:43 EDT (-0400)
  Re: How to alter existing texture?  
From: Bald Eagle
Date: 19 Dec 2021 17:30:00
Message: <web.61bfb1b6f25cddba1f9dae3025979125@news.povray.org>
Timothy Groves <tim### [at] gmailcom> wrote:
> So I've been working with stones.inc, and using T_Stone29.  But for a
> portion of the object being modeled, I want to use the same texture,
> only darker.  Rather than hand-editing the entire texture, is there a
> quick and dirty way to say, "this texture, only darker?"

There is not.   If you take a look at a very complex texture, there may be a lot
of different parts to it with many different pigments.   So it's impossible for
POV-Ray to "know" - or the developers to divine - which specific part you'd want
to tweak, or which parts should be tweaked.

What I and others normally do is copy-paste the desired texture definition into
your scene, or a separate include file, and then maybe invoke it as a macro.

You pass an argument or two to the the macro, and use that as a multiplier for
your pigment(s) in the texture definition.

That way you can just do something like:

object {myObject texture myTextureMacro (Shade1, Shade2)}

and then you can have multiple shades of the same texture at your fingertips any
time you like.

It's a PITA initially, but usually isn't _too_ hard to do.

See how I use the variable "Tone" as a multiplier:

http://news.povray.org/povray.text.scene-files/thread/%3Cweb.5ac57be22ec21c585cafe28e0%40news.povray.org%3E/

http://news.povray.org/povray.general/thread/%3C5abecb94%40news.povray.org%3E/?mtop=421797


Post a reply to this message

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