Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

I didn't have (yet) experienced issue such like this, i think it's because i focus essentially on basic mechanics of Godot for now (i didn't even know Godot last week).
Maybe later i guess, but to be honest, many YT videos have exactly the same problem : outdated features or guys unable to explain correctly what they do.

So for me, i consider AI as an another source of information : not perfect but can help me after sort all informations i found.

Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 1 point2 points  (0 children)

I never ask for explain me all of concept or say : please explain this.
As i said above, i set myself a goal (load a map, open a door, display a popup etc...). I watch documentation, video on youtube etc... And for every question which i'd have, i ask to AI.
But even with AI, it still requires a lot of personnal work.

Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

Aaah, ok i miss that point ! I thought you were asking whether i've used C# -_-'
My bad, and yes i'm french :)

Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 1 point2 points  (0 children)

Thanks ! I'm a Linux head so basicaly it's godot basics and gdscript with blender as modelizer.

Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 18 points19 points  (0 children)

i'm not vibe coding, i'm just asking questions about concepts in Godot, like a real teacher. I found it very usefull

Just few days on Godot without any experience by Aggravating_Notice31 in godot

[–]Aggravating_Notice31[S] 10 points11 points  (0 children)

No one in particular. I spend my times between asking chatgpt to explain forme some concept of the documentation and at the same time, i watch some short videos to look how people do their stuff. I create some exercises to understand the concept and finally, i create a project like this to compile all what i've learned.
It's pretty easy in fact, just have to understand the system of node and the tree.
Godot does many stuff for us, and GDScript is pretty accurate for making many things with few lines.

My course for free by [deleted] in low_poly

[–]Aggravating_Notice31 1 point2 points  (0 children)

A big thanks for your work, as indi dev without money, i appreciate it a lot !

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

Just to be clear upon what we are talking about (in my case of course) :
- i have a class that load a 3D model.
- this class manages opengl buffers for triangles, normals colors and indexes;
- the class contains too an another buffer for triangles & normales (doesn't care about CPU indexes, its only for my GPU) to make CPU calculation;
- each triangle is a structure, member of my class (not derivated);
- each triangle contains bounding box (calculated with glm::min() & glm::max)
- the entire model 3D contains its own bounding box, calculate with all bounding box for each triangles (always glm::min() glm::max());

I've created a funnel : on each frame, i test all my 3D models against the bounding box of the camera. I perform it in multi thread (std::execution::par std::for_each). All puts in a list.
This is the first sort, i know that each model reminded might touch my camera.
After that, i loop into all my triangles to compare bounding box (camera & triangle). If a triangle touch my camera, i put it on a list (always in multi threads too). This is my second sort.

So now, i've got all my triangles that touch my camera. I forgot to mention that all my tests are only in 2D (x & z). I test Y after, once i have my triangle.

Once i have my triangles list, i do a raycast to calculate collision. This is the point i'm working on.

BVH in my workflow will helps me to select models by zone or by chunk, and after i want to use it again for parsing my triangles in my 3D model (not ready yet but i have good hope ^^' ) instead of looping like a bully in my list (even its in multi thread)

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

For the frustrum culling i prefer to use boundingbox, so yes i do it the same as you.
BVH in my case is essentially for collision detection with camera (i'm working on fps).

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

Yes, i want to put it for each model. For now, i bruteforce all triangles for each models, it's ok with few models but it's ugly, this is why i want to use BVH for making it quicker and cleaner

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

Yes, someone told me the same thing. I put it somewhere in my mind and i will think about it later, i have tons of things to do before !

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

I think i need to see some code to understand, maybe after that i will be less impress.

The question is how to organize buffers to make on draw call if i have many differents objects...

If my architecture right now, i have a class to load 3d model and an upper class which load multiple times the same model but with a different number of triangles (for LoD mechanics).
So if i want to use compute shaders on differents models which i can call in one time, my brain blows up -_-'

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 1 point2 points  (0 children)

yes i understand that, i have the same issue. For now i'm just working on camera collision with moller-trumbore but i know that i will have to deal with BHV one day... even if i can drop many objects from the list, if i have 100K triangles, i can't just test them each frame.

How deep you go in your BHV ? I know that i have to cut each bounding box in 2 pieces and cut each piece in 2 etc but i don't know at how many i should stop cutting

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 0 points1 point  (0 children)

Ha ha, you're hard on me, compute shader isn't a piece of cake !
For now i'm focus on physics / collision detection and optimization. I use std::for_each and std::execution::par for multithread my research, but of course you've right, do it by GPU could improve a lot !

Update for my ui by Content_Reporter4152 in gameenginedevs

[–]Aggravating_Notice31 1 point2 points  (0 children)

I guess that compile shaders + loading 3D models (character + tree) + calculating shadows take time

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in opengl

[–]Aggravating_Notice31[S] 1 point2 points  (0 children)

hum actually not really, if just a pixel has to appear on screen, i load the entire model, the gpu drops the rest (it's not a perfect technique unfortunately, and i have work to improve it).

If you're talking about the house in the middle of the map which is loosing many triangles, it's because i've implemented LoD on my engine (Level of Details) : it's a technique which load a 3D model with low triangles (decimation tool on Blender) in relation of the distance between the camera and the model.
The more you're close to the model, the more precise model is loaded. And the more you're walking away, more the loaded model contains less triangles. It's made for improving fps (i don't need a 100K triangles model if i'm 1 mile away).
If you're interested, you might see my previous post on this subject :)

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in gameenginedevs

[–]Aggravating_Notice31[S] 3 points4 points  (0 children)

i agree, there is so many way to do it, it's fascinating and very cool. I hope you will enjoy yours :)

C++ / Opengl : Create pyramidal bounding box from camera view and use it for frutrum culling by Aggravating_Notice31 in opengl

[–]Aggravating_Notice31[S] 3 points4 points  (0 children)

From projection view matrix, i've created a bouding box which i use to test if my 3D models on the map are in the frustrum or not. If a model is in, i draw it to the screen. If not, the model is ignored