Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Simple 3D Graphics  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

Meerjel01

  • Newbie
  • *
  • Posts: 27
    • View Profile
Simple 3D Graphics
« on: September 02, 2022, 11:50:00 am »
Quick question.

I want to make a 3D renderer similar to the Marathon engine Aleph One. How do I position primitive vertices to make a 3D polygon?

Please respond. Thanks.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: Simple 3D Graphics
« Reply #1 on: September 02, 2022, 03:15:16 pm »
SFML doesn't do 3D rendering.
You can fake some of it with 2D and lots of math, but I can't really tell you how.

If you want to render in 3D you'll need to use OpenGL as Aleph One is using.
My personal advice is to try with something a lot smaller to begin with. Writing an engine is not at all trivial. It requires a lot of knowledge in niche programming areas as well as math and much more.
« Last Edit: September 02, 2022, 03:18:23 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Meerjel01

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Simple 3D Graphics
« Reply #2 on: September 02, 2022, 03:32:37 pm »
I know that SFML is 2D but it can still do some 2.5D. Also I ask since I've gotten better at code. (Did some home-brewing for the OG Xbox)

I just want to have a small push forward before I start. I'm not gonna do something too complex out of this. I just want to test this out for awhile.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: Simple 3D Graphics
« Reply #3 on: September 02, 2022, 03:44:17 pm »
So you want to make a Doom/Wolfenstein 3D kind of looking game/demo that looks 3D but is actually not?

There are different techniques on how to achieve a fake 3D look depending on the type of game you want.
Here's a nice article for a racing game: https://codeincomplete.com/articles/javascript-racer/
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Meerjel01

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Simple 3D Graphics
« Reply #4 on: September 02, 2022, 03:48:30 pm »
There's this
http://archive.gamedev.net/archive/reference/articles/article872.html

Maybe the technique I asked for before was too much so I'll try out ray-casting again. I was making an edit of the Adventure3D ray-caster with multiple wall textures support once before. I'll give it a shot again as a start.