P
P
Pavel Shvedov2014-12-10 21:06:13
Python
Pavel Shvedov, 2014-12-10 21:06:13

How and what to render a scene in Python?

Good day, gentlemen. The following task appeared: it is necessary to implement an application that, when launched, would accept a list of paths to image files, take a pre-prepared 3D scene, overlay the received images as textures on certain model surfaces, and render into pictures (and save them to disk). The render should come from the view of the cameras located in the scene. Briefly the principle of operation:

  1. Loading the Model
  2. Apply textures
  3. Going Through Cameras and Rendering Images

No GUI is required from the program, a simple console application, Linux platform. Tell me which scene format is better to use and which libraries to use. For now, I'm leaning towards Python and a wrapper over OGRE. I am not very familiar with the features of scene storage formats. I read briefly about FBX, tell me if OGRE Python works with it, and is it suitable for me to store scenes and cameras inside it? Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2014-12-10
@gbg

Try Blender.

D
Don Kaban, 2014-12-10
@donkaban

If you are familiar with OGL - pyglet( http://pyglet.org) bkb pyOpenGL. If not, and you need a ready-made bind of some common engine in python, then something simple :
www.vpython.org
https://www.panda3d.org
irrlicht.sourceforge.net/projects/pyirrlicht
perfectly designed) for your tasks.
2. Using FBX to store your scenes is also, IMHO, too heavy. Human readable options, whose parsers are written in half an hour - collada and obj. If you export the scene from a 3D editor (blender, maya, etc.) - then even more so.
3. The funny thing is that if the task is to render to the backbuffer WITHOUT creating a window, that is, as you write - a console utility that renders the scene to a file directly, then it will be easier (if you have the necessary knowledge) to write a software renderer, even a ray tracer. Because speed is not important to you.

S
SHVV, 2014-12-11
@SHVV

If you need a high-quality photorealistic picture, you can look towards external renderers, for example, POV-Ray .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question