|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi!
I could appreciate some help, because im stuck.
I want to render about 2 million spheres and about 10 million cone-s which
connecting them on a scene, but the parser fills all of my memory (16gb). I have
every sphere individually in the pov file, because their coordinate and color
are different. It doesnt matter which quality im using because i cant even pass
the parsing.
Is there any good method to reduce memory usage, or the only option is more
memory?
Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"zoli0726" <nomail@nomail> wrote:
> Hi!
>
> I could appreciate some help, because im stuck.
>
> I want to render about 2 million spheres and about 10 million cone-s which
> connecting them on a scene, but the parser fills all of my memory (16gb). I have
> every sphere individually in the pov file, because their coordinate and color
> are different. It doesnt matter which quality im using because i cant even pass
> the parsing.
> Is there any good method to reduce memory usage, or the only option is more
> memory?
>
> Thanks.
We would need a bit more information. What kind of materials do these objects
have? Are they meshes or procedural objects?
-Nekar Xenos-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 1-12-2014 2:17, zoli0726 wrote:
> Hi!
>
> I could appreciate some help, because im stuck.
>
> I want to render about 2 million spheres and about 10 million cone-s which
> connecting them on a scene, but the parser fills all of my memory (16gb). I have
> every sphere individually in the pov file, because their coordinate and color
> are different. It doesnt matter which quality im using because i cant even pass
> the parsing.
> Is there any good method to reduce memory usage, or the only option is more
> memory?
>
> Thanks.
>
>
If all the sphere and cone definitions are also written individually,
that is overkill. Better define one single sphere and one single cone at
the origin, and make instances of them, only reading locations and
colours sequentially from the file. That way POV-Ray only needs to keep
one single object in memory. However, you would then need also some
scale and rotation values in your file for connecting the instances.
Still, that is the best solution to my mind.
Short example (without the needed scale and rotation parameters):
//start code
#declare MySphere = sphere {<0,0,0>, 1}
#declare MyCone = cone {<0,0,0>, 1, <0,1,0>, 0.5}
#fopen MyFile "SphereAndCone.inc" read
#while (defined (MyFile))
#read {MyFile, Spherelocation, Spherecolour, ConeLocation, ConeColour)
object {MySphere pigment {SphereColour} translate SphereLocation}
object {MyCone pigment {ConeColour} translate ConeLocation}
#end
#fclose MyFile
//end code
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 01/12/2014 09:34, Thomas de Groot a écrit :
> On 1-12-2014 2:17, zoli0726 wrote:
>> Hi!
>>
>> I could appreciate some help, because im stuck.
>>
>> I want to render about 2 million spheres and about 10 million cone-s
>> which
>> connecting them on a scene, but the parser fills all of my memory
>> (16gb). I have
>> every sphere individually in the pov file, because their coordinate
>> and color
>> are different. It doesnt matter which quality im using because i cant
>> even pass
>> the parsing.
>> Is there any good method to reduce memory usage, or the only option is
>> more
>> memory?
>>
>> Thanks.
>>
>>
>
> If all the sphere and cone definitions are also written individually,
> that is overkill. Better define one single sphere and one single cone at
> the origin, and make instances of them, only reading locations and
> colours sequentially from the file. That way POV-Ray only needs to keep
> one single object in memory. However, you would then need also some
> scale and rotation values in your file for connecting the instances.
> Still, that is the best solution to my mind.
>
It would work with meshes, but referencing a true sphere just make a
copy of it (well, if the texture is the same, that might save you the
texture block, but the transformation will be duplicated anyway, or
rather overwritten on the copy).
Swapping memory is free... sort of, it comes at the cost of a crawling
system.
Now, I would call for a sanity check, because not all spheres and cones
are to be visible on a picture of less than 12 megapixels. You need at
least one pixel per object for such scene to be useful... or you expect
a lot of reflection & refraction.
> Short example (without the needed scale and rotation parameters):
>
> //start code
> #declare MySphere = sphere {<0,0,0>, 1}
> #declare MyCone = cone {<0,0,0>, 1, <0,1,0>, 0.5}
>
> #fopen MyFile "SphereAndCone.inc" read
>
> #while (defined (MyFile))
> #read {MyFile, Spherelocation, Spherecolour, ConeLocation, ConeColour)
> object {MySphere pigment {SphereColour} translate SphereLocation}
> object {MyCone pigment {ConeColour} translate ConeLocation}
> #end
>
> #fclose MyFile
> //end code
>
> Thomas
>
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 1-12-2014 16:01, Le_Forgeron wrote:
> It would work with meshes, but referencing a true sphere just make a
> copy of it (well, if the texture is the same, that might save you the
> texture block, but the transformation will be duplicated anyway, or
> rather overwritten on the copy).
err... yes, that is indeed correct. Maybe worthwhile to see if a union
of a sphere and several cones might be possible. Then, referencing the
union would free memory in my view, or am I wrong there?
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"zoli0726" <nomail@nomail> wrote:
> Hi!
>
> I could appreciate some help, because im stuck.
>
> I want to render about 2 million spheres and about 10 million cone-s which
> connecting them on a scene, but the parser fills all of my memory (16gb). I have
> every sphere individually in the pov file, because their coordinate and color
> are different. It doesnt matter which quality im using because i cant even pass
> the parsing.
> Is there any good method to reduce memory usage, or the only option is more
> memory?
>
> Thanks.
I think, it is not possible to answer your question in general. Stephen is
completely right in requesting your code, so that one can judge, what you intend
to do. Le Forgeron is completely right that the main part of your
million objects will not be visible in your final scene - most likely. First due
to the size of the image in pixels and second because it is likely that a lot of
your objects are hidden by others. Try to leave the invisible
ones out.
I have only a very vague idea of your intended image (brain synapses may be),
but if I'm right, you should try to find a way to determine what sphere is in a
first layer, which in a second, which in a third (and so on) in distance to the
camera, display only the first four layers (and forget about all spheres and
cones beyond) and use focal blur to display only the first (and maybe second)
layer of spheres in focus and blur the rest away. The third and fourth layer
will give enough impression of "depth" without the need of displaying all your
spheres.
Best regards,
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi!
>
> I could appreciate some help, because im stuck.
>
> I want to render about 2 million spheres and about 10 million cone-s which
> connecting them on a scene, but the parser fills all of my memory (16gb). I have
> every sphere individually in the pov file, because their coordinate and color
> are different. It doesnt matter which quality im using because i cant even pass
> the parsing.
> Is there any good method to reduce memory usage, or the only option is more
> memory?
>
> Thanks.
>
>
All spheres and cones individualy seems to tell us that the POV file
defines all of those one by one, and individualy apply a texture to each
one. That makes your POV file uselessly huge.
Then, you need the space for the deffined objects including the texture
block attached to each one of them. Even if tou don't have any explicite
finish applyed, you still have space to contain a copy of the default finish
It would be beter to use a while or for loop to place them.
For the colours, do you realy need each object to have different
pigments? With some 12 millions objects, you probably have many that
share the same tint. How about putting them all in a single union and
use some pattern as a pigment?
That way, you only have a single texture block instead of 12 millions of
them. This can save you a few Gb.
If using a single pattern is not an option, you can still save a lot or
memory using unions. One union use a pattern, and a second union use
another pattern. Textures for 10 to 50 unions will use the same space as
if they where applyed to 10 to 50 individual objects, whitch is a *LOT*
less that what you have now.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 01.12.2014 02:17, schrieb zoli0726:
> Hi!
>
> I could appreciate some help, because im stuck.
>
> I want to render about 2 million spheres and about 10 million cone-s which
> connecting them on a scene, but the parser fills all of my memory (16gb). I have
> every sphere individually in the pov file, because their coordinate and color
> are different. It doesnt matter which quality im using because i cant even pass
> the parsing.
> Is there any good method to reduce memory usage, or the only option is more
> memory?
If you can make do with spheres and cylinders, blobs might save you some
space.
If there are repeating structures, using blobs or meshes is the way to
go, as these can be duplicated without copying all the data.
Alternatively, try rendering the image in "slices" of different depth in
front of a transparent background (don't forget to enable alpha channel
for the output image), and then overlaying the images in Photoshop or
the like.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 02/12/2014 01:56, clipka wrote:
>
> Alternatively, try rendering the image in "slices" of different depth in
> front of a transparent background (don't forget to enable alpha channel
> for the output image), and then overlaying the images in Photoshop or
> the like.
Alternatively, you could save the images as TGAs and using tga2df3.exe,
create a DF3 file. This can be rendered as emitting media. Once you have
created the DF3 file you can render it from any angle and location,
without re-rendering the slices.
I did something similar with a fractal a couple of years ago.
It is an added complication though and I would leave it for later. :-)
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|