pioneerspacesim/pioneer — Issue #676: using lod in static
Author: richardpl
Created: 2011-10-17 22:48:31+00:00
State: open

Currently we have models that use lod in static to generate mesh:

define_model('posl_green', {
info = {
lod_pixels = {2, 5, 10, 0},
bounding_radius = 1,
materials = {'green'},
},
static = function(lod)
if lod > 1 then
use_material('green')
sphere_slice(3*lod, 1*lod, 0, 0.5*math.pi, Matrix.scale(v(0.1,0.1,0.1)))
end
end,

so code in static will be called only once and used always in other words if lod of model was 1 when it was first called generated mesh will be sphere slice of only 3 divs which does not look nice at close.