NCCA / cfgaa22-dravec-ky

cfgaa22-dravec-ky created by GitHub Classroom
0 stars 0 forks source link

Feedback #1

Open jmacey opened 2 years ago

jmacey commented 2 years ago

PBR renderer is a good idea, but need to add some more focus on what the process you are going to use is and how this will be managed (for example loading in textures for the PBR per model).

would be good to see some class designs and a bit more overall design on what the program is going to do, for example what different light types you will support and how these interact with the shaders etc.

dravec-ky commented 2 years ago

Hey, thank you for the feedback, I'll definitely look into PBR once I get the initial scene set up! Right now I'm working on managing multiple objects in the scene, controlling their transform, etc. I wanted to create a object list you usually see in Game Engines / 3D software, which could be used for selecting and removing objects in the scene. I've started laying out the class design in the Scene... files I've pushed today. Will try to add some comments to make them clearer in the nearby future.

jmacey commented 2 years ago

Perhaps have a look at a scene graph data structure https://en.wikipedia.org/wiki/Scene_graph as this is the closest to what you need. It's a sort of graph which will allow the nodes to pickup parent transforms etc. Also some more ideas here https://learnopengl.com/Guest-Articles/2021/Scene/Scene-Graph

dravec-ky commented 2 years ago

Will have a look at that in the morning, thank you that's exactly what I needed!

dravec-ky commented 2 years ago

Hello! So I've managed to implement the scene graph model together with Qt's Tree View, which both work in similar ways. I have a question smart pointers in the scene graph - since each object contains a reference to its children and its parent, it means that each object is referenced in the graph a maximum of two times - once in its parent and once in its child. Is it possible to use unique pointers to do this or should I just stick to shared pointers?

jmacey commented 2 years ago

There are two ways to approach this, you can have one list of objects then have references to them, or use a shared pointer, I will have a look at the code later and see what would be the best approach.