| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,662
» Latest member: Volyk
» Forum threads: 6,399
» Forum posts: 53,103
Full Statistics
|
| Online Users |
There are currently 482 online users. » 1 Member(s) | 475 Guest(s) Applebot, Baidu, Bing, Facebook, Google, Yandex, Gerald Lasser
|
| Latest Threads |
Incomplete image of two m...
Forum: Website Suggestions/Requests/Discussion
Last Post: Alfred Schmitz
1 hour ago
» Replies: 3
» Views: 156
|
Discussion - proposal to ...
Forum: Official File Specifications/Standards
Last Post: N. W. Perry
Yesterday, 17:57
» Replies: 47
» Views: 4,592
|
Help unscaling a whole LD...
Forum: Help Wanted
Last Post: N. W. Perry
Yesterday, 17:38
» Replies: 5
» Views: 244
|
Decorated Part: 21560 - L...
Forum: Part Requests
Last Post: Paul Haan
Yesterday, 14:44
» Replies: 2
» Views: 150
|
Enabling 'reactions' to p...
Forum: Website Suggestions/Requests/Discussion
Last Post: tom alphin
Yesterday, 4:43
» Replies: 0
» Views: 104
|
LEGO Parts Guide - Only 3...
Forum: Part Requests
Last Post: tom alphin
Yesterday, 3:03
» Replies: 37
» Views: 4,877
|
Parts Request- Marvel 202...
Forum: Part Requests
Last Post: James Simpson
Yesterday, 1:45
» Replies: 10
» Views: 1,942
|
Help Wanted: Discord Admi...
Forum: Help Wanted
Last Post: Orion Pobursky
2026-02-17, 21:53
» Replies: 3
» Views: 575
|
2x2 slope double tapered ...
Forum: Part Requests
Last Post: SNIPE
2026-02-17, 14:26
» Replies: 2
» Views: 193
|
Incorrect reference to Br...
Forum: Parts Tracker Discussion
Last Post: Chris Böhnke
2026-02-17, 5:22
» Replies: 5
» Views: 171
|
|
|
| Need some help with code |
|
Posted by: Max Murtazin - 2023-04-04, 19:26 - Forum: LDraw File Processing and Conversion
- Replies (5)
|
 |
So, I've been writing some basic LDRaw "unpacker" for some recent time, and have encountered a problem.
I'm really not sure why, but my code for transforming line type 1 makes model fall apart. It handles fine transforming all other line types, but when it comes to 1s everything breaks unless they have identity matrices for their transformations.
Checked everything, but can't find the issue. Can anybody help me with the thing?
Link to the code: https://pastebin.com/tcy91ih2
|
|
|
| ldr_wgpu high performance realtime LDraw renderer |
|
Posted by: Jonathan N - 2023-04-04, 16:13 - Forum: Rendering Techniques
- Replies (8)
|
 |
I've been working on an experimental renderer for LDraw files. The goal is to create a performant rendering engine targeting modern GPUs. The renderer is built on top of wgpu, which uses Vulkan, DX12, or Metal depending on the platform. These APIs are newer than OpenGL and enable access to more hardware features. This includes most devices made in the last 10 years or so. This should work in the browser eventually once WebGPU is released.
The framerates can easily be several times faster than existing renderers in applications like LeoCAD, Blender, LDView, etc. My desktop with an RTX 3060 only gets 1 fps (1000+ms) per frame when viewing Datsville with standard resolution primitives and no logos on studs. I get about 6-7 fps when Fully zoomed out in ldr_wgpu. Framerates shoot up to 60-120 fps when viewing a more modest area of the scene.
While the newer graphics APIs have less CPU overhead, the biggest performance improvements come from only rendering what's actually visible each frame. This is why the framerate is highly variable as the camera moves around. ldr_wgpu performs culling at the object level. Frustum culling culls any objects that are outside the camera's viewable area. Occlusion culling culls any objects that are completely obscured by other objects. While conceptually simple, occlusion culling is hard to implement efficiently. See the README on the github repository linked below and the source code for more details. The culling is calculated each frame in real time and only requires precalculating bounding boxes and bounding spheres. When zoomed out, frustum culling no longer helps. Occlusion culling can often reduce the amount of rendered geometry by 2x-3x.
There have been a number of posts about level of detail for studs and primitives. This improves performance but greatly reduces the visual quality. Thankfully, this isn't the only way to reduce the amount of vertex processing that needs to be done by the GPU. Indexed drawing can be faster than non indexed drawing but only if duplicate vertices are merged. Modern GPUs can cache vertices with the same index. This cut the vertex processing time in half when profiling on my M1 Macbook Air.
The other main topic of discussion I've seen is BFC as a performance enhancement. Whether this helps or not is highly dependent on the situation. Backface culling happens after the vertices are processed by the vertex shader. If you have a very simple pixel/fragment shader as is common in many CAD programs, there won't be much of a performance difference. I haven't been able to measure any performance difference in my testing since I'm currently just using flat shading. The processing time each frame was easily dominated by the vertex shader. I'll reassess the impact if I implement more complicated lighting and shading in the future.
The code is designed to serve as a reference for people wanting to optimize their own renderers. I've done my best to comment any techniques and link to papers and articles where appropriate. I don't have any prebuilt executables at the moment, but you can download the code from github and compile it yourself. This requires having the Rust language toolchain installed. I plan on making this into a library that people can use for their own Rust projects eventually. There are still a number of features and improvements to address like normals and more realistic shading. The github repository will be updated periodically with new techniques and insights.
https://github.com/ScanMountGoat/ldr_wgpu
|
|
|
| PT Login and Parts with missing references |
|
Posted by: Orion Pobursky - 2023-04-04, 15:02 - Forum: Parts Tracker Discussion
- No Replies
|
 |
A couple of admin items:
- I'll be troubleshooting some user's trouble with the PT logging them in based on their forum credentials. This may involve me force logging out everyone from the forums.
- I'm going to add a validation to prevent submitting a part that has missing references. Fixing these takes times away from working on important things. Parts should be submitted in a "ready to go condition" and that hasn't been happening in some cases.
|
|
|
| Pattern categories |
|
Posted by: Orion Pobursky - 2023-04-01, 13:21 - Forum: Official File Specifications/Standards
- Replies (1)
|
 |
I'd like to drop the CMF pattern categories.
As a broader proposal, I'd like to drop pattern categories completely.
I feel keywords better suited, many patterns cross categories, and we've already ignored the rules in some cases (Nexo shields). Additionally it is felt that choosing the "correct" code is a source of confusing among new authors.
|
|
|
| Chance edge color ? |
|
Posted by: dkd - 2023-03-29, 16:05 - Forum: Help
- Replies (8)
|
 |
Hey
I have a small problem - when I use, for example, the color reddish brown (70,p), there is a white edge line, is it possible to change it in the configuration so that it becomes black?
Many thanks in advance - dkd
|
|
|
|