Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Raise the LOD for models #27

Open
Sol1vaN opened this issue May 12, 2024 · 2 comments
Open

[REQUEST] Raise the LOD for models #27

Sol1vaN opened this issue May 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Sol1vaN
Copy link

Sol1vaN commented May 12, 2024

Always I noticed that the LOD are incredibly low (in original descent 3: 1.4 and 1.5).
and this limitation still present in PE.
Check the video:
https://youtu.be/t7WmK54YCkk

Can you raise this limit?
But taking care of not affect the performance, obviously. 😋

@Sol1vaN Sol1vaN changed the title Raise the LOD detail for models Raise the LOD for models May 12, 2024
@Glowhyena
Copy link

Yeah, that will be nice. It's distracting as well.

@Sol1vaN Sol1vaN changed the title Raise the LOD for models [REQUEST] Raise the LOD for models May 13, 2024
@JeodC
Copy link

JeodC commented May 23, 2024

The lod calculations for models is performed in renderobject.cpp around L1278. My first pass on lod changed that if statement to just remove the calculation steps:

  	// Pick a lod model to use if eligible
  	if (obj->lighting_render_type == LRT_STATIC || obj->lighting_render_type == LRT_GOURAUD) {
    	  if (obj->type == OBJ_POWERUP || obj->type == OBJ_ROBOT || obj->type == OBJ_CLUTTER) {
      		model_num = obj->rtype.pobj_info.model_num; // Always use the highest detail model
    	  } 
	  else if (obj->type == OBJ_MARKER) {
        	model_num = Marker_polynum;
    	  } 
	  else if (obj->type == OBJ_PLAYER && !(Players[obj->id].flags & (PLAYER_FLAGS_DYING | PLAYER_FLAGS_DEAD))) {
        	model_num = obj->rtype.pobj_info.model_num; // Always use the highest detail model
    	  } 
	  else {
        	model_num = obj->rtype.pobj_info.model_num;
    	  }
 	  } 
	else {
      		model_num = obj->rtype.pobj_info.model_num;
  	}
  	if (obj->type == OBJ_BUILDING && obj->flags & OF_USE_DESTROYED_POLYMODEL) {
    	  model_num = obj->rtype.pobj_info.model_num; // Always use the highest detail model
  	}

But looking at it again while writing this, I'm questioning if this conditional is even necessary or if object models are loaded at their highest poly count at render time, thus eliminating the need for this check.

@InsanityBringer InsanityBringer added the enhancement New feature or request label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants