user6552967
user6552967

Reputation:

3d graphics from scratch

What the minimum configuration for the program I need to build 3D Graphics from scratch, for example I have only SFML for working with 2d graphics and I need to implement the Camera object that can move & rotate in a space

Where to start and how to implement vector3d -> vector2d conversion functions and other neccessary things

All I have for now is: angles Phi, Xi, epsilon 1-3 and some object that I can draw on the screen with the following formula

x/y = center.x/y + scale.x/y * dot(point[i], epsilon1/epsilon2)

But this way Im just transforming "world" axis, not the Object points

Upvotes: 0

Views: 649

Answers (1)

Spektre
Spektre

Reputation: 51835

First you need to implement transform matrix and vector math:

The rest depends on kind of rendering you want to achieve:

  1. boundary polygonal mesh rendering

    This kind of rendering is the native for nowadays gfx cards. You need to implement buffers for:

    • depth (for filled polygons without z-sorting)
    • screen (to avoid flickering and also serves as Canvas)
    • shadow,stencil,aux (for advanced rendering techniques)

    they have usually the same resolution as target rendering area. On top of this you need to implement supported primitives rendering at least point,line,triangle. see:

    on top of all this you can add textures,shaders and whatever else you want to ...

  2. (back)ray tracing

    this kind of rendering is very different and current gfx HW is not build for it. This involves implementing ray/primitives intersections computation, Snell's law and analytical representation of meshes. This way you can also do multi-spectral rendering and more physically accurate effects/processes see:

    The difference between 2D and 3D ray tracer is almost none the only difference is how to compute perpendicular vector ...

    There are also different rendering methods like Volume rendering, hybrid methods and others but their implementation is usually task oriented and generic description would most likely just mislead ... Here some 3D ray tracers of mine:

Upvotes: 1

Related Questions