Sign up ×
Computer Graphics Stack Exchange is a question and answer site for computer graphics researchers and programmers. It's 100% free, no registration required.

With OpenGL and such I can render some pretty amazing looking things in "real time" 60 FPS. However, if I try to make a video of that same scene in let's say Maya, or 3ds Max it would take MUCH MUCH longer for it to render even though it is the same resolution and FPS.

Why do these two types of rendering take different periods of time for the same result?

Note: Yes I do realize that 3D animation software can produce highly superior images to what could be done real time. But for this question I am referring to a scene of equal complexity.

share|improve this question
1  
The short answer is that OpenGL takes shortcuts. – immibis 17 hours ago
up vote 6 down vote accepted

The main difference would be that with OpenGL in let's say a video game you will have a process called rasterization which basically takes care of determining what part of the scene you see.

It needs to be fast so we can experience it as realtime.

Therefore the algorithm does a few simple steps.

  • check if a certain part of the scene is in my view frustum

    Frustum Culling

  • check if something is in front of it which may needs to be rendered later using a depth buffer

    Depth Buffer

  • order the objects we found to draw

  • draw them by projecting them on the screen
  • shade them based on textures / shaders / lights / ...

On the other hand a rendering software (Blender/Max/Maya/...) most likely uses some kind of raytracing

This involves alot more math to achieve a higher degree of realism. It basically works in the same way:

  • create a camera and an image plane infront of it
  • shoot one ray (or multiple sample rays) through each pixel
  • check if the ray hits anything in the scene
  • closest hit is the one to be drawn in the pixel finally (like depth buffer)
  • calculate the light for the given point Light Calculation

....

I'll stopped listing here since this is the point where raytracing takes off.

Instead of only checking if a point is hit, most raytracer now begins to calculate:

  • the amount of light a surface penetrates
  • how much light gets reflected
  • cast new rays from the hitpoint into the scene until it may hit a light source

There are a ton of techniques with different degrees of realism which can be used to calculate the light of a certain point in the scene.

TL;DR The gist would be that a raytracer mostly tries to be physically accurate when it comes the lighting and therefore has a lot of more calculations to do per pixel (sometimes shoot thousands of rays) and on the other hand games get their speed by drawing bigger chunks of the screen with simpler light calculations and a lot of shader tricks which let it look realistic.

share|improve this answer

You're comparing apples to oranges

The game is like the view port in your modelling app. You can use the viewport for render and you will get same 60fps speeds.

There is no reason why you can not get realtime graphics that are very good out of modelling software like Maya or 3DS Max. Results that are par with many games. They have viewport shaders just like games do. There is also a viewport rendering option that chunks frames to disk as fast as it allows (I've done full HD renders at 30 fps from Maya). All you have to do is stop using the provided software raytracers.

There are some differences though. The primary difference is that you as a user do not optimize stuff as much as game developers do (optimization is using all the tricks in the book). Second your animation primitives work on the CPU because you need the flexibility. In games one can afford to do optimizations. All in all you pay for not having a programming team next to you.

Many of the things may in fact have been precomputed, so they aren't so much faster just better organized. Baking your indirect illumination will beat non baked results every day.

Why are the raytracers slower?

They aren't*, one just tends to do more work on a ray tracer because its easy. Feature by feature they aren't much slower in computation cycles. For example theres no need for a ray tracer to cast secondary rays (life reflections in that case the ray tracer will cull geometry away, or not even load it, in fact mental ray does just that). Its just usually done because it trivial to do so and that's the clear advantage of ray tracers. You can even configure them to run on the CPU in some cases. They are just optimized for different things:

  1. Emitting data to disk, not just frames but all data. Something which would break most games speediness instantly.

  2. Working on general hardware. The GPU is much faster for certain things once you optimize for the GPU. But it does not work for all loads, in fact a Intel CPU is faster at computing in general than the GPU. The GPU is just massively parallel which the CPU is not. The architecture wins if you can stay in the GPU and minimize transfer and optimize for the GPU architecture.

So you pay for flexibility and ease of use. But yes ill admit both Maya and Max suffer from extreme old age. So they could be faster.

TL;DR The difference is mostly in optimization (read lots of tricks) and available external resources.

PS: There is a misconception that this is because it is more physically correct. It certainly can be but the ray tracer is not inherently more physically correct than your average game or any other computation. In fact many games use really good models while quite many modelers do not.

* See http://www.graphics.cornell.edu/~bjw/mca.pdf

share|improve this answer
1  
Sorry, but that's plain wrong. OpenGL and DirectX use approximations which are inherently faster than precise raytracing. The whole point of accelerated 3D graphics is having algorithms which balance between realism and speed, looking good enough for most practical uses: gaming, CAD, etc. – IMil 21 hours ago
    
@IMil OpenGL can be used for raytracing. Its faster because it is optimized for the hardware in question. But Maya does NOT have to ray trace. Maya and Max can use openGL and directX just as much as your game. Mayas (and 3ds) viewport is opengl or directX (your choice). The fact that your processor is slower in certain parallel processing loads is another thing. So the answer stands. The standard settings of maya is no more realistic than a standard scanline. – joojaa 20 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.