21 Nov 2023 |
David Huculak | In reply to @timokoesters:fachschaften.org This channel is too quiet, take this: https://www.youtube.com/watch?v=7Ix_5wGZxwg Thanks, I enjoyed | 15:47:35 |
22 Nov 2023 |
| norlock joined the room. | 18:45:27 |
norlock | Does anyone know here what to do if you import something from blender that looks huge in wgpu? It "seems" ok with my limited knowledge in blender | 18:46:17 |
norlock | scale in blender is 1x1x1 | 18:47:15 |
David Huculak | Do u have a repo that produces the issue? I could take a look | 19:04:59 |
David Huculak | Could be caused by a number of different things | 19:05:25 |
David Huculak | My first guess would be that the object you're comparing it to is actually really small | 19:05:54 |
norlock | Ah ok | 19:14:43 |
norlock | yes | 19:14:45 |
norlock | I commit it here: https://github.com/Norlock/sparticles/tree/models. | 19:16:20 |
norlock | On gltf viewer it seems fine: https://gltf-viewer.donmccurdy.com/ | 19:16:56 |
norlock | * On gltf viewer it seems fine: https://gltf-viewer.donmccurdy.com/ . https://github.com/Norlock/sparticles/blob/models/src/loader.rs code of loading gltf | 19:18:34 |
norlock | * On gltf viewer it seems fine: https://gltf-viewer.donmccurdy.com/ .
https://github.com/Norlock/sparticles/blob/models/src/loader.rs code of loading gltf | 19:47:57 |
norlock | * On gltf viewer it seems fine: https://gltf-viewer.donmccurdy.com/ .
https://github.com/Norlock/sparticles/blob/models/src/loader.rs code for loading gltf | 19:48:10 |
David Huculak | it looks like your gltf loader isn't taking into account the transforms from the gltf nodes | 21:18:22 |
David Huculak | and the drone.glb model you're loading has a scale of 0.01 applied to it on one of the nodes | 21:19:57 |
David Huculak | Download image.png | 21:20:03 |
norlock | Ok I will have to look where I can find that, because the gltf-loader doesn't support that function | 21:26:43 |
norlock | https://docs.rs/gltf/latest/gltf/struct.Primitive.html | 21:27:14 |
norlock | or is it morph targets? | 21:27:40 |
David Huculak | Download image.png | 21:32:21 |
David Huculak | you'll want to call this transform() function on the nodes that you're loading as well as recursively multiply them with their parents to get the correct global transform | 21:33:35 |
David Huculak | * you'll want to call this transform() function on the nodes that you're loading as well as recursively multiply them with their parent nodes to get the correct global transform | 21:33:55 |
norlock | Ahhh thanks | 21:35:03 |
David Huculak | this small pdf cheatsheet helped me out a lot when writing a gltf loader for my project: https://www.khronos.org/files/gltf20-reference-guide.pdf | 21:36:10 |
norlock | Yeah I just extracted the JSON from the GLB now which I could have done before as well :/. Cool I already had some other weird issues with other models | 21:37:39 |
David Huculak | if you convert your .glb to a .gltf there's a really nice vscode extension that makes it much easier to explore those json files + preview in vscode directly | 21:40:03 |
David Huculak | https://marketplace.visualstudio.com/items?itemName=cesium.gltf-vscode | 21:40:37 |
norlock | I don't use vscode but maybe I can find some alternative for neovim / online | 21:45:32 |
norlock | * I don't use vscode but maybe I can find some alternative online | 21:46:04 |