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

Author Topic: How to conveniently get 3d content into my sfml application?  (Read 6998 times)

0 Members and 1 Guest are viewing this topic.

Notion

  • Newbie
  • *
  • Posts: 17
    • View Profile
Hello everyone!

I know, that SFML is supposed to be a 2d engine, and basically I am totally fine with that. In fact: I really love how simplistic and intuitive SFML works: I love the input handling, the really basic Text and Sprite Classes and so on. But since I suck at 2d Animations, I really need my game to be 3d, in order to become finished any time in the future.

I tried UE, Irrlicht, Unity, Esenthel, ... and all of those are really annoying for the fact that they force you to include so ridiculously many crappy scene graphs and bloated input- and event handlers and whatsoever.

Therefore I am looking for an easy (by easy I mean: My math sucks) way, to get basic 3d models and skeletal animations up running in my SFML-Window, so that I can combine them with my selfmade SFML-UI-Components and my simplistic game loop and resource handling.

Does someone know of any library that fits those requirements?

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: How to conveniently get 3d content into my sfml application?
« Reply #1 on: June 27, 2017, 05:14:05 pm »
https://www.sfml-dev.org/tutorials/2.4/window-opengl.php

OpenGL + SFML = 3D
Don't think it is going to be as easy as you want it to be though.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: How to conveniently get 3d content into my sfml application?
« Reply #2 on: June 27, 2017, 05:54:48 pm »
Alternatively you could try and export your 3D models and animations as 2D spritesheets and render those.
Or use something like Spriter or Spine to do the animation part.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Notion

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How to conveniently get 3d content into my sfml application?
« Reply #3 on: June 28, 2017, 01:13:02 am »
https://www.sfml-dev.org/tutorials/2.4/window-opengl.php

OpenGL + SFML = 3D
Don't think it is going to be as easy as you want it to be though.

Yep, i already tried openGL, actually i managed to import and render a model, but actually I did a lot of copy paste from different tutorials, since I didnt really understand much (well, I discovered that modifying shaders is a lot of fun though :D). I would really like to try this again, if there only was a copy-paste-like-tutorial for skeleton animations. I watched like 50 REALLY bad tutorials on that topic and tried about 15 code snippets I found on github, yet none of those did work out. So if you know any source for that, I will happily follow your advice :D

Alternatively you could try and export your 3D models and animations as 2D spritesheets and render those.
Or use something like Spriter or Spine to do the animation part.

I did think about this as well for a short moment, the 3d-to-2d-spritesheet thing. Thats basically how pre-diabloII-era games did it, right? But regarding the usual 1920*1080 resolution... doesnt this way of rendering eat up a huuuuuuuge load of RAM? And since its still textures on OpenGL-Surfaces (it is, right?) it needs to be VRAM, which seems to be quite limited, in contrast to regular ram.
« Last Edit: June 28, 2017, 01:18:00 am by Notion »

 

anything