Jump to content

  • Log In with Google      Sign In   
  • Create Account


Writing a software renderer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 AhmedCoeia   Members   -  Reputation: 305

Like
1Likes
Like

Posted 10 January 2014 - 02:46 AM

Hi All,

 

I have managed to draw pixels, lines, triangles, then solid triangles, and I copied and pasted a code for texturing a triangle, I would like also to someone guide me on how to do it and understand it fully. 

 

What are the next steps,  is it possible to draw a cube in 2D and write a camera, world transformations right now and ignoring the Z ? 

For example, I would like to load a .plg model and ignore the .z ? 



Sponsor:

#2 Geri   Members   -  Reputation: 172

Like
-1Likes
Like

Posted 03 February 2014 - 01:25 PM

i dont really suggest to copy codes to do your renderer, you should fully understand and have control over the whole process instead.


Create your 3D RPG: Maker3D

 


#3 Ravyne   Crossbones+   -  Reputation: 6778

Like
3Likes
Like

Posted 03 February 2014 - 02:47 PM

So, you're just drawing in 2D now, correct? Without a z-buffer?

 

You could go in several directions:

You could write some blitting functions to draw textured 2D rectangles (for things like tiles, sprites, UI).

You could write a 2D transformation pipeline, so that you could do 2D sprite games with mode-7-like effects (rotation, zoom, scales, shears) or vector-style games.

You could write a 3D transformation pipeline, so that you could do simple 3D games that can use back-face culling and the painter's algorithm instead of a z-buffer.

You could write a 3D transformation pipeline with zbuffering, and then implement perspective-correct texturing to do relatively unfettered 3D rendering.

 

Specifically, the thing you want to do isn't doable in the way you suggest in any really useful form (just throwing away z) -- what you want to do is project the 3D representation of the cube onto the 2D screen -- that's what a 3D transformation pipeline (often just called the 3D graphics pipeline, or graphics pipeline, or 3D pipeline) does.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS