How does Direct X do it?

Blitz3D Forums/Blitz3D Programming/How does Direct X do it?

Nate the Great(Posted 2008) [#1]
I was just wondering how direct x renders 3d things anything from games to simple models to pixar quality films?

I guess what I am really asking is do they do raypicks for every pixel or does it calculate which triangles to draw in what order?


Zethrax(Posted 2008) [#2]
You mean for software rendering?

For hardware rendering, DirectX (Direct3D) just acts as an intermediary between your app and the graphics card, as far as I know.


Nate the Great(Posted 2008) [#3]
I was just wondering exacly how watever renders the 3d stuff works?


Kryzon(Posted 2008) [#4]
I...didn't get your question correctly. Do you want to know how 3D scenes are rendered? Like, the process of rasterizing, vertex and pixel shading and display on the monitor?

About Software Renderers. There's POV Ray, Mental Ray, the 3DS Max Scanline, Brazil. I don't think they use DirectX as it is an API designed to allow easy access to hardware capabilities. It's only useful for real-time stuff, regarding 3D rendering. Also I believe D3D doesn't even render the stuff, it justs tells the graphic card to do the hard work. It's more like a brain, not muscle.

Take RayBox, for example, a mini-mainframe ray-tracing device thingy. It uses it's own software renderer.


Nate the Great(Posted 2008) [#5]
so how do the software renderers work? Are they faster?


xlsior(Posted 2008) [#6]
so how do the software renderers work? Are they faster?


No, they're a bazillion times slower, It takes anywhere from seconds to hours (or longer) to render a single frame with the 3D rendering software programs like those mentioned above. They calculate the color of each pixel by shooting millions of imaginary lightbeams through a scene, and calculating all the reflections, diffusions, etc. for each individual pixel

the advantage is that you can have truly photo realistic images that way, but they are *much* slower than what the 3D acceleration cards do.

Makes for good looking movies, though.


Nate the Great(Posted 2008) [#7]
Ok so how do 3d acceleration cards do it in real time.

That was my original question but I didn't know how to ask that.


Kryzon(Posted 2008) [#8]
The cards have specialized circuits each with its own function, like rasterizing, pixel shading, etc. That makes for a possible 3D render, albeit simpler than software, but nonetheless realtime.


GfK(Posted 2008) [#9]
Witchcraft.


Nate the Great(Posted 2008) [#10]
ohh...

I get it now thanks for explaining it. :)


Xzider(Posted 2008) [#11]
Hahaha...good one GfK.

These might help:

http://en.wikipedia.org/wiki/Graphics_card
http://en.wikipedia.org/wiki/DirectX
http://en.wikipedia.org/wiki/Graphics_processing_unit
http://en.wikipedia.org/wiki/Rendering_(computer_graphics)

hope it helps!