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

Author Topic: 3D Model Projection in SFML  (Read 1582 times)

0 Members and 1 Guest are viewing this topic.

GreyGoldFish

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
3D Model Projection in SFML
« on: March 08, 2021, 02:39:43 pm »
Hey there! I'm a game developer, and I'm only getting started with SFML. I have experience with engines like Godot where you can project a 3D model into the 2D viewport, and I want to be able to do something similar in SFML for an isometric game.

I'm aware that SFML is 2D only, so would I have to necessarily use OpenGL to display a 3D model on a 2D plane? I looked around, and I couldn't find any answer that related exactly to what I want to accomplish, so here I am.

Thank you for reading, and I wish you all a lovely day/evening!

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: 3D Model Projection in SFML
« Reply #1 on: March 08, 2021, 02:49:43 pm »
Broadly speaking it is possible to fudge 3D models with a sfml vertex array, some custom vertex shaders and the glm maths library - there's a proof of concept I came up with here: https://github.com/fallahn/osgc/tree/master/fist/src and a tool for converting models into vertex arrays here: https://github.com/fallahn/osgc/tree/master/lightmapper

If you're interested in how it works I don't mind explaining the concepts - but to be perfectly honest for the amount of work it takes you're better off just using OpenGL directly :)

 

anything