-
Notifications
You must be signed in to change notification settings - Fork 19
New feature request: Add "primitive substitution" feature #44
Comments
Assigned to later date milestone, as this would only happen after the rewrite (v1.2). |
is fine for me. |
Again, /cc @rioforce |
FYI, here is a list of all LDRAW primitives. You can see the systematics in there You could also contact Travis Cobbs, the author of LDView. |
You have quite a few good ideas, almost too many to keep up with. ;) |
Whiled this idea may be good for LDView, it's not right for the LDraw importer. Reconstructing certain primitives would be pointless, because this is an LDraw importer, not something that imports coordinates and reconstructs bricks. If we were going to reconstruct certain bricks, we could just reconstruct all the bricks and then wouldn't have to worry about using the LDraw parts! But that's not logical, because this is an LDraw importer, not a brick constructor. LDraw has different qualities of bricks for a reason, and with a simple function, we could toggle between hi-res, lo-res, and normal-res bricks. :) |
you misunderstood me. this request only talked about primitives. i was talking about how they are imported. this is not at all about "guessing" geometry, or "reconstructing" it from the mesh. the task I talk about here is much, much more trivial: |
Ah, I understand what you mean now. I think that it's harder than it sounds though. Not sure how that would work with our parser... |
still very simple. you just need a small table which tells you: this is not an issue about the file parser. |
Um, nope. Take a look at the code and see what I mean. :P |
what I wanted to say is that you need to separate parsing a file from working with the parsed data. to mix these 2 steps usually leads immediately to spaghetti code.
|
Yes, we are aware of the "spaghetti code". David Pluntze wrote it that way, and fixing it is one of the (if not the) main goal of the rewrite. 😉 Thanks for the resource, though too bad I most likely will not get the chance to read it. |
if you're studying computer science, you will :) |
One Question: Does LDraw already have the primitive models as DAT files in the LDraw directory, or is this an optional thing? If re-building them is just to increase quality, subsurf (or a similar method) would help from within Blender. |
Your question makes no sense. You are asking if LDRAW contains DAT files for those primitives. |
We added the high and low-quality primitives from LDraw for this reason. Instead of reconstructing meshes, why not just use the new LDraw primitives? This importer is supposed to import LDraw bricks as they are, with maybe some minor cleanup. I don't see a reason to re-construct the bricks when LDraw already has 3 qualities of primitives built in. If you can show us some code, we may consider it. But until then, I don't think this will get into the script. |
You again misunderstood me. This request asks for SUBSTITUTING the mesh DATs with native 3D primitives. So it makes no sense that you again point me back to DATs. This request is something totally different. The feature is available in LDView, and rendering quality dramatically increases I wanted to have the same feature in Blender. |
Depending on your pictures above, ( #44 (comment) ), it makes the mesh more high-poly. "Native cones" are meshes in Blender. So are LDraw models. They all turn into faces and vertices. I don't see the point of replacing them. I thought that's why we added the hi-res primitives, so people could have higher quality bricks. I understand what you want, but the feature just doesn't have a high demand. Maybe this could go into the script re-write. |
Currently, all primitives are imported as any normal LDRAW file.
This means for example that a 1-4cyli.dat always is a polygon mesh.
There already exists a boolean option to replace all primitives
by their "48ed" (high-res) versions if the user wants that.
That option could be extended to replace all primitives
by their "8ed" (low-res) counterparts if the user really wants that.
However, he most probably will not, as the rendering quality will be just poor.
What would be much, much more interesting would be to add a
"substitute primitives by native 3D objects" value of that substitution option.
If the user sets the option to THAT mode, it should work similarly as it
works in LDView. There, the tool internally has a lookup table for LDRAW primitives.
It knows that a 1-4cyli.dat models a quarter cylinder, and substitutes
a real 3D OpenGL quarter cylinder for it, instead of importing simply the polygon
mesh.
The text was updated successfully, but these errors were encountered: