Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render artifacts when a model self-intersected more than twice #1861

Open
Askaniy opened this issue Aug 21, 2023 · 13 comments
Open

Render artifacts when a model self-intersected more than twice #1861

Askaniy opened this issue Aug 21, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@Askaniy
Copy link
Contributor

Askaniy commented Aug 21, 2023

Artifacts when a model self-intersects more than twice.
Probable was also seen on Phobos by NGTS addict / thelostprobe here.

Screenshot_20230821_172014

  • OS: Linux, openSUSE Tumbleweed
  • Frontend: Qt5, Wayland
  • Version: 1.7.0, at least bed2d967f97b84
@Askaniy Askaniy added the bug Something isn't working label Aug 21, 2023
@munix9
Copy link
Contributor

munix9 commented Aug 21, 2023

hm, lgtm, maybe it depends on the hardware.
or have you made special settings?
grafik

@Askaniy
Copy link
Contributor Author

Askaniy commented Aug 21, 2023

I tested on a laptop with Intel graphics (currently unavailable until tomorrow, battery issues) and PC with Radeon graphics. There were no special settings and no modifications

@munix9
Copy link
Contributor

munix9 commented Aug 21, 2023

More details from my side:
tested on two notebooks, each with the same openSUSE Tumbleweed and there are no artifacts.

openSUSE Tumbleweed 20230819

$ inxi --graphics

Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915
    resolution: 1920x1080~60Hz
  API: OpenGL v: 4.2 Mesa 23.1.5 renderer: Mesa Intel HD Graphics 4000 (IVB
    GT2)
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel
  Device-2: Chicony USB2.0 Camera driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
    resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 23.1.5 renderer: Mesa Intel Graphics (ADL GT2)

The output of
$ sudo zypper se -si *celestia* *meshopt*
would also be interesting (if it is a package installation),

@Askaniy
Copy link
Contributor Author

Askaniy commented Aug 22, 2023

  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    driver: amdgpu v: kernel
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: radeonsi gpu: amdgpu resolution: 3440x1440
  API: OpenGL v: 4.6 Mesa 23.1.5 renderer: AMD Radeon RX 6700 XT (navi22
    LLVM 16.0.6 DRM 3.52 6.4.9-1-default)

S  | Name                         | Type  | Version                         | Arch   | Repository
---+------------------------------+-------+---------------------------------+--------+-------------------------------------------
i+ | celestia                     | пакет | 1.7.0~git20230818+eb1cb28-802.1 | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | celestia-common              | пакет | 1.7.0~git20230818+eb1cb28-802.1 | noarch | home:munix9:unstable (openSUSE_Tumbleweed)
i  | celestia-data                | пакет | 1.7.0~git20230807+4b07c07-95.1  | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | celestia-data-avif           | пакет | 1.7.0~git20230807+4b07c07-34.3  | noarch | home:munix9:unstable (openSUSE_Tumbleweed)
i  | celestia-data-lang           | пакет | 1.7.0~git20230807+4b07c07-95.1  | noarch | home:munix9:unstable (openSUSE_Tumbleweed)
i+ | celestia-lang                | пакет | 1.7.0~git20230818+eb1cb28-802.1 | noarch | home:munix9:unstable (openSUSE_Tumbleweed)
i  | celestia-qt5                 | пакет | 1.7.0~git20230818+eb1cb28-802.1 | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i+ | celestia-qt6                 | пакет | 1.7.0~git20230818+eb1cb28-802.1 | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | libcelestia1_7               | пакет | 1.7.0~git20230818+eb1cb28-802.1 | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | libcelestia1_7-x86-64-v3     | пакет | 1.7.0~git20230818+eb1cb28-802.1 | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | libmeshoptimizer2d           | пакет | 0.19-4.4                        | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)
i  | libmeshoptimizer2d-x86-64-v3 | пакет | 0.19-4.4                        | x86_64 | home:munix9:unstable (openSUSE_Tumbleweed)```

@munix9
Copy link
Contributor

munix9 commented Aug 22, 2023

Ah, you are using the converted avif images, that could be the problem - at least it is the difference with my setup.

I will test and report.

@munix9
Copy link
Contributor

munix9 commented Aug 22, 2023

The problem is reproducible and is probably related to converted images.

Whether this is due to the avif implementation or the conversion of the images, I can not say, the problem is reproducible with the AppImage version of celestia, which contains the avif images for storage space reasons.

Tested with celestia-1.7.0~git20230820+bed2d96-lp154.1.1.Build1.1.glibc2.17-x86_64.AppImage

See https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/

@munix9
Copy link
Contributor

munix9 commented Aug 22, 2023

The converted image medres/arrokoth.avif actually looks good, I can't see any visual abnormalities to the original medres/arrokoth.jpg.

$ mediainfo arrokoth.*

General
Complete name                            : arrokoth.avif
Format                                   : avif
Codec ID                                 : avif (avif/mif1/miaf/MA1A)
File size                                : 94.4 KiB

Image
ID                                       : 1
Format                                   : av01
Codec ID                                 : av01
Width                                    : 2 048 pixels
Height                                   : 1 024 pixels
Color space                              : YUV
Bit depth                                : 8 bits
Stream size                              : 84.5 KiB (89%)
Matrix coefficients                      : BT.601
Color range                              : Full
Describes                                : 2,3
Codec configuration box                  : av1C

General
Complete name                            : arrokoth.jpg
Format                                   : JPEG
File size                                : 308 KiB

Image
Format                                   : JPEG
Width                                    : 2 048 pixels
Height                                   : 1 024 pixels
Color space                              : YUV
Chroma subsampling                       : 4:4:4
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 308 KiB (100%)
ColorSpace_ICC                           : RGB

@munix9
Copy link
Contributor

munix9 commented Aug 22, 2023

I have built celestia without meshoptimizer for testing and now things look better.
There are still slight artifacts visible with avif images.

celestia without meshoptimizer for openSUSE Leap 15.4
https://download.opensuse.org/repositories/home:/munix9:/test/15.4/x86_64/

celestia without meshoptimizer as AppImage based on the above mentioned version for Leap 15.4
https://download.opensuse.org/repositories/home:/munix9:/test/AppImage/

Summary:
celestia with avif images and without meshoptimizer has slight artifacts.
celestia with avif images and with meshoptimizer has significant artifacts.

@Askaniy
Copy link
Contributor Author

Askaniy commented Sep 8, 2023

Changed configuration, bug is still there.

Graphics:
  Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.0
    compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: radeonsi gpu: amdgpu resolution: 3440x1440
  API: OpenGL v: 4.6 Mesa 23.1.6 renderer: AMD Radeon Graphics (renoir LLVM
    16.0.6 DRM 3.52 6.4.12-1-default)

image

A more precise description of the bug: artifacts when a model self-intersected more than twice.
Probable was also seen on Phobos by NGTS addict / thelostprobe here.

@375gnu
Copy link
Collaborator

375gnu commented Sep 8, 2023

A more precise description of the bug: artifacts when a model self-intersected more than twice.

That explains why the bug disappears without meshoptimizer.

@375gnu 375gnu changed the title Arrokoth render artifacts Render artifacts when a model self-intersected more than twice Sep 8, 2023
@munix9
Copy link
Contributor

munix9 commented Sep 8, 2023

Is there anything I can specify when converting the images or is it in the processing of avif images in celestia?

Because as far as I know the problem only occurs with avif.

@375gnu
Copy link
Collaborator

375gnu commented Sep 8, 2023

Maybe it makes sense not to convert affected textures to avif? And also we need a parameter to disable meshoptimizer on per-object basis.

@munix9
Copy link
Contributor

munix9 commented Sep 8, 2023

Maybe it makes sense not to convert affected textures to avif? And also we need a parameter to disable meshoptimizer on per-object basis.

Maybe. I'm also considering delivering only the original medres images in the appimage as an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants