Jump to content

limt on distance to see model?


Recommended Posts

I am bumping into a curious bug, where I set my disance cull in worldspawn to be 14500. For the map brushes it self this works fine, however, i find having models in the map, that the distance viewable of the model is about roughly 7500 units. Now i have a passage in which you can see up to about 9000 units, but the model (a ship) is a critical point to reach, which i want it to be displayed. This causes some problems, since you have to walk up to that 7500 unit point, in order for the model to pop in.

Is there a way arround it. Attached screenshots.
P00195n.jpg

qilB6Pd.jpg

Link to comment

In the singleplayer there's a hardcoded cull distance of 8192 units for dynamic models.

Here is the corresponding line, if someone wants to have a go at fixing this.
https://github.com/JACoders/OpenJK/blob/master/code/cgame/cg_main.cpp#L2040

 

For others hitting this limit as well:

Making this a misc_model prevents the culling, but makes the model stationary. So this can be an alternative. In some cases you also need to remap the shaders of the model with alternaive versions. Models made to be misc_model_statics usually use the lightgrid to get all the lighting information. Misc_models can't access the lightgrid. The easiest way of fixing this is duplicating the shader (if theres one) and swap all "rgbGen lightingDiffuse" with "rgbGen vertex".

Remap the original shaders with the new duplicated ones. For every shader add the key “remap0X” “original_shader_name;duplicate_shader_name”. Replace X with 1 or higher for the following shaders like:

“remap01” “original_shader_name1;duplicate_shader_name1”
“remap02” “original_shader_name2;duplicate_shader_name2”

AshuraDX and Lazarus like this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...