LDraw.org Discussion Forums

Full Version: Molded "LEGO" on brick knobs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Many LEGO pieces have "LEGO" molded on every knob. (I think it is with every solid knob which seems to affect "System" pieces as opposed to "Technic" pieces.) In fact they happen to have other things molded as well but those are usually hidden and very across the same type of piece.

But it seems to me that LDraw somehow doesn't include that. Or at least not as "first class citizen". MLCad doesn't show such molds at all. LDView does.

So how is that stored? Judging by how LDView shows it it is not part of the 3D object but rather a "texture" (that would also explain why MLCad doesn't show it).

Why is it so? Would that be too complex to model that as well? Or is it just for historical reasons?

I surly do see potential opportunities. General building guidelines forbid some constructions as they stress the pieces too much. Among them are such that are allowed with pieces without molded "LEGO" and disallowed with others. Having the "LEGO" in 3D model would allow automatic recognition of touching edges (and thus unadvised build).



An another question associated with this topic. It seems that LEGO instructions always are written so, that the molded "LEGO" is normalized in specified directions. So that includes favoring certain pieces rotations over other mathematically equivalent.

Are LDraw pieces normalized in any way that would allow to predict orientation of the molded "LEGO" in applications that show it? (It is even more important if build editors - like MLCad - don't show it so it is not visible immediately.) Are there any programs capable of checking for such inconsistency in models or even correct them?
Adam Badura Wrote:So how is that stored? Judging by how LDView shows it it is not part of the 3D object but rather a "texture" (that would also explain why MLCad doesn't show it).

Why is it so? Would that be too complex to model that as well? Or is it just for historical reasons?

It's a bit of both. It's quite a lot of complexity to render in 3D. That said, you can add the logo by swapping some files around, however this is not recommended for a novice user.

Quote:Are LDraw pieces normalized in any way that would allow to predict orientation of the molded "LEGO" in applications that show it? (It is even more important if build editors - like MLCad - don't show it so it is not visible immediately.) Are there any programs capable of checking for such inconsistency in models or even correct them?

Yes the parts should ideally be designed show the LEGO in the correct orientation when it is optionally switched on (e.g. in LDView or POVray renders). But there is no requirement to do so and it is not guaranteed.

Tim
LDView can add the logo on its own programmatically.
It uses the affected stud's orientation to place it.
It uses a OpenGL texture for that purpose.
When exporting to POVRay, it adds a user-settable option to turn on and off logos.

Some people, including me, prefer to also see a logo in other tools, e.g., while doing 3D editing in MLCad. To achieve that, simply 2 files need to be exchanged:
replace stud.dat by stud-logo.dat.
replace stud2.dat by stud2-logo.dat.
The 2 mentioned files are not official yet and can be found amongst the unofficial files on the parts tracker.
They will add some trivial, minimalistic logo modeled by lines,
but which - at least for me - already brings some lego feeling.

If you want to go further and have a logo modeled fully in 3d, then you can replace the 2 mentioned files by different ones which do that:
by tchang from http://jc-tchang.philohome.com/manuel/pa...ogo_tchang

We have no official solution yet how to include these 4 different stud detail levels in our library. They are:
- no logo at all
- a logo added by the tool, not the library
- a logo added by the library as thin lines
- a logo added by the library in full 3d

My suggestion is to simply include all these files in the library, and let a tool decide
which version of stud.dat or stud2.dat it wants to use. There is even a 5th possibility:
- a logo added by the library using the new !TEXMAP syntax
Again, my suggestion is to have all these in the set of official files and let the user's tools decide.

Historic tools like MLCad of course do not have such a toggle, so you there are currently forced to swap the files in the file system.
I tried using those full 3D by tchang from the link you provided.

  1. I downloaded the ZIP.
  2. Then I unpacked it in C:\Program Files (x86)\LDraw (so now there is a subdirectory stud_logo).
  3. Then I opened console (in administrator mode so that file operations succeed!) in C:\Program Files (x86)\LDraw\ stud_logo.
  4. The batch files there seemed ordinary Windows batch files. They had wired comments starting with ‘ rather then REM – maybe that is from PowerShall or whatever – and those failed upon execution but it didn’t disturb the actual commands.
  5. First I run sav_orig.bat to store original files.
  6. Then I run logo_used_rect.bat to give a try to that version.

But nothing changed in MLCad!
  • The files did change (I checked that).
  • MLCad does use that directory (I checked that in registry; it is from all-in-one-intstaller).
  • MLCad claimed to find new parts. I think it was when I selected Parts Tree / Tree Configuration... in parts tree (upper right corner) and accepted resulting dialog. But I’m not sure now. Anyway it didn’t show which are the new parts and I don’t see any difference.

I even tried starting a new project in MLCad but that still doesn’t help. All previews, including the 3D one, still don’t show the logo.

Any advice?
These files are not parts, but primitives.
So they have nothing to do with MLCad's "parts list" window. They do not show up there.
Instead, they are _used_ by parts for their implementation.
Your goal is to modify the primitives stud.dat and stud2.dat in a way
so that they show a LEGO logo. This then automagically will affect all parts using them.

Maybe it is just something trivial that is wrong for you:
did you check that in MLCad's settings "Settings/General/Change.../Rendering/Edit mode options/Stud mode"
is set to "normal", and the checkbox "draw to selected object only" is _unchecked_?
Otherwise, MLCad will not show the studs as you want.

In the meantime, I've uploaded tchang's differently logoed studs to the parts tracker, so you now can simply
just download all the unofficial files from http://www.ldraw.org/library/tracker/
Remember that they still are unofficial, so they may change in any way in future.
However, since many people ask me for this kind of logoed studs, and I want to use them easily myself,
I thought that after 4 years, their time has come to finally go to the parts tracker, wherever they finally
may land.

These files are now on the parts tracker:

5 different implementations of LEGO logos:
p/logo.dat
p/logo2.dat
p/logo3.dat
p/logo4.dat
p/logo5.dat
Accordingly, 5 versions of normal studs using them:
p/stud-logo.dat
p/stud-logo2.dat
p/stud-logo3.dat
p/stud-logo4.dat
p/stud-logo5.dat
And 5 versions of open studs using them:
p/stud2-logo.dat
p/stud2-logo2.dat
p/stud2-logo3.dat
p/stud2-logo4.dat
p/stud2-logo5.dat
For all of these, matching fast-draw files have been created in the p\8 folder,
plus MLCad redirections stu2*.dat to them in the p\folder.

Using these files is very easy.
The only thing you need to do is to replace your stud.dat and stud2.dat implementations
to no longer model the studs on their own, but instead redirect to a logoed version.
Thus, in the official "P" folder, modify the 2 files this way:
1. comment-out their current contents.
2. add a single line which instead uses a logoed implementation.

Thus, p\stud.dat becomes
Code:
0 Stud
0 Name: stud.dat
0 Author: James Jessiman
0 !LDRAW_ORG Primitive UPDATE 2012-01
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt

0 BFC CERTIFY CCW

0 !HISTORY 2002-04-04 [sbliss] Modified for BFC compliance
0 !HISTORY 2002-04-25 [PTadmin] Official Update 2002-02
0 !HISTORY 2007-06-24 [PTadmin] Header formatted for Contributor Agreement
0 !HISTORY 2008-07-01 [PTadmin] Official Update 2008-01
0 !HISTORY 2012-02-16 [Philo] Changed to CCW
0 !HISTORY 2012-03-30 [PTadmin] Official Update 2012-01

0 // 1 16 0 0 0 6 0 0 0 1 0 0 0 6 4-4edge.dat
0 // 1 16 0 -4 0 6 0 0 0 1 0 0 0 6 4-4edge.dat
0 // 1 16 0 0 0 6 0 0 0 -4 0 0 0 6 4-4cyli.dat
0 // 1 16 0 -4 0 6 0 0 0 1 0 0 0 6 4-4disc.dat

1 16 0 0 0 1 0 0 0 1 0 0 0 1 stud-logo5.dat
and p\stud2.dat becomes
Code:
0 Stud Open
0 Name: stud2.dat
0 Author: James Jessiman
0 !LDRAW_ORG Primitive UPDATE 2009-02
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt

0 BFC CERTIFY CCW

0 !HISTORY 1999-07-05 [PTadmin] Official Update 1999-05
0 !HISTORY 2002-04-04 [sbliss] Modified for BFC compliance
0 !HISTORY 2002-04-25 [PTadmin] Official Update 2002-02
0 !HISTORY 2007-06-24 [PTadmin] Header formatted for Contributor Agreement
0 !HISTORY 2008-07-01 [PTadmin] Official Update 2008-01
0 !HISTORY 2009-06-21 [cwdee] Update ring references to 4-4ring
0 !HISTORY 2009-09-03 [PTadmin] Official Update 2009-02

0 // 1 16 0 0 0 4 0 0 0 1 0 0 0 4 4-4edge.dat
0 // 1 16 0 0 0 6 0 0 0 1 0 0 0 6 4-4edge.dat
0 // 1 16 0 -4 0 4 0 0 0 1 0 0 0 4 4-4edge.dat
0 // 1 16 0 -4 0 6 0 0 0 1 0 0 0 6 4-4edge.dat
0 // 0 BFC INVERTNEXT
0 // 1 16 0 -4 0 4 0 0 0 4 0 0 0 4 4-4cyli.dat
0 // 1 16 0 -4 0 6 0 0 0 4 0 0 0 6 4-4cyli.dat
0 // 1 16 0 -4 0 2 0 0 0 1 0 0 0 2 4-4ring2.dat

1 16 0 0 0 1 0 0 0 1 0 0 0 1 stud2-logo5.dat

You can play around with different logo implementations by modifying these 2 files and in them use
stud-logo5.dat
stud2-logo5.dat
or
stud-logo4.dat
stud2-logo4.dat
or
stud-logo3.dat
stud2-logo3.dat
or
stud-logo2.dat
stud2-logo2.dat
or
stud-logo.dat
stud2-logo.dat
Indeed it was the "Stud mode" setting.

The value was "Coarse" and changing it to "Normal" showed the logos. I'm not sure if "Coarse" is default or I changed it myself. But anyway it works now!

Thanks!
yes, I remember also dark that "coarse" is the unlucky default...
Hi,

unfortunately those replacements of the LEGO logos are broken. How can I fix it? What tool was used to create the geometry? The text coordinates in the .dat files are confusing and I can't check and fix this by hand.
No, they aren't broken. If they aren't working for you, you're doing something wrong. Note that they are 5 variations of the same thing. The first two variations just use edge lines for the logo geometry, so wouldn't show up at all in a photo-realistic render. The five studs look like so:

[Image: C542sGx.png] stud-logo.dat
[Image: c5utNwq.png] stud-logo2.dat
[Image: nSs8nzi.png] stud-logo3.dat
[Image: hdDx6Ww.png] stud-logo4.dat
[Image: dHGnafU.png] stud-logo5.dat

In my opinion, 4 looks the best, 5 looks too shallow, and 3 looks OK, with a lot lower geometric complexity.
Yes. I found out why they were wrong imported. Is there a hi-res version? I need more faces to get round looking studs.
Pages: 1 2