Page 2 of 4

Re: Distant objects

Posted: 13 Jun 2018, 21:59
by wareya
So, I think that even without island-wide distant statics, it would still be super useful for immersion to display statics an extra cell or two around what's loaded for gameplay. And that's not blocked by getting LODs working well.

Re: Distant objects

Posted: 13 Jun 2018, 22:13
by psi29a
jup, i think so too

Re: Distant objects

Posted: 15 Jun 2018, 04:16
by Ravenwing
wareya wrote: 13 Jun 2018, 21:59 So, I think that even without island-wide distant statics, it would still be super useful for immersion to display statics an extra cell or two around what's loaded for gameplay. And that's not blocked by getting LODs working well.
Yes please! We need a way to not activate scripts when loading further distances. It seems like this would be a logical first step for distant statics anyway.
akortunov wrote: 13 Jun 2018, 17:53 About osgUtil::Simplifier: it provides a quite good results (but not ideal). Here are screenshots with 50% detail.
Simplification takes a lot of time, so I am not sure if we will manage to do it on the fly.
Those honestly look about at bad as Morrowind meshes normally look to me, so at a distance they'd be fine. I've always been ok with something we have to run outside the game anyway, I don't think people would mind until we got a more efficient system. Any form of distant statics would be huge for popularity.

Re: Distant objects

Posted: 15 Jun 2018, 09:43
by akortunov
I also tried to use the osg::Image::scaleImage() to get low-quality textures, but for some reason it only works for TGA textures:

Code: Select all

Error Image::scaleImage() did not succeed : errorString = invalid enumerant. The rendering context may be invalid.

Code: Select all

osg::ref_ptr<osg::Image> image = result.getImage();

[read image from file]

if (image.valid())
{
    int w = image->s(), h = image->t(), nw, nh;
    int mts = 256;
    nw = std::min(image->computeNearestPowerOfTwo(w), mts);
    nh = std::min(image->computeNearestPowerOfTwo(h), mts * h / w);
    image->scaleImage(nw, nh, image->r());
}
What am I doing wrong?
Or we just do not need to downscale DDS textures because of mipmaps?

Re: Distant objects

Posted: 15 Jun 2018, 12:12
by AnyOldName3
There's no point downscaling an image with mipmaps as you'll just end up with mipmaps.

Re: Distant objects

Posted: 15 Jun 2018, 12:24
by psi29a
DDS already has LOD, those are mipmaps.

Re: Distant objects

Posted: 15 Jun 2018, 12:33
by AnyOldName3
It would be nice if we had a BA2-like system for loading the low-quality mipmaps of a DDS file without the high-quality ones needing to be loaded, too.

Re: Distant objects

Posted: 15 Jun 2018, 16:00
by Chris
akortunov wrote: 15 Jun 2018, 09:43 I also tried to use the osg::Image::scaleImage() to get low-quality textures, but for some reason it only works for TGA textures
DXT (what's usually in DDS) is a block-based compression scheme. You can't scale it without decompressing and recompressing the image, which would be both slow and lossy on top of the rescale. As others have said, we already have mipmaps, so what it should try to do is use a lower mipmap level as the highest (this can get compicated when you have a texture that is both close and far; ideally you would just use the same texture with the max mipmap level clamped on the distant object and not load a second copy).

Re: Distant objects

Posted: 27 Aug 2018, 07:07
by akortunov
Also probably the Reducer feature from http://code.google.com/p/osgworks will give better results than osg::Simplifier.

Re: Distant objects

Posted: 25 Sep 2018, 12:38
by Martinsen
What's the difference between those two btw, Akortunov?