| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 250 online users. » 1 Member(s) | 246 Guest(s) Baidu, Bing, Google, Andy H
|
| Latest Threads |
The colour of textures in...
Forum: Parts Authoring
Last Post: Orion Pobursky
Today, 2:26
» Replies: 4
» Views: 145
|
Keywords and invalid 0 li...
Forum: Parts Tracker Discussion
Last Post: Orion Pobursky
2025-11-03, 22:17
» Replies: 6
» Views: 200
|
Minifigure Head MINI HEAD...
Forum: Part Requests
Last Post: Bailey Meyer
2025-11-03, 20:37
» Replies: 5
» Views: 410
|
Friends 2025
Forum: Official Models
Last Post: Philippe Hurbain
2025-11-02, 19:24
» Replies: 1
» Views: 365
|
Technic 1990
Forum: Official Models
Last Post: Takeshi Takahashi
2025-11-02, 15:05
» Replies: 14
» Views: 18,475
|
Sorting by date
Forum: Website Suggestions/Requests/Discussion
Last Post: Peter Blomberg
2025-11-01, 10:22
» Replies: 5
» Views: 519
|
Parts request , spider we...
Forum: Part Requests
Last Post: Peter Grass
2025-10-31, 11:23
» Replies: 1
» Views: 220
|
Part 4070 differences in ...
Forum: Parts Authoring
Last Post: Peter Grass
2025-10-31, 10:58
» Replies: 7
» Views: 656
|
Empty file with MLCad
Forum: Parts Authoring
Last Post: Orion Pobursky
2025-10-30, 0:20
» Replies: 2
» Views: 300
|
Duplo parts not yet in LD...
Forum: Part Requests
Last Post: Peter Grass
2025-10-29, 9:46
» Replies: 16
» Views: 2,340
|
|
|
| How do digital lego builders procedurally generate the positions of anti-studs? |
|
Posted by: Lasse Boijens - 2019-03-14, 11:40 - Forum: Help
- Replies (4)
|
 |
So I was wondering, does anybody know how lego builders using LDraw assign the locations of all holes/anti-studs?
I'm building my own VR lego builder and getting the studs in is easy because there is a subfile for 'stud' which I can just detect and save the position of. However, since holes are not one subpart but rather the space in-between other subparts, I have no idea how to do this without going through brick-by-brick.
I presume that there must be some method of doing this since I highly doubt that the creators of programs like leocad/stud.io/ldd have taken the time to manually enter the locations for all the hundreds of thousands of anti-studs. I know that leocad is open source but unfortunately, due to my inexperience with the way that program is written, I am unable to find how it is handled there.
Does anyone happen to know how/if it can be done?
|
|
|
| Problem with normals when building my own LDraw interpreter. |
|
Posted by: Lasse Boijens - 2019-03-12, 21:41 - Forum: Help
- Replies (7)
|
 |
So first of all, as a little announcement, I've started work on a virtual reality lego builder, which I'm really excited for, and a lot of the work's already done, but I've only recently started on the work for actually allowing the LDraw .dat files to be used to load in bricks instead of inefficiently storing the bricks as models. I'm using the game engine unity since I have a reasonable amount of experience with it and integrating VR is easy-peasy, but now I'm having problems getting the normals to display correctly.
I'm aware of BFC and winding, and I've taken an example of little bits and bobs from the old LDrawToObj convertor from Rold Redford (https://github.com/rredford/LdrawToObj) and that got me most of the way there, but now I'm stuck with some issues with faces not having correct normals. I have to admit I think that it's a bit difficult to explain why this is happening since I don't really know what I'm missing, but I hope that when I share some images and examples other people might be able to help me out. I can post the C# code I'm using if anyone thinks it'll help, but it's fairly messy and lacking comments so I don't think it'll be too useful.
On top of that, apologies if this forum already holds the answer to my question, but I wasn't able to find it.
![[Image: AM1t2PC.png]](https://imgur.com/AM1t2PC.png)
![[Image: kPmrWS7.png]](https://imgur.com/kPmrWS7.png)
So here we have the standard 2x2 brick. This brick is generated perfectly except that the 4 quads at the bottom of the brick are facing the wrong way. The winding should be correct, and the inversion system should be correct, else how could the rest of the brick generate perfectly? The only real repeating logic I can see with this problem is that (as far as I'm aware) normals never face the right way when primitives are created in the base brick file, only in subparts. But how is that possible? Are there some rules that I'm missing here?
But primitives in the root file aren't the only ones to not work consistently; for instance here in the 2x3 brick:
![[Image: Z5Dj9w5.png]](https://imgur.com/Z5Dj9w5.png)
The same four quads at the bototm are inverted, but also one of the faces of the outer box-5. This image has my debug-lines enabled so you can see the shape it's supposed to have more clearly. (Note that the normals on the inside of the brick are correct, since you are supposed to see through them from this angle.)
Lastly, the standard 2x4 brick shows some strange behaviour. This might be an unrelated issue and this is the only brick I've tested where this problem occurs (it's also easily fixable by changing one of the transformations in the 2x4 brick file, but that cant be right.) but I'm posting it here anyways just in case some very clever person can tell me that that's related to the same issue.
![[Image: HWD9X98.png]](https://imgur.com/HWD9X98.png)
Thanks so much for anyone willing to help me out here! I've been stuck on this for ages...
|
|
|
| PatternFolder - Project Stickers and Prints onto Surfaces (Web-based, all platforms) |
|
Posted by: Lasse Deleuran - 2019-03-09, 21:25 - Forum: LDraw Editors and Viewers
- Replies (5)
|
 |
I have just released first version of Pattern Folder. It is a simple Javascript based tool to add curvature to LDraw files. See how to use it in the video below.
How to get started (as shown in the video)
1) Go to https://c-mt.dk/software/pf/ and add your sticker.
2) Use a file, URL or simply paste the content of your LDraw file. Please note that only line type 0, 2, 3 and 4 are supported. Sub-files (type 1) and conditional lines (type 5) or any other digital file format are not yet supported.
3) Click on the surface of your choice (or type in your own. Click the various surfaces or see the video to learn how).
4) Download your folded LDraw file.
Bonus
See building instructions for the Corvette here: https://brickhub.org/i/224
Building instructions for the Porsche 911 RSR is found here: https://brickhub.org/i/193 (not all stickers made yet)
Pattern Folder is 100% free to use, copy, improve, and eat (dietary restrictions may apply). It is also free from advertising and complies to GDPR because it doesn't track anything, nor take ownership of anything you use it for. I have added an ad to the video in order to pay for the website hosting.
GitHub project: https://github.com/LasseD/PatternFolder Feel free to make pull requests, raise issues, fork, clone, etc.
Please feel free to post ideas, suggestions, missing patterns, bugs, ... or if you think this kind of tool is a stupid or great idea.
|
|
|
|