Distant objects
Re: Distant objects
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.
- psi29a
- Posts: 5357
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Distant objects
jup, i think so too
Re: Distant objects
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.
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
I also tried to use the osg::Image::scaleImage() to get low-quality textures, but for some reason it only works for TGA textures:
What am I doing wrong?
Or we just do not need to downscale DDS textures because of mipmaps?
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());
}
Or we just do not need to downscale DDS textures because of mipmaps?
- AnyOldName3
- Posts: 2668
- Joined: 26 Nov 2015, 03:25
Re: Distant objects
There's no point downscaling an image with mipmaps as you'll just end up with mipmaps.
- psi29a
- Posts: 5357
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Distant objects
DDS already has LOD, those are mipmaps.
- AnyOldName3
- Posts: 2668
- Joined: 26 Nov 2015, 03:25
Re: Distant objects
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
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
Also probably the Reducer feature from http://code.google.com/p/osgworks will give better results than osg::Simplifier.
Re: Distant objects
What's the difference between those two btw, Akortunov?