Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:53
    yongwangzhao88 starred mosra/magnum-examples
  • Oct 15 22:47
    Build #3513 passed
  • Oct 15 20:28
    mosra commented #110
  • Oct 15 20:03

    mosra on master

    KtxImporter: doc++ (compare)

  • Oct 15 20:00

    mosra on master

    doc: mention new KTX and glTF p… (compare)

  • Oct 15 19:49

    mosra on master

    Doc++ (compare)

  • Oct 15 19:46
    mosra labeled #107
  • Oct 15 19:45
    mosra closed #107
  • Oct 15 19:45

    mosra on master

    CgltfImporter: new plugin CgltfImporter: add bundled cglt… external: clean up trailing whi… and 6 more (compare)

  • Oct 15 19:32
    mosra edited #240
  • Oct 15 19:31
    mosra edited #240
  • Oct 15 19:29
    mosra edited #240
  • Oct 15 19:26
    mosra edited #240
  • Oct 15 18:36
    mosra commented #107
  • Oct 15 18:05
    pezcode commented #110
  • Oct 15 15:35
    mosra commented #110
  • Oct 15 12:03
    codecov[bot] commented #107
  • Oct 15 12:01
    codecov[bot] commented #107
  • Oct 15 11:59
    codecov[bot] commented #107
  • Oct 15 11:56
    codecov[bot] commented #107
Jamil Halabi
@jay3d
Nice! works
Fo Nz
@FoNz99089892_twitter

image0 (1).png

I think I encountered this same exact problem. I had a mesh, where Phong shader didn't work correctly. PART OF MESH appeared all white, but only on ES, not on Desktop. This was strange. The culprit was the model, whose local coordinates didn't match transformations in global coordinates (as I saw in Blender).

Vladimír Vondruš
@mosra
but how would that manifest only on ES?
Fo Nz
@FoNz99089892_twitter

image.png

This is how I was seeing my mesh in ES. After I fixed my mesh in Blender, it rendered correctly with Phong shader.

This mesh was downloaded from internet. Then I changed it a bit, but basically it was made by someone else.

but how would that manifest only on ES?

I really don't know...

When I say ES, I mean OpenGL ES!!! NOT EcmaScript!!!!
Vladimír Vondruš
@mosra
yeah i get you ;)
no idea, the only possibility is something related to floating point, a NaN that propagates differently on mobile drivers, or an (ES-specific) shader precision causing normals to explode?
if you have the original model and can share it, i'll investigate, this is interesting
Fo Nz
@FoNz99089892_twitter

no idea, the only possibility is something related to floating point, a NaN that propagates differently on mobile drivers, or an (ES-specific) shader precision causing normals to explode?

That's the first thing that comes in mind, indeed.

if you have the original model and can share it, i'll investigate, this is interesting

This above is the indicted model

Guillaume Jacquemin
@williamjcm
Might be more of a general C++ question, but what would be the best way to add a variable's byte representation to an Array<char> ? Appending an ArrayView that wraps over a pointer to that variable ?
Vladimír Vondruš
@mosra
sideways question: what do you want to achieve, exactly?
Guillaume Jacquemin
@williamjcm
Basically, serialise data to an array before writing it to a file.
Vladimír Vondruš
@mosra
if you need to preserve alignment of the type for reading it later, then ArrayTuple might be the answer, but you can't grow that one
but appending an arrayview is a solution too, yep
Guillaume Jacquemin
@williamjcm
Okay, got it.
Guillaume Jacquemin
@williamjcm
The reason I'm asking for that is because I'm working with a third-party data serialisation format (Unreal Engine 4 save files, to be exact), and I need to be able to count bytes written (as header for each object/value contains the value's size in bytes). According to docs, std::ftell() (yes, I use C I/O here) returns a signed long, while using an Array would allow me to use size_t instead.
Vladimír Vondruš
@mosra
yeah that makes sense
Vladimír Vondruš
@mosra

safe.glb

hmm, so i looked at this one and didn't find anything suspicious, no NaNs or inifinites or overly large normals or anything, the only weird thing was that:

  • the knob and handle were mistransformed in a weird way, both with assimp and tinygltf
  • the file used three different textures while just one of them would be enough, but i don't see how that would cause the model to appear white :D
Fo Nz
@FoNz99089892_twitter
  • the knob and handle were mistransformed in a weird way, both with assimp and tinygltf

I think it's the contrary: the "safe block" mesh was mistransformed, because in Blender I was seeing a pending transformation in Object mode (NOT in edit mode). Anyway, I still don't know if it was the problem which the other user had... Anyway, I am no 3D modeler. I basically encoutered this error because I downloaded this mesh from the internet, which I don't do usually.

  • the file used three different textures while just one of them would be enough, but i don't see how that would cause the model to appear white :D

I don't know. I simply fixed transformation from Object mode to Edit mode in Blender and shading was then correct.

Bhavyansh Mishra
@BhavyanshM
Quick question: For displaying an OpenGL Texture on an ImGui window, is a frame buffer necessarily required? Or is there some other way to think about it?
Guillaume Jacquemin
@williamjcm
yunkernel ( owned by Dingtao :b )
@yunkernel
Could anyone can tell me how to update texture coordinate that has added to a Mesh ?
yunkernel ( owned by Dingtao :b )
@yunkernel
I guess i should use the transform matrix :p
Jamil Halabi
@jay3d
Can there be a dummy SceneGraph::MatrixTransformation3D which can return the transformation of the parent and pass it to children, aka. no composition of matrices
Or SceneGraph::ProxyMatrixTransformation3D
Like it will always return the local/world transformation of the parent. Just a transform-less object in the hierarchy
Vladimír Vondruš
@mosra
you could hack it together by having an object that has a transform that's inverse of the parent to cancel those out, i suppose
Fo Nz
@FoNz99089892_twitter
@mosra I would suggest to split the matrix multiplication in FlatGL shader. If you let the shader do it for you, should it be faster? Like the PhongGL one.
Vladimír Vondruš
@mosra
you mean the transformation / projection matrix? the shader has to do that for every vertex of the mesh, while if you do it on the CPU you do it just once
if you want to try this behavior out, you can use PhongGL with zero lights, that's basically the same as Flat except that it uses separate transformation and projection matrices :)
Mathew
@lectroMathew
Hello there, a bit abstract question, but what is more flexible to use with magnum, the ImGui Integration or Magnum::Ui?
Guillaume Jacquemin
@williamjcm
I personally recommend the ImGui integration, as Magnum::Ui has been neglected these past few years.
Vladimír Vondruš
@mosra
yep, as William says :)
Vladimír Vondruš
@mosra
https://www.phoronix.com/scan.php?page=news_item&px=Mesa-RADV-RT-For-Older-GPUs oh, does this mean i could get raytracing on my fancy 2018 laptop with a frankenstein Intel Radeon Vega card? :O
Vladimír Vondruš
@mosra
good thing i didn't even think yet about buying a NV RTX card for 8000€ or how much are the prices nowadays
Guillaume Jacquemin
@williamjcm
AMD's RX 6000 series supports raytracing, but like with Nvidia, good luck getting one at a decent price.
Vladimír Vondruš
@mosra
i have no intention of upgrading, this machine is still more than enough for my needs
the only potential reason to upgrade was to have a HW capable of raytracing so i could test for it, but if Mesa can emulate that, why bother ¯\_(ツ)_/¯
Fo Nz
@FoNz99089892_twitter

you mean the transformation / projection matrix? the shader has to do that for every vertex of the mesh, while if you do it on the CPU you do it just once

You are right, excuse me.

Hans Loeblich
@thehans
is there something equivalent to gluErrorString for magnum?
Vladimír Vondruš
@mosra
@thehans as in, converting the error code to a string? you have the following options:
  • Use the Debug utility, Debug{} << GL::Renderer::error(); will convert the enum to its string representation and print it to the standard output. Most magnum enums can be printed like this.
  • Or enable GL debug output (unless you're on Mac), and let the driver print detailed info about the error. Easiest if you use the builtin Application classes is to pass --magnum-gpu-validation on on the command line. Docs.
2 replies
Guillaume Jacquemin
@williamjcm
../../../third-party/corrade/src/Corrade/Containers/StaticArray.h:172:58: error: converting to 'Corrade::Containers::StaticArray<4, int>' from initializer list would use explicit constructor 'Corrade::Containers::StaticArray<<anonymous>, <template-parameter-1-2> >::StaticArray() [with long long unsigned int size_ = 4; T = int]'
  172 |         explicit StaticArray(Corrade::ValueInitT): _data{} {}
      |                                                          ^
I get that error for pretty much every StaticArray in the header file they're in. Maybe it's because they're in an anonymous struct in a class ?
Guillaume Jacquemin
@williamjcm
I moved them out, and the same error happens.
:thinking:
Oh, well, I should sleep, it's already 00:41 here.
Guillaume Jacquemin
@williamjcm
Okay, got it fixed.