POV-Ray : Newsgroups : povray.general : quicker render alternatives to povray Server Time
31 Jul 2024 04:18:38 EDT (-0400)
  quicker render alternatives to povray (Message 31 to 40 of 50)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Chambers
Subject: Re: quicker render alternatives to povray
Date: 17 Mar 2008 21:36:33
Message: <47df2ab1$1@news.povray.org>
Rahul wrote:
> Any suggestions are, of course, greatly appreciated!

How many spheres are in a typical scene?

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: Rahul
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 00:30:00
Message: <web.47df523e72535d7259eba08c0@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> Rahul wrote:
> > Any suggestions are, of course, greatly appreciated!
>
> How many spheres are in a typical scene?
>
> --
> ...Ben Chambers
> www.pacificwebguy.com

100 spheres are typical.

-Rahul


Post a reply to this message

From: Rahul
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 00:35:01
Message: <web.47df542272535d7259eba08c0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

> Try puting all spheres representing the same element in an union, and assigh the
> pigment to that union. That mean about 4 unions for most organic molecules:
> carbon, hydrogen, oxygen and nitrogen.
> If all, or most, spheres use the same finish, set that finish as the default
> finish. Do the same for the proeminent pigment like:
> #default texture{pigment{Carbon}finish{Your_finish}}

True. Most of my files have a max of about 5 elements.


Here's a snippet; as other previous posters indicated maybe this is helpful in
detecting inefficiencies in the code. As I indicated, I'm only trying to  to
tweak it to coax a better performance out of it. The person who originally
wrote it probably did not have performance as a criterion at all. So its very
very likely that we are doing a lot of stuff in an inefficient manner! I'd be
open to any suggestions people can throw at me! Thanks!


*****************************************************************************

#include "colors.inc"
#include "textures.inc"

#declare ATM_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3> metallic}
#declare RIBBON_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3>}
#declare SURF_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3>}
#declare N_tex = texture { pigment { colour red 0.231 green 0.318 blue 1.000 }
finish{ ATM_FINISH }}
#declare C_tex = texture { pigment { colour red 0.100 green 0.100 blue 0.100 }
finish{ ATM_FINISH }}
#declare O_tex = texture { pigment { colour red 0.700 green 0.000 blue 0.000 }
finish{ ATM_FINISH }}
....
[snip]
....
//************ CAMERA *********

#declare zoom = 15;

// Define Camera Positions
#declare xtopview = camera {orthographic direction <1, 0, 0> sky <0, 0, 1> up
<0, 0, zoom> right<zoom*4/3,0,0> rotate <0,0,180> loca
tion <0, 0, 20> look_at <0, 0, 0>}
#declare xfrontview = camera {orthographic location  <0, -20, 0> direction <1,
0, 0> sky <0, 0, 1> up <0, 0, zoom> right<zoom*4/3,0>
 look_at <0, 0,0>}

.....
[snip]
.....

//************ LIGHTS *********

#declare Intensity = 1.7;

light_source
{
  0*z // light's position (translated below)
  color rgb 1.7  // light's color
  // <widthVector> <heightVector> nLightsWide mLightsHigh
  area_light
  <12, 0, 0> <0, 0, 12> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  translate <30, -60, 40>   // <x y z> position of light
  shadowless
}
light_source
{
  0*z // light's position (translated below)
  color rgb 1  // light's color
  // <widthVector> <heightVector> nLightsWide mLightsHigh
  area_light
  <12, 0, 0> <0, 12, 0> // lights spread out across this distance (x * z)
  6, 6                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  translate <7.5, 4, 20>   // <x y z> position of light
  shadowless
}
....
[snip]
....
//************ Simulation Box ******

background { color rgb < 1.000, 1.000, 1.000 >}


//********** CAMERA *************

camera { xfrontview }

//********** ATOMS *************

declare atoms = union {
sphere   { <1.34073,2.44067,2.09778>,  0.77 texture{C_tex}}
sphere   { <0.22055,2.50846,2.75588>,  0.73 texture{O_tex}}
sphere   { <2.20820,2.40215,2.77242>,  0.32 texture{H_tex}}
sphere   { <-0.54093,2.52909,2.04946>,  0.32 texture{H_tex}}
sphere   { <0.07183,-0.04000,-0.02136>,  1.3 texture{Pt_tex}}
sphere   { <2.90433,-0.03858,-0.02034>,  1.3 texture{Pt_tex}}
sphere   { <1.50770,2.40207,0.19218>,  1.3 texture{Pt_tex}}
....
[around 100 spheres here]
[snip]

} // End atom union
object {atoms rotate <0,0,0> translate <-7.50771, -4.47073, 2.07789> scale
0.775927395422}


Post a reply to this message

From: Rahul
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 00:40:00
Message: <web.47df550072535d7259eba08c0@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:

> > You should see if this (old) POV-Ray OpenGL Patch does what you need, at
> > an acceptable speed:
> >
> > http://www.daylongraphics.com/other/povray/patches/


Thanks! But that's a Win only patch it seems? I'm on Red Hat. Is there a Linux
patch?

> >
> > It supports wireframe for a bunch of objects, and solid rendering only
> > for spheres (with *no* textures, spheres always show in gray).
> >
> > http://www.daylongraphics.com/other/povray/patches/#solid


Thanks again! But it's imperative that I have at least a small color palette. I
need to distinguish the various elements by color code.

-Rahul


Post a reply to this message

From: nemesis
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 02:05:00
Message: <web.47df694472535d7270d404d10@news.povray.org>
I really don't know what to say.  Some people here have machines with 8 cores
and insane amounts of RAM, while I just go by with an "ancient" P4 2.66 and
512MB.

With full AA and full quality and just a lower resolution than yours:
povray +q9 +W320 +H240 +A0.02 +AM2 test.pov

I get a 2 secs render.  and with no AA and no area_lights or shadows:
povray +q2 +W320 +H240 -A0.02 -AM2 test.pov

time is so negligible it goes below 0 secs.  If you need more than that, you
could try lowering parsing time by having a less things to parse.  For
instance, all those finish look pretty much the same.  You could try getting
the equal values inside a default expression, as in:
#default {finish {specular 0.9 roughness 0.001}}

I improvised a bit upon your test scene in order to get a lot more spheres:



#include "colors.inc"
#include "textures.inc"

#declare ATM_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3> metallic}
#declare RIBBON_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3>}
#declare SURF_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
<0.3,0.3,0.3>}
#declare N_tex = texture { pigment { colour red 0.231 green 0.318 blue 1.000 }
finish{ ATM_FINISH }}
#declare C_tex = texture { pigment { colour red 0.100 green 0.100 blue 0.100 }
finish{ ATM_FINISH }}
#declare O_tex = texture { pigment { colour red 0.700 green 0.000 blue 0.000 }
finish{ ATM_FINISH }}
//************ CAMERA *********

#declare zoom = 15;

// Define Camera Positions
#declare xtopview = camera {orthographic direction <1, 0, 0> sky <0, 0, 1> up
<0, 0, zoom> right<zoom*4/3,0,0> rotate <0,0,180> location <0, 0, 20> look_at
<0, 0, 0>}
#declare xfrontview = camera {orthographic location  <0, -20, 0> direction <1,0,
0> sky <0, 0, 1> up <0, 0, zoom> right<zoom*4/3,0>
 look_at <0, 0,0>}


//************ LIGHTS *********

#declare Intensity = 1.7;

light_source
{
  0*z // light's position (translated below)
  color rgb 1.7  // light's color
  // <widthVector> <heightVector> nLightsWide mLightsHigh
  area_light
  <12, 0, 0> <0, 0, 12> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  translate <30, -60, 40>   // <x y z> position of light
  shadowless
}
light_source
{
  0*z // light's position (translated below)
  color rgb 1  // light's color
  // <widthVector> <heightVector> nLightsWide mLightsHigh
  area_light
  <12, 0, 0> <0, 12, 0> // lights spread out across this distance (x * z)
  6, 6                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  translate <7.5, 4, 20>   // <x y z> position of light
  shadowless
}
//************ Simulation Box ******

background { color rgb < 1.000, 1.000, 1.000 >}


//********** CAMERA *************

camera { xfrontview }

//********** ATOMS *************

#declare atoms = union {
sphere   { <1.34073,2.44067,2.09778>,  0.77 texture{C_tex}}
sphere   { <0.22055,2.50846,2.75588>,  0.73 texture{O_tex}}
sphere   { <2.20820,2.40215,2.77242>,  0.32 texture{N_tex}}
sphere   { <-0.54093,2.52909,2.04946>,  0.32 texture{N_tex}}
sphere   { <0.07183,-0.04000,-0.02136>,  1.3 texture{C_tex}}
sphere   { <2.90433,-0.03858,-0.02034>,  1.3 texture{C_tex}}
sphere   { <1.50770,2.40207,0.19218>,  1.3 texture{C_tex}}
} // End atom union

#declare atoms = union {
 #local i = 0; #while (i<40)
 object {atoms translate x*.6*i}
 #declare i = i + 1; #end
} // End atom union

object {atoms rotate <0,0,0> translate <-7.50771, -4.47073, 2.07789> scale
0.775927395422}


Post a reply to this message

From: Rarius
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 05:45:16
Message: <47df9d3c@news.povray.org>
I did the same, I added another 100 atoms to the scene and rendered it in 
both 3.6.1c and 3.7 beta25... My PentiumD 820 (2x2.6GHz), 2Gb RAM machine 
parses and renders this in 0.8s. and that is at +W800+H600+Q9! In 3.7 with 
both cores the image just appears, you cant even see the progression across 
the field.

If this isn't fast enough for you, what machine are you running it on? A 
386, 40MHz?

Rarius

"nemesis" <nam### [at] gmailcom> wrote in message 
news:web.47df694472535d7270d404d10@news.povray.org...
>I really don't know what to say.  Some people here have machines with 8 
>cores
> and insane amounts of RAM, while I just go by with an "ancient" P4 2.66 
> and
> 512MB.
>
> With full AA and full quality and just a lower resolution than yours:
> povray +q9 +W320 +H240 +A0.02 +AM2 test.pov
>
> I get a 2 secs render.  and with no AA and no area_lights or shadows:
> povray +q2 +W320 +H240 -A0.02 -AM2 test.pov
>
> time is so negligible it goes below 0 secs.  If you need more than that, 
> you
> could try lowering parsing time by having a less things to parse.  For
> instance, all those finish look pretty much the same.  You could try 
> getting
> the equal values inside a default expression, as in:
> #default {finish {specular 0.9 roughness 0.001}}
>
> I improvised a bit upon your test scene in order to get a lot more 
> spheres:
>
>
>
> #include "colors.inc"
> #include "textures.inc"
>
> #declare ATM_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3> metallic}
> #declare RIBBON_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3>}
> #declare SURF_FINISH = finish {specular 0.9 roughness 0.001 ambient rgb
> <0.3,0.3,0.3>}
> #declare N_tex = texture { pigment { colour red 0.231 green 0.318 blue 
> 1.000 }
> finish{ ATM_FINISH }}
> #declare C_tex = texture { pigment { colour red 0.100 green 0.100 blue 
> 0.100 }
> finish{ ATM_FINISH }}
> #declare O_tex = texture { pigment { colour red 0.700 green 0.000 blue 
> 0.000 }
> finish{ ATM_FINISH }}
> //************ CAMERA *********
>
> #declare zoom = 15;
>
> // Define Camera Positions
> #declare xtopview = camera {orthographic direction <1, 0, 0> sky <0, 0, 1> 
> up
> <0, 0, zoom> right<zoom*4/3,0,0> rotate <0,0,180> location <0, 0, 20> 
> look_at
> <0, 0, 0>}
> #declare xfrontview = camera {orthographic location  <0, -20, 0> direction 
> <1,0,
> 0> sky <0, 0, 1> up <0, 0, zoom> right<zoom*4/3,0>
> look_at <0, 0,0>}
>
>
> //************ LIGHTS *********
>
> #declare Intensity = 1.7;
>
> light_source
> {
>  0*z // light's position (translated below)
>  color rgb 1.7  // light's color
>  // <widthVector> <heightVector> nLightsWide mLightsHigh
>  area_light
>  <12, 0, 0> <0, 0, 12> // lights spread out across this distance (x * z)
>  4, 4                // total number of lights in grid (4x*4z = 16 lights)
>  adaptive 0          // 0,1,2,3...
>  jitter              // adds random softening of light
>  translate <30, -60, 40>   // <x y z> position of light
>  shadowless
> }
> light_source
> {
>  0*z // light's position (translated below)
>  color rgb 1  // light's color
>  // <widthVector> <heightVector> nLightsWide mLightsHigh
>  area_light
>  <12, 0, 0> <0, 12, 0> // lights spread out across this distance (x * z)
>  6, 6                // total number of lights in grid (4x*4z = 16 lights)
>  adaptive 0          // 0,1,2,3...
>  jitter              // adds random softening of light
>  translate <7.5, 4, 20>   // <x y z> position of light
>  shadowless
> }
> //************ Simulation Box ******
>
> background { color rgb < 1.000, 1.000, 1.000 >}
>
>
> //********** CAMERA *************
>
> camera { xfrontview }
>
> //********** ATOMS *************
>
> #declare atoms = union {
> sphere   { <1.34073,2.44067,2.09778>,  0.77 texture{C_tex}}
> sphere   { <0.22055,2.50846,2.75588>,  0.73 texture{O_tex}}
> sphere   { <2.20820,2.40215,2.77242>,  0.32 texture{N_tex}}
> sphere   { <-0.54093,2.52909,2.04946>,  0.32 texture{N_tex}}
> sphere   { <0.07183,-0.04000,-0.02136>,  1.3 texture{C_tex}}
> sphere   { <2.90433,-0.03858,-0.02034>,  1.3 texture{C_tex}}
> sphere   { <1.50770,2.40207,0.19218>,  1.3 texture{C_tex}}
> } // End atom union
>
> #declare atoms = union {
> #local i = 0; #while (i<40)
> object {atoms translate x*.6*i}
> #declare i = i + 1; #end
> } // End atom union
>
> object {atoms rotate <0,0,0> translate <-7.50771, -4.47073, 2.07789> scale
> 0.775927395422}
>
>
>


Post a reply to this message

From: Paul Bourke
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 07:05:00
Message: <web.47dfaed372535d7266bf80e30@news.povray.org>
> My scene is basically nothing more than a large number of spheres(of different
> sizes and colors) Povray works great for me for rendering an excellent high
> quality final output.
> Unfortunately there are parts in my development cycle where I need a faster
> render. Low quality acceptable. Are there any options people would recommend?

Have you tried Tachyon ... it is supplied with VMD but is a stand along
raytracer, is very fast, can handle very large numbers of objects (without the
slow scene parsing times of PovRay), if you have a cluster or HPC facility or
multiple cores it will make full use of those (threads or MPI based for
multiple cpus), etc etc. Designed I imagine for exactly what you are talking
about, fast, a raytracer, perhaps not the same quality of larger more involved
packages. It is also built as just an library so you can incorporate it into
your own code. Oh and yes, easy to write an exporter/parser for the scene file.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 09:28:12
Message: <47dfd17c$1@news.povray.org>

> Alain <ele### [at] netscapenet> wrote:
> 
>> Try puting all spheres representing the same element in an union, and assigh the
>> pigment to that union. That mean about 4 unions for most organic molecules:
>> carbon, hydrogen, oxygen and nitrogen.
>> If all, or most, spheres use the same finish, set that finish as the default
>> finish. Do the same for the proeminent pigment like:
>> #default texture{pigment{Carbon}finish{Your_finish}}
> 
> True. Most of my files have a max of about 5 elements.
> 
> 
> Here's a snippet; as other previous posters indicated maybe this is helpful in
> detecting inefficiencies in the code. As I indicated, I'm only trying to  to
> tweak it to coax a better performance out of it. The person who originally
> wrote it probably did not have performance as a criterion at all. So its very
> very likely that we are doing a lot of stuff in an inefficient manner! I'd be
> open to any suggestions people can throw at me! Thanks!

Removing area_light would surely improve speed.


Post a reply to this message

From: Rahul
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 11:30:01
Message: <web.47dfedb672535d7259eba08c0@news.povray.org>
"Rarius" <rar### [at] rariuscouk> wrote:
> I did the same, I added another 100 atoms to the scene and rendered it in
> both 3.6.1c and 3.7 beta25... My PentiumD 820 (2x2.6GHz), 2Gb RAM machine
> parses and renders this in 0.8s. and that is at +W800+H600+Q9! In 3.7 with
> both cores the image just appears, you cant even see the progression across
> the field.
>
> If this isn't fast enough for you, what machine are you running it on? A
> 386, 40MHz?
>
> Rarius

Thanks Rarius for the benchmark run. I just retimed my run and its approximately
5 secs. So that probably means there's some other thing  in my setup that I'm
messing up. (like I said its all called and glued together via a wrapper that
parses it and makes povray calls) I've a Ray Tracer Version 3.6.1. Have not
tried the beta yet. Let me get down to timing the individual parts of my code.

-Rahul


Post a reply to this message

From: nemesis
Subject: Re: quicker render alternatives to povray
Date: 18 Mar 2008 13:00:18
Message: <47e00332$1@news.povray.org>
I still think some ini configs are interferring with your render, 
perhaps enabling AA and higher quality settings, thus making the 
area_lights slow the render down or something.

If you want to be absolutely sure, use the command-line switches.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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