POV-Ray : Newsgroups : povray.programming : change all textures : Re: change all textures Server Time
27 Sep 2024 19:13:27 EDT (-0400)
  Re: change all textures  
From: Rafal 'Raf256' Maj
Date: 10 Jan 2005 02:51:40
Message: <Xns95DA5A3C485F0raf256com@203.29.75.35>
abx### [at] abxartpl news:0jb4u0dnv9cduq1bg86sfkrl0h1p2oanpc@4ax.com

>> I need to do it in a program
> The question is, which program? Since your (suggested) change would

I ment: to write a patch for MegaPov 1.1 (since this is renderer I use 
currently for this task in with I need to strip textures).

> not remove all memory allocations, the parsing/scene building could be
> not optimal. And you could get not perfectly optimized build of the
> renderer. 

strip_textures should walk entire tree of given object, and free memory 
used by textures/materials of each part of this object. AFAIK after that 
operation object would behave as if there where no materials declared 
before, so applying final texture to it will effect all objects inside 
TheObject.

Hmm where exacly I could add my strip_materials token? And where to put 
function StripMaterials() - and how to access in it pointer to currently 
parsed object?

object { 
  TheObject // complex union for example

  strip_textures // I want here to call StripTextures() and give to it
    	// pointer to current object. BTW. afaik "current object" is a copy
    	// of TheObject, since Pov-RAY doesnt yet support referencing objects
    	// (instead of mesh and mesh2) - with actualy is good in this case
  
  material { ... } // since now my object has no material applyed, so this
    	// material will apply to entire object including all it parts?

}

> I suggest other solution. I expect the writer application is
> open source (one of modelers, right?). I imagine it could be possible
> to modify it's export routine from: 
>   #declare Object$(ID) = object{ ...AAA... pigment{ ...BBB... } }

It was ofcourse my first idea. The object is a 3d MAX object imported 
through Poseray. Doing such changes manualy, to probably 100 or more 
objects - isnt so easy. Writting script to do it automaticly hmm I dont 
know... I think also that strip_materials patch will be usable so why not 
implement it.



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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