POV-Ray : Newsgroups : povray.general : Override textures and materials? : Re: Override textures and materials? Server Time
21 May 2024 11:16:19 EDT (-0400)
  Re: Override textures and materials?  
From: Thomas de Groot
Date: 16 Jan 2016 07:36:04
Message: <569a3934@news.povray.org>
On 16-1-2016 10:42, Stephen wrote:
> On 1/16/2016 8:10 AM, Thomas de Groot wrote:
>> On 16-1-2016 5:54, Mike Horvath wrote:
>>> Is there a way to force an override of preconfigured textures and
>>> materials of a scene? I would like to set the texture of my scene to a
>>> special texture used to render ChromaDepth 3D images. However, I don't
>>> want to go back and edit every single object in my scene. Thanks.
>>>
>>
>> My experience is that you will have to comment the old ones out or
>> delete them. Later textures do not override previous ones in a scene
>> file.
>>
> Are you sure about that Thomas?

Yes, when you have an object already textured to which you apply a 
second texture:

object{
   MyObject //with predefined texture
   texture {MyTexture}
}
This does not work.

>
> I use Bishop3D which does not support PovRay 3.7. So if I want to use
> PovRay 3.7 textures I will use a 3.6 texture in the Bishop3D scene but
> redifine the tecture before the object is declared.
>

You may get away with that provided you use identical texture names 
declared /before/ the object is opened/used.

As you say in answer to Kenneth, using an alternative texture file can 
do the trick, especially in typical mesh2 file builds.

#include "MyObjectTexture.inc"
#declare MyObject = mesh2{....}

As long as the texture names defined inside the alternative .inc file 
are identical to those defined inside the mesh2 file.

-- 
Thomas


Post a reply to this message

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