help i am trying to implement LOD in my game engine #356
Unanswered
Abdelilah-Majid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi guys;
so i have this 3D game engine under development and i am building it with c and the raylib library
i has implemented Frustum_culling and data oriented design and field of view and i am planing to implement a collision detection optimization techneek and multi threading in the future and also any optimization idea that comes to my mind;
and i am now working on lod but i am stuck
the meshopt_simplify doesnt reduce the indices that much if i didn't set the mesh indices to the lod array and the meshopt_simplifySloppy produce a very bad looking mesh
and if i set the mesh indices to the lod array it cant upscale to the original array(i know this is a stupid thing to say but again the first method doesn't reduce the indices that much if i didn't do this)
here is my code: (sorry for the weird format )
void Renderer3D_LOD_gen(Renderer3D *renderer3D) {
for (unsigned long long int i = 0; i < renderer3D->number_of_existing_modules; i++) {
if (renderer3D->Modules[i].exist) {
if (renderer3D->Modules[i].visible_by_engine) {
if (renderer3D->Modules[i].visible) {
}
}
}
and also this:
float Renderer3D_LOD_get_normalized_float_distance_from_camera(Renderer3D *renderer3D, Vector3 target_obj) {
float distance = Vector3Distance(target_obj, renderer3D->View_calling_optimizer->camera_3D->position);
float result = Normalize(distance, 0, renderer3D->View_calling_optimizer->view_depth);
return result;
}
can anyone help me get this working (snippets of code will help so much)
thank you all;
Beta Was this translation helpful? Give feedback.
All reactions