|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Hello,
   I'am using mesh2 for creating bush into terrain visualisation. I have 
one mesh2 bush object and I need to place several tens of thousands of 
instances into the scene. When I use mesh2 without textures, I have no 
problem with memory. But when I try to assign some textures to mesh2 
object, memory requirements are very high (several hundreds of MB). I 
have nine textures predefined before and they are randomly assigned to 
leaves in the bush.
   When I'am thinking about it, it looks like all nine textures are 
copied for each instance of my mesh2, but I'am unable to see any reason 
for it.
   Is anowhere some way how to solve this?
Thanks for any advices :)
Vaclav
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Vaclav Cermak wrote:
> 
> Hello,
> 
>   I'am using mesh2 for creating bush into terrain visualisation. I have 
> one mesh2 bush object and I need to place several tens of thousands of 
> instances into the scene. When I use mesh2 without textures, I have no 
> problem with memory. But when I try to assign some textures to mesh2 
> object, memory requirements are very high (several hundreds of MB). I 
> have nine textures predefined before and they are randomly assigned to 
> leaves in the bush.
> 
>   When I'am thinking about it, it looks like all nine textures are 
> copied for each instance of my mesh2, but I'am unable to see any reason 
> for it.
> 
>   Is anowhere some way how to solve this?
> 
> Thanks for any advices :)
> 
> Vaclav
This is what I use in PoseRay (http://user.txcyber.com/~sgalls/) to 
decrease the amount of memory required if several materials use the same 
map.
Declare the map once like this:
#declare map1=pigment{image_map{jpeg "your image.jpg" interpolate 2}}
then declare the material:
#declare mat1=texture{pigment{map1}}//add a finish if you want
then use the material in mesh2{}:
texture_list{
1,
texture{mat1}} //add more if you use more materials
This should allocate room for the map once.
good luck,
FlyerX
Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Are you using a texture_list or are you defining a texture global to
the entire mesh?
-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -
Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | I'am using texture_list.
Warp wrote:
>   Are you using a texture_list or are you defining a texture global to
> the entire mesh?
>
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  |