Introducing a second HL library? - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: General (https://forums.ldraw.org/forum-12.html) +--- Forum: Official File Specifications/Standards (https://forums.ldraw.org/forum-32.html) +--- Thread: Introducing a second HL library? (/thread-14432.html) Pages:
1
2
|
Re: Introducing a second library? - Roland Melkert - 2015-02-19 Also you probably want to list all unique positions, texcords, normals, colors in single big arrays followed by triangle and quad listings using those arrays. But instead like OpenGL wants (uniqe combo's of those elements), permit separate indexes per element. And to get any real advantage from the format the data probably needs to flattened (e.g. whole recursive 3001.dat). Re: Introducing a second library? - Steffen - 2015-02-22 this is a perfect example for how much more compact our current syntax is over JSON. Re: Introducing a second library? - Roland Melkert - 2015-02-22 Steffen Wrote:this is a perfect example for how much more compact our current syntax is over JSON. I agree JSON is pretty useless for just replacing the current (offiicial) .dat's. But when you start flattening things JSON will be the better format as it allows for grouping / indexing the vertices so normals and texture info starts to make more sense. Re: Introducing a second library? - Ben Supnik - 2015-02-23 Steffen Wrote:this is a perfect example for how much more compact our current syntax is over JSON. I think that if the -only- thing on the table here is JSON vs. .dat/.ldr syntax, then it's sort of "who-cares"...I can write a program to convert from one to the other and then back losslessly - it is a re-encoding of the same information. The real question of a second library is whether it is -semantically- different...for example, a "second" library could be: - Flattened - every triangle in a part is in the part file and not in primitives. - Have no conditional lines. - Have quads reduced to pairs of triangles. - Have the shared vertices pre-indexed. - Have normals pre-computed for apparently-smooth surfaces. - Have UV coordinates pre-computed for textured parts (from the spec'd projection). These are changes such that conversions between the two formats would be "lossy". If a second library isn't semantically different, it doesn't provide substantial benefits to apps. From what I've read in this thread, Roland's proposal was very much "second library is a derived product of the first" - e.g. some of the potentially expensive and/or annoying tasks of processing the library could be removed. UV mapping and normals could be pre-computed once in a tool and the library flattened, BFC fixed and the result would leave viewers with a much simpler rendering format. Such a "compiled" library probably needs -no- approval from any kind of oversight committee; if I wanted this for BrickSmith I could code it private to BrickSmith and call it a day. There may be good leverage in several programs sharing a compiled format, but if everyone else says this is stupid, one developer can go do it. But then others have jumped on "this would be a way to get around backward compatibility." But that's a very different notion; if the -new- format is the master and the old format is the derived product and they're not semantically the same, then this represents fnudamental changes in (1) what the library is and (2) what programs can actually edit the master data. That would need real oversight and approval, and it's a much taller order. Cheers Ben Re: Introducing a second library? - Gerald Lasser - 2015-02-23 The only advantage I see is that a vertice is defined and used for multiple objects then (quad, triangles, lines). So (manually) changing a vertice is pretty easy. If you do this manually now, it can be quite a hassle to find all occurrences of the vertice you want to change. Re: Introducing a second library? - Nicola - 2015-02-23 Ben Supnik Wrote:I think that if the -only- thing on the table here is JSON vs. .dat/.ldr syntax, then it's sort of "who-cares"...I can write a program to convert from one to the other and then back losslessly - it is a re-encoding of the same information. Agreed! The shape of the format is irrelevant, the content is. The concept of a compiled library clearly show what we need. Re: Introducing a second library? - Rolf Osterthun - 2015-02-23 Hey, Steffen Wrote:this is a perfect example for how much more compact our current syntax is over JSON.Yes, you are right. I could have also used xml (even worse) in my example or something like: Code: // comment But it was not my goal to suggest JSON. I would like to see the (a) library expandable to vertex colors, normals, uv-maps, etc. Roland Melkert Wrote:I agree JSON is pretty useless for just replacing the current (offiicial) .dat's.You are right. I should have added some normals and other stuff to the example (e.g.): Code: "Vertices": [ Again, just some thoughts. Rolf Re: Introducing a second library? - Rolf Osterthun - 2015-02-24 Hey Roland, Roland Melkert Wrote:Also you probably want to list all unique positions, texcords, normals, colors in single big arrays followed by triangle and quad listings using those arrays. this is something where I'm really not so sure. In .obj files (for example) you have to follow a fixed sequence (write 1//1 for a position and a normal). If I may exaggerate slightly, this could guide to something like 1//1//////4 ;-). In .ply files you have to define what follows (at least I think so). Too complex in my opinion. What I could imagine is someting like (here a quad): Code: 4 0 1 2 3 n 0 c 16 Code: 4 0 1 2 3 n4 0 0 0 0 c4 16 16 4 16 // with Gradient Brush But currently, I would prefer "uniqe combo's of those elements". This is something I have also seen in many computer games. It would be nice if the library would be so flexible that you could even add bones, bone weights and bone indices (in theory). But it's a wash. Roland Melkert Wrote:And to get any real advantage from the format the data probably needs to flattened (e.g. whole recursive 3001.dat). Hm. I really like the hierarchical structure of the LDraw file format. Here are the ghosts: do you want an expandable high perfomance library or an expandable hierarchical library with smaller files. Rolf |