Snapshot Graphics Rendering

I would like to use Ruby to render a screenshot of a 3D environment.
No concern for interactivity, frame rates, hardware acceleration, etc.
Instead I’d like to dynamically construct a 3D space with Ruby objects
at run time, and then call a “save to disk” function that would render
the space and save it as a PNG.

I’ve considered writing Ruby code to output POV-Ray source (.AOI), and
then spawning a POV-Ray process to actually render. But maybe there is
a better, more Ruby-esque way?

Thank you for your help, oh Ruby Monks.

Killian

Killian wrote:

I would like to use Ruby to render a screenshot of a 3D environment.
No concern for interactivity, frame rates, hardware acceleration, etc.
Instead I’d like to dynamically construct a 3D space with Ruby objects
at run time, and then call a “save to disk” function that would render
the space and save it as a PNG.

I’ve considered writing Ruby code to output POV-Ray source (.AOI), and
then spawning a POV-Ray process to actually render. But maybe there is
a better, more Ruby-esque way?

Thank you for your help, oh Ruby Monks.

Killian

What about using OpenGL?

“eg” eg@jnk.jnk wrote in message news:0UkYb.536824$X%5.322859@pd7tw2no…

Killian wrote:

I would like to use Ruby to render a screenshot of a 3D environment.
No concern for interactivity, frame rates, hardware acceleration, etc.
Instead I’d like to dynamically construct a 3D space with Ruby objects
at run time, and then call a “save to disk” function that would render
the space and save it as a PNG.

I’ve considered writing Ruby code to output POV-Ray source (.AOI), and
then spawning a POV-Ray process to actually render. But maybe there is
a better, more Ruby-esque way?

Thank you for your help, oh Ruby Monks.

Killian

What about using OpenGL?

I’ve been fiddling with some of the same concerns as Killian. At this
point, I’m using Ruby to generate POV source, since I don’t know that much
about OpenGL. Like Killian, I have no need of real-time rendering. I guess
my big concern would be texturing, if one needs it: ease of using the POV
community’s tremendous library of predefined textures aside, does OpenGL
offer reasonably broad and easy texturing API?

Thanks!

  • dan

dhtapp wrote:

“eg” eg@jnk.jnk wrote in message news:0UkYb.536824$X%5.322859@pd7tw2no…

What about using OpenGL?

I’ve been fiddling with some of the same concerns as Killian. At this
point, I’m using Ruby to generate POV source, since I don’t know that much
about OpenGL. Like Killian, I have no need of real-time rendering. I guess
my big concern would be texturing, if one needs it: ease of using the POV
community’s tremendous library of predefined textures aside, does OpenGL
offer reasonably broad and easy texturing API?

Thanks!

“easy” is a always a matter of opinion, so I have a hard time answering
that.
I am not an OpenGL expert (as I usually use other API’s), but there are
lots of tutorials and examples, which I am sure you could use to quickly
form an opinion for your needs.

For example, see:
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg2.htm

Or just google on “how to texture opengl” and see lots of hits.

“easy” is a always a matter of opinion, so I have a hard time answering
that.
I am not an OpenGL expert (as I usually use other API’s), but there are
lots of tutorials and examples, which I am sure you could use to quickly
form an opinion for your needs.

For example, see:
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg2.htm

Or just google on “how to texture opengl” and see lots of hits.

Thanks for your feedback. Which Ruby to OpenGL bindings would you
recommend? (I’m working on Linux and Solaris.)