POV-Ray : Newsgroups : povray.general : 3.1 materials Server Time
16 Nov 2024 13:23:05 EST (-0500)
  3.1 materials (Message 1 to 3 of 3)  
From: PoD
Subject: 3.1 materials
Date: 18 Jul 1998 14:34:24
Message: <35B0DBDF.590E@merlin.net.au>
I'm not sure if I'm just being thick but is there a way to #declare an
entire material in 3.1 including both textures and interiors?  I've
looked for such a thing but can't find it.

Thanks, PoD.


Post a reply to this message

From: K  Tyler
Subject: Re: 3.1 materials
Date: 18 Jul 1998 19:08:31
Message: <35B10EC4.194795D4@pacbell.net>
PoD wrote:

> I'm not sure if I'm just being thick but is there a way to #declare an
> entire material in 3.1 including both textures and interiors?  I've
> looked for such a thing but can't find it.
>
> Thanks, PoD.

  I too would be interested in the answere to that question.
Otherwise I have 60 #declared glass textures I've created
that are now obsolete.

Thanks K.Tyler


Post a reply to this message

From: Pan
Subject: Re: 3.1 materials
Date: 19 Jul 1998 06:29:07
Message: <35b1bc63.0@news.povray.org>
K. Tyler wrote in message <35B10EC4.194795D4@pacbell.net>...
>PoD wrote:
>
>> I'm not sure if I'm just being thick but is there a way to #declare an
>> entire material in 3.1 including both textures and interiors?  I've
>> looked for such a thing but can't find it.
>>
>> Thanks, PoD.
>
>  I too would be interested in the answere to that question.
>Otherwise I have 60 #declared glass textures I've created
>that are now obsolete.
>
>Thanks K.Tyler
>

This is untested but should contain enough to get you started in
the right direction. All your declared textures should be rewritten
to take out what now belongs in interiors ... A little cut and paste
should do that ....

Make a collection of declared interiors ...

You could invoke the texture and interior collections with a couple
of #include statements and then

#declare MyTexture = _name_of_texture_in_include_file_
#declare MyInterior =  _name_of_interior_in_include_file_

#macro TextureWithInterior()
 MyTexture
 MyInterior
#end

#declare MyObject = ...

Object{
 MyObject
 TextureWithInterior()
}

/* For the next object ... */

#declare MyObject2 = ...

#declare MyTexture = _name_of_next_texture_in_include_file_
#declare MyInterior =  _name_of_next_interior_in_include_file_
Object{
 MyObject2
 TextureWithInterior()
}

Once the macro is defined you should be able to redefine
its components so that on subsequent invocations the
macro operates using the new settings

Recall that macros take *zero* or more
parameters when declared or invoked, so
as long as you put the parantheses in
you should be ok

I am sure there are some mistakes in what I have hurriedly
written here ... I hope others will add to (or subtract from)
this quick note. The basic idea should be correct.

des

Using arrays could make it even more fancy ...


Post a reply to this message

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