Distant objects

Everything about development and the OpenMW source code.
User avatar
wareya
Posts: 152
Joined: 09 May 2015, 13:07

Re: Distant objects

Post by wareya » 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.
paying attention to #1751/#1816 #2473 #3609 #3862/#3929 #3807 #4297

User avatar
psi29a
Posts: 3860
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Distant objects

Post by psi29a » 13 Jun 2018, 22:13

jup, i think so too

User avatar
Ravenwing
Posts: 150
Joined: 02 Jan 2016, 02:51

Re: Distant objects

Post by Ravenwing » 15 Jun 2018, 04:16

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.

User avatar
akortunov
Posts: 277
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Distant objects

Post by akortunov » 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:

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?

User avatar
AnyOldName3
Posts: 874
Joined: 26 Nov 2015, 03:25

Re: Distant objects

Post by AnyOldName3 » 15 Jun 2018, 12:12

There's no point downscaling an image with mipmaps as you'll just end up with mipmaps.
AnyOldName3, Master of Shadows

User avatar
psi29a
Posts: 3860
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Distant objects

Post by psi29a » 15 Jun 2018, 12:24

DDS already has LOD, those are mipmaps.

User avatar
AnyOldName3
Posts: 874
Joined: 26 Nov 2015, 03:25

Re: Distant objects

Post by AnyOldName3 » 15 Jun 2018, 12:33

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.
AnyOldName3, Master of Shadows

Chris
Posts: 1409
Joined: 04 Sep 2011, 08:33

Re: Distant objects

Post by Chris » 15 Jun 2018, 16:00

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).

Post Reply

Who is online

Users browsing this forum: AnyOldName3, psi29a and 1 guest