| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,687
» Latest member: Longde
» Forum threads: 6,410
» Forum posts: 53,150
Full Statistics
|
| Online Users |
There are currently 156 online users. » 1 Member(s) | 152 Guest(s) Baidu, Bing, Google, Hageta
|
| Latest Threads |
New Community System Soon...
Forum: All Other Programs.
Last Post: Hageta
17 minutes ago
» Replies: 2
» Views: 52
|
File Format for the Studi...
Forum: Off-Topic
Last Post: Ryan Gross
8 hours ago
» Replies: 11
» Views: 15,720
|
Tip on where to put "0 BL...
Forum: Parts Authoring
Last Post: Hageta
Yesterday, 21:37
» Replies: 0
» Views: 49
|
2026-02 Update status
Forum: Parts Tracker Discussion
Last Post: Orion Pobursky
Yesterday, 18:31
» Replies: 0
» Views: 59
|
Friends 2026
Forum: Official Models
Last Post: Philippe Hurbain
Yesterday, 8:07
» Replies: 3
» Views: 274
|
Dropping Frame Rate when ...
Forum: LDraw Editors and Viewers
Last Post: Gerald Lasser
2026-02-24, 23:48
» Replies: 4
» Views: 355
|
LDView 4.7 Released
Forum: LDraw Editors and Viewers
Last Post: Orion Pobursky
2026-02-24, 15:10
» Replies: 1
» Views: 150
|
Technic 1992
Forum: Official Models
Last Post: Takeshi Takahashi
2026-02-24, 13:22
» Replies: 32
» Views: 47,261
|
SF90 XX tires 5810 to go ...
Forum: Part Requests
Last Post: Magnus Forsberg
2026-02-23, 22:38
» Replies: 2
» Views: 325
|
Part request for Set 4205...
Forum: Part Requests
Last Post: Alfred Schmitz
2026-02-23, 15:54
» Replies: 6
» Views: 417
|
|
|
| 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.
|
|
|
| LDCad View option |
|
Posted by: Johann Eisner - 2019-03-04, 20:41 - Forum: LDraw Editors and Viewers
- Replies (5)
|
 |
Hi
Before LDCad has created the image structure of the model, all parts are displayed with a green cross.
Is a part in the library not available with a red cross.
Is it possible to switch back so that you can only see the crosses again?
Regards Johann
|
|
|
|