3d graphics from scratch -
what minimum configuration program need build 3d graphics scratch, example have sfml working 2d graphics , need implement camera object can move & rotate in space
where start , how implement vector3d -> vector2d conversion functions , other neccessary things
all have is: angles phi, xi, epsilon 1-3 , object can draw on screen following formula
x/y = center.x/y + scale.x/y * dot(point[i], epsilon1/epsilon2)
but way im transforming "world"
axis, not object points
first need implement transform matrix , vector math:
the rest depends on kind of rendering want achieve:
boundary polygonal mesh rendering
this kind of rendering native nowadays gfx cards. need implement buffers for:
- depth (for filled polygons without z-sorting)
- screen (to avoid flickering , serves canvas)
- shadow,stencil,aux (for advanced rendering techniques)
they have same resolution target rendering area. on top of need implement supported primitives rendering @ least point,line,triangle. see:
on top of can add textures,shaders , whatever else want ...
(back)ray tracing
this kind of rendering different , current gfx hw not build it. involves implementing ray/primitives intersections computation, snell's law , analytical representation of meshes. way can multi-spectral rendering , more physically accurate effects/processes see:
- how can render 'atmosphere' on rendering of earth in three.js? hybrid approach #1+#2
- algorithm 2d raytracer
- how implement 2d raycasting light effect in glsl
- multi-band image raster rgb
the difference between 2d , 3d ray tracer none difference how compute perpendicular vector ...
there different rendering methods volume rendering, hybrid methods , others implementation task oriented , generic description mislead ...
Comments
Post a Comment