Extension for material properties?


Extension for material properties?
#1
I had this topic in mind, when I stumbled on this very old thread. With the vastly increased use of photo-realistic rendering since then, I'm wondering if the subject has been given any more thought?

In particular, I've found that there's a fair number of parts that are made of a softer plastic than the typical ABS brick, and/or have a rougher, matte finish (like the slope texture that kicked off that thread). While there are already color categories for rubber, various metals, etc., there seems to be a lack of options for describing different solid plastic properties within LDraw.


As a more general note, this seems like another in a family of physical part characteristics that I could envision being described by a series of metadata extensions, possibly as part of a hypothetical LDraw 2.0. Others in the family could include snapping/connectivity info, physical part dimensions (for accurately rendering seams, or calculating part collisions), and kinematic info (for describing technical functions like gear meshes).
Reply
RE: Extension for material properties?
#2
Yes, I agree, it is about time to pick this topic up again after 9 years.

Especially when I did now the Technic Panels of the Lamborghini I noticed this with the test renders again they are too shiny when rendered with Stud.io

concerning Studio, they do have a small shadow library, e.g. for some slopes, where they add the typical pattern. I think they take the LGEO data for that.
Reply
RE: Extension for material properties?
#3
(2020-09-30, 21:13)Gerald Lasser Wrote: Yes, I agree, it is about time to pick this topic up again after 9 years.

But I think we all agreed on that no added info should be forced into the dat-files.
We don't want to recycle any file to add any metadata info.
Reply
RE: Extension for material properties?
#4
(2020-09-30, 21:24)Magnus Forsberg Wrote: But I think we all agreed on that no added info should be forced into the dat-files.
We don't want to recycle any file to add any metadata info.

Yeah. By "metadata" (and perhaps I'm misusing the term), I mean something separate and apart from the "data"—just as shadow libraries are now used. A user could add the info to any part, either in a joined file or by appending the .dat file itself, but no .dat would be made non-compliant by not having it.
Reply
RE: Extension for material properties?
#5
(2020-09-30, 21:24)Magnus Forsberg Wrote: But I think we all agreed on that no added info should be forced into the dat-files.
We don't want to recycle any file to add any metadata info.

We never agreed if information should be stored in a parallel library or just one file:

https://news.lugnet.com/cad/?n=11226

and we never will. I gave up on the topic and you should do the same.

w.
LEGO ergo sum
Reply
RE: Extension for material properties?
#6
(2020-10-03, 8:05)Willy Tschager Wrote: We never agreed if information should be stored in a parallel library or just one file:

https://news.lugnet.com/cad/?n=11226

and we never will. I gave up on the topic and you should do the same.

w.

I really think we should pull in and officialize (or, at least, officially bless) all the common meta commands (snapping, flexible parts, and instructions) and Roland's shadow library.
Reply
RE: Extension for material properties?
#7
I actually like the proposal in the "very old" thread, i.e. having a material start meta and end meta.

I got now the Trolls container, which is opaque on the outside, i.e. slightly rough, but on the inside it is shiny ABS. That's not a simple material property that can be applied to the part in general.

Some materials are covered by assigning a special color, like Rubber or metal
Reply
RE: Extension for material properties?
#8
(2020-10-03, 18:44)Gerald Lasser Wrote: I actually like the proposal in the "very old" thread, i.e. having a material start meta and end meta.

I got now the Trolls container, which is opaque on the outside, i.e. slightly rough, but on the inside it is shiny ABS. That's not a simple material property that can be applied to the part in general.

Some materials are covered by assigning a special color, like Rubber or metal

We already have a material start/end meta (sort of), it's called the texture extension.

It just needs some changes to make it work with in a different mode.

Maybe introduce a new meta name which is backwards compatible with the texture one. So parsers don't need to support jet another begin/end/next mechanism.  They would only need to disable part of it's parameter handling etc when the meta is called texture instead of e.g. 'material'
Reply
RE: Extension for material properties?
#9
(2020-10-03, 19:18)Roland Melkert Wrote: We already have a material start/end meta (sort of), it's called the texture extension.
It just needs some changes to make it work with in a different mode.
Maybe introduce a new meta name which is backwards compatible with the texture one. So parsers don't need to support jet another begin/end/next mechanism.  They would only need to disable part of it's parameter handling etc when the meta is called texture instead of e.g. 'material'
Then there is a need for some nesting, which is currently excluded from texmap specification: eg. we need to be able to apply texmap pattern on grainy slopes (BTW, what happens in various implementations if we try to apply texmap on something containing a subpart itself texmapped?)

Speaking of materials, we still don't have satisfying way to use texmap patterns containing metallic inks...
Reply
RE: Extension for material properties?
#10
(2020-10-03, 18:44)Gerald Lasser Wrote: Some materials are covered by assigning a special color, like Rubber or metal

How many of these properties could be placed in ldconfig?
IMO we are missing colour codes and properties on textile materials.
Reply
RE: Extension for material properties?
#11
(2020-10-04, 8:07)Magnus Forsberg Wrote: How many of these properties could be placed in ldconfig?
IMO we are missing colour codes and properties on textile materials.
IMHO linking material (eg. rubber) to color was a kludge and it would be better to find another way...
Reply
RE: Extension for material properties?
#12
(2020-10-04, 7:00)Philippe Hurbain Wrote: Speaking of materials, we still don't have satisfying way to use texmap patterns containing metallic inks...

Well actually we do: Gloss Map. But I don't know if any of the editors support it.
Reply
RE: Extension for material properties?
#13
(2020-10-04, 8:23)Philippe Hurbain Wrote: IMHO linking material (eg. rubber) to color was a kludge and it would be better to find another way...

Is there anything saying LDconfig is only for colors? Or could it contain one section for colors, and another for materials/finishes?
Reply
RE: Extension for material properties?
#14
(2020-10-04, 14:09)N. W. Perry Wrote: Is there anything saying LDconfig is only for colors? Or could it contain one section for colors, and another for materials/finishes?
Problem is not so much defining material than to use it. Basic LDraw syntax has a color property, but no material one...
Reply
RE: Extension for material properties?
#15
(2020-10-04, 14:27)Philippe Hurbain Wrote: Problem is not so much defining material than to use it. Basic LDraw syntax has a color property, but no material one...

I guess materials would be called by the syntax of the !MATERIAL (or !TEXTURE) meta.

Or maybe they could be called by the existing color property, using some kind of prefix system. E.g., color code 16 would be main color with no material specified, but 1600101 could be main color with a rubber finish, 1600201 would be main color in a slope texture, etc.  (Or use letters for material codes, or a character separator.)
Reply
RE: Extension for material properties?
#16
(2020-10-04, 21:52)N. W. Perry Wrote: Or maybe they could be called by the existing color property, using some kind of prefix system. E.g., color code 16 would be main color with no material specified, but 1600101 could be main color with a rubber finish, 1600201 would be main color in a slope texture, etc.  (Or use letters for material codes, or a character separator.)

I like this idea.

We could reuse one of the 'useless' color ranges (like the invisible ones).
Reply
RE: Extension for material properties?
#17
(2020-10-05, 18:02)Roland Melkert Wrote: I like this idea.

We could reuse one of the 'useless' color ranges (like the invisible ones).

I like this since it allows legacy software to be able to use a new ldconfig.ldr and default to still show colors correctly.

You and me might like this because it is neat because we see masks with the possibility of describing surfaces. However. I fear that we might make it too difficult for less technically inclined users.

For this reason I also want us to consider META statements, such as something like this impacting the next line:

0 !SURFACE [ROUGHNESS=0.8] [OTHER_FEATURE=VALUE] ...
1 2 0 0 0 1 0 0 0 1 0 0 0 1 subfile.dat
Reply
RE: Extension for material properties?
#18
(2020-10-05, 22:00)Lasse Deleuran Wrote: I like this since it allows legacy software to be able to use a new ldconfig.ldr and default to still show colors correctly.

You and me might like this because it is neat because we see masks with the possibility of describing surfaces. However. I fear that we might make it too difficult for less technically inclined users.

For this reason I also want us to consider META statements, such as something like this impacting the next line:

0 !SURFACE [ROUGHNESS=0.8] [OTHER_FEATURE=VALUE] ...
1 2 0 0 0 1 0 0 0 1 0 0 0 1 subfile.dat

My sense is that the technical difficulty of using a meta command vs. editing the config to include a new color/finish/material is approximately equal. So whatever solution gets the job done while meeting all the needs of an LDraw specification is probably best.

(And of course, the ldconfig is really just a bunch of meta commands anyway…)
Reply
RE: Extension for material properties?
#19
(2020-10-05, 18:02)Roland Melkert Wrote: I like this idea.

We could reuse one of the 'useless' color ranges (like the invisible ones).

One problem with this is that the material is then tied to a specific color. So, you then need to have a separate entry for every combination of color and non-standard material.
Reply
RE: Extension for material properties?
#20
(2020-10-08, 0:45)Travis Cobbs Wrote: One problem with this is that the material is then tied to a specific color. So, you then need to have a separate entry for every combination of color and non-standard material.

It should work the opposite way. If "1600101" refers to main color with a rubber finish, all you'd need to do is create the entry for rubber finish under 00101. The prefix would always be an existing color code, so the only entries you'd need to create are the materials.
Reply
RE: Extension for material properties?
#21
(2020-10-05, 18:02)Roland Melkert Wrote: I like this idea.

We could reuse one of the 'useless' color ranges (like the invisible ones).

What needs to happen next, if we want to go forward? (Just to keep the idea alive.)  Wink
Reply
RE: Extension for material properties?
#22
(Since the topic has come up once more…)

Question:
Would it make sense to use the existing MATERIAL tag, but:
  1. detach it from the !COLOUR meta into its own !MATERIAL meta, and
  2. use it to define additional material categories within ldconfig, separate from colors so that each individual combination needn't be defined explicitly?
Reply
RE: Extension for material properties?
#23
(2022-04-04, 19:55)N. W. Perry Wrote: (Since the topic has come up once more…)

Question:
Would it make sense to use the existing MATERIAL tag, but:
  1. detach it from the !COLOUR meta into its own !MATERIAL meta, and
  2. use it to define additional material categories within ldconfig, separate from colors so that each individual combination needn't be defined explicitly?

The problem is that they are very much intertwined. Yellow rubber is not the same yellow as yellow plastic. I'm not convinced there is a good solution to this.

Surface finish, on the other hand, could be specified with some sort of material tag.
Reply
RE: Extension for material properties?
#24
(2022-04-04, 20:22)Orion Pobursky Wrote: The problem is that they are very much intertwined. Yellow rubber is not the same yellow as yellow plastic. I'm not convinced there is a good solution to this.

Surface finish, on the other hand, could be specified with some sort of material tag.

Yellow slope surface is, however, the same yellow. And yellow rubber is already defined by the !COLOUR meta, so if that is indeed the necessary way to do it, then we can consider rubber to already be solved.
Reply
RE: Extension for material properties?
#25
(2022-04-04, 21:00)N. W. Perry Wrote: Yellow slope surface is, however, the same yellow. And yellow rubber is already defined by the !COLOUR meta, so if that is indeed the necessary way to do it, then we can consider rubber to already be solved.

I was just using rubber as an example. Red cloth (which isn't defined) is also a different red from both red rubber and red plastic. My point is that material properties and color are (mostly) inseparable so the solution in place is fine.

As far as surface finish, the only real need for for slope bumps and I support a new META for that.
Reply
RE: Extension for material properties?
#26
(2022-04-04, 21:24)Orion Pobursky Wrote: I was just using rubber as an example. Red cloth (which isn't defined) is also a different red from both red rubber and red plastic. My point is that material properties and color are (mostly) inseparable so the solution in place is fine.

As far as surface finish, the only real need for for slope bumps and I support a new META for that.

Well, even better, then—existing material tag for those cases which require it, and new META for those which require it. The concern was that the new proposal would create the intertwining of color and material—but if it exists already, then that is not a concern. And anything defined by the new META would not be intertwined. The only drawback is that it does not undo the intertwining (but would probably be capable of doing so, if it later became desirable).

Some next questions would be:
  • what new materials/textures need to be defined this way (vs. by the original method)?
  • what parameters would the new META need to have?
  • how are new materials coded? is the numerical prefix system adequate?
Reply
RE: Extension for material properties?
#27
(2022-04-04, 21:40)N. W. Perry Wrote: [*]what new materials/textures need to be defined this way (vs. by the original method)?

The only appropriate thing I can think of would be slope bumps

(2022-04-04, 21:40)N. W. Perry Wrote: [*]what parameters would the new META need to have?

Keep it simple. Something like:
0 !SURFACE SLOPE|(Other surface finishes here)

(2022-04-04, 21:40)N. W. Perry Wrote: [*]how are new materials coded? is the numerical prefix system adequate?

How those surfaces are rendered would be up to the author of the program that implements the META.
Reply
RE: Extension for material properties?
#28
(2022-04-04, 21:24)Orion Pobursky Wrote: I was just using rubber as an example. Red cloth (which isn't defined) is also a different red from both red rubber and red plastic. My point is that material properties and color are (mostly) inseparable so the solution in place is fine.

As far as surface finish, the only real need for for slope bumps and I support a new META for that.
Doing that tho creates flood of same color in different finish. It creates at least solid, rubber, cloth, ink and soft finishes for the one Lego Color, multiplying possible count of colors by 5. I think that adding some sort of the META that defines the finish for those materials would make things easier for defining the standard. If also trying to keep backwards compatibility, extra RGB values can be defined through, for example, new config files specifically those finishes, and also leaving for software designers to also have procedurally-generated values for various finishes if there are no pre-defined ones
Reply
RE: Extension for material properties?
#29
(2022-04-04, 23:37)Max Murtazin Wrote: Doing that tho creates flood of same color in different finish. It creates at least solid, rubber, cloth, ink and soft finishes for the one Lego Color, multiplying possible count of colors by 5. I think that adding some sort of the META that defines the finish for those materials would make things easier for defining the standard. If also trying to keep backwards compatibility, extra RGB values can be defined through, for example, new config files specifically those finishes, and also leaving for software designers to also have procedurally-generated values for various finishes if there are no pre-defined ones

This is exactly what I'm saying. The yellow RGB values for rubber, cloth, plastic, and string are different. So we'll have to define different colors for them anyway. In other words the way we do things now. This means that a material tag separate from color only make sense for different surface finishes for like materials. The only use case I can come up with off the top of my head is slope "roughness".
Reply
RE: Extension for material properties?
#30
(2022-04-04, 22:05)Orion Pobursky Wrote: The only appropriate thing I can think of would be slope bumps

There are a couple of other plastic finishes, most notably the less glossy finish found on the softer plastics used for pointed parts. Maybe some other "frosted" surfaces, and I believe there are a few different grades of roughness for the slopes as well. These might well all fall under the same set of parameters as the slope surface.

Otherwise, printed/sticker/ink surfaces also tend to have a duller finish. But these also have their own peculiar colors, so maybe those are kept within the !COLOUR meta.

Quote:Keep it simple. Something like:
0 !SURFACE SLOPE|(Other surface finishes here)

I guess the specific parameters would be defined by the individual materials—in other words, just the same way as the MATERIAL tag is now.

Quote:How those surfaces are rendered would be up to the author of the program that implements the META.

By coding I meant the numerical code. In other words, if the code for the slope material is 00100, then a yellow slope would get color code 1400100. But maybe it should be 14-100, or 14.100, or not use numerals at all…
Reply
RE: Extension for material properties?
#31
(2022-04-05, 1:59)N. W. Perry Wrote: By coding I meant the numerical code. In other words, if the code for the slope material is 00100, then a yellow slope would get color code 1400100. But maybe it should be 14-100, or 14.100, or not use numerals at all…

Oh. Ok. I meant something like:
0 !SURFACE SLOPE
<one or more type 1,3, or 4 lines>
0 !SURFACE END
Reply
RE: Extension for material properties?
#32
Yes to both. If RGB values are indeed different for each material version of a color, then you will have the flood of combinations either way, because the existing color definition spec would be retained. The new material definitions wouldn't change that, but they wouldn't be the cause of it, either. And at least, they would provide the option to reduce the flood, if a way can be found to programmatically relate the difference in RGB between a base color and its material variant. This could be part of the supplied parameters to a material definition.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 7 Guest(s)