|
|
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
|
|