POV-Ray : Newsgroups : povray.general : Imagemap sharing? Server Time
5 Nov 2024 18:21:23 EST (-0500)
  Imagemap sharing? (Message 1 to 8 of 8)  
From: Vaclav Cermak
Subject: Imagemap sharing?
Date: 27 Oct 2006 04:13:16
Message: <4541bf9c$1@news.povray.org>
Hello,

   I have similar scene:

#declare Pig = pigment {
   image_map { ... something }
}
#declare Tex = texture {
   pigment {Pig}
   ...
}

#declare Poly = polygon {
    ...
    texture {Tex}
}

... a lot of Polys used later in the scene ...

I seems, that image_map is copied for every "Poly" placed into the scene 
and it leads to high memory requirements ... Is any way how to have only 
one instance of image_map into the scene?

Thanks

Vaclav


Post a reply to this message

From: Penelope20k
Subject: Re: Imagemap sharing?
Date: 27 Oct 2006 05:22:58
Message: <4541cff2$1@news.povray.org>
In fact its normal cause you place a number of polygon with texture ..
you will be able to reduce memory usage by grouping all polygons of same
texture , then applying the texture on them ..

for exemple:
------------------------------
instead of doing that

#declare index=0;
#while(index<1000)   object {my_polygone   texture {my_texture}}  #declare
index=index+1; #end

which use a lot of memory (cause texture is loaded each time) you should do
that
#declare index=0;   union {    #while(index<1000)  object {my_polygon}
#declare index=index+1;#end       texture {my_texture} }
--------------------------









news:4541bf9c$1@news.povray.org...
>
> Hello,
>
>    I have similar scene:
>
> #declare Pig = pigment {
>    image_map { ... something }
> }
> #declare Tex = texture {
>    pigment {Pig}
>    ...
> }
>
> #declare Poly = polygon {
>     ...
>     texture {Tex}
> }
>
> ... a lot of Polys used later in the scene ...
>
> I seems, that image_map is copied for every "Poly" placed into the scene
> and it leads to high memory requirements ... Is any way how to have only
> one instance of image_map into the scene?
>
> Thanks
>
> Vaclav


Post a reply to this message

From: Vaclav Cermak
Subject: Re: Imagemap sharing?
Date: 27 Oct 2006 06:22:07
Message: <4541ddcf$1@news.povray.org>
Penelope20k wrote:
> In fact its normal cause you place a number of polygon with texture ..
> you will be able to reduce memory usage by grouping all polygons of same
> texture , then applying the texture on them ..
> 

Sure, but this does not work, I need imagemap properly aligned with each 
polygon ....

V.


Post a reply to this message

From: Penelope20k
Subject: Re: Imagemap sharing?
Date: 27 Oct 2006 06:27:20
Message: <4541df08$1@news.povray.org>
do you just call your abjects ..or did you do CSG with them ?


news:4541ddcf$1@news.povray.org...
> Penelope20k wrote:
> > In fact its normal cause you place a number of polygon with texture ..
> > you will be able to reduce memory usage by grouping all polygons of same
> > texture , then applying the texture on them ..
> >
>
> Sure, but this does not work, I need imagemap properly aligned with each
> polygon ....
>
> V.


Post a reply to this message

From: Penelope20k
Subject: Re: Imagemap sharing?
Date: 27 Oct 2006 06:41:03
Message: <4541e23f@news.povray.org>
You must check these then ..

Avoid to call image_map when you are in a loop..
                 .... try to not read on Hard disk your image map by storing
it in a variable away from a loop

If you have multiple objects
 use #local statement for each object which will appear, or used one time ..
store your pigment and texture , by a #declare
#undef each not required elements..(if #local not possible)

HOLLOW your objects ...



else that the price to pay multiple textured object ...







news:4541cff2$1@news.povray.org...
> In fact its normal cause you place a number of polygon with texture ..
> you will be able to reduce memory usage by grouping all polygons of same
> texture , then applying the texture on them ..
>
> for exemple:
> ------------------------------
> instead of doing that
>
> #declare index=0;
> #while(index<1000)   object {my_polygone   texture {my_texture}}  #declare
> index=index+1; #end
>
> which use a lot of memory (cause texture is loaded each time) you should
do
> that
> #declare index=0;   union {    #while(index<1000)  object {my_polygon}
> #declare index=index+1;#end       texture {my_texture} }
> --------------------------
>
>
>
>
>
>
>
>

> news:4541bf9c$1@news.povray.org...
> >
> > Hello,
> >
> >    I have similar scene:
> >
> > #declare Pig = pigment {
> >    image_map { ... something }
> > }
> > #declare Tex = texture {
> >    pigment {Pig}
> >    ...
> > }
> >
> > #declare Poly = polygon {
> >     ...
> >     texture {Tex}
> > }
> >
> > ... a lot of Polys used later in the scene ...
> >
> > I seems, that image_map is copied for every "Poly" placed into the scene
> > and it leads to high memory requirements ... Is any way how to have only
> > one instance of image_map into the scene?
> >
> > Thanks
> >
> > Vaclav
>
>


Post a reply to this message

From: Alain
Subject: Re: Imagemap sharing?
Date: 27 Oct 2006 16:56:10
Message: <4542726a@news.povray.org>
Penelope20k nous apporta ses lumieres en ce 27/10/2006 06:54:
> You must check these then ..

> Avoid to call image_map when you are in a loop..
>                  .... try to not read on Hard disk your image map by storing
> it in a variable away from a loop

> If you have multiple objects
>  use #local statement for each object which will appear, or used one time ..
> store your pigment and texture , by a #declare
> #undef each not required elements..(if #local not possible)

> HOLLOW your objects ...

> else that the price to pay multiple textured object ...

Can you tell me HOW or WHY adding "hollow" to an object could affect how much 
memory it use? hollow have only one effect: it enable an object to contain some 
media, nothing else.

-- 
Alain
-------------------------------------------------
Zen Buddhism: What is the sound of shit happening?


Post a reply to this message

From: Warp
Subject: Re: Imagemap sharing?
Date: 29 Oct 2006 06:44:58
Message: <4544943a@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Can you tell me HOW or WHY adding "hollow" to an object could affect how much 
> memory it use?

  It doesn't. It's just the keyword which causes the weirdest confusions
in people, for whatever reason.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Imagemap sharing?
Date: 1 Nov 2006 21:25:59
Message: <45495737@news.povray.org>
Warp nous apporta ses lumieres en ce 29/10/2006 06:44:
> Alain <ele### [at] netscapenet> wrote:
>> Can you tell me HOW or WHY adding "hollow" to an object could affect how much 
>> memory it use?

>   It doesn't. It's just the keyword which causes the weirdest confusions
> in people, for whatever reason.

I know that. I asked the question to Penelope20k, who, aparently is confused 
about the keyword.
Maybe peoples expect it to, somehow, affect how the object is treated in CSG or 
how it's get rendered, or that it may affect it's aspect.

-- 
Alain
-------------------------------------------------
WARNING: The consumption of alcohol may cause pregnancy.


Post a reply to this message

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