LDCad Mirroring


Mirroring
#1
I love LDCad's mirroring feature but it doesn't work with subfiles. I understand why that is but can we have some sort of (togglable?) feature that just mirrors the matrix, inverts the sign of the position for mirrored axis, and I'll handle the rest (i.e. actually creating a mirrored subfile)?
Reply
RE: Mirroring
#2
(2020-12-13, 19:53)Orion Pobursky Wrote: I love LDCad's mirroring feature but it doesn't work with subfiles. I understand why that is but can we have some sort of (togglable?) feature that just mirrors the matrix, inverts the sign of the position for mirrored axis, and I'll handle the rest (i.e. actually creating a mirrored subfile)?
Not sure it really helps: once you create the mirrored subfile, you'll have to unmirror the rotation matrix... Perhaps just mirror the position of subfile?
Reply
RE: Mirroring
#3
(2020-12-14, 8:28)Philippe Hurbain Wrote: Not sure it really helps: once you create the mirrored subfile, you'll have to unmirror the rotation matrix... Perhaps just mirror the position of subfile?

It's extremely useful. Take, for example, the Batwing I just posted. The wing edge segments are subfiles and the main model is symmetrical but mirrored. Since I'm not changing the origin of the segments (i.e. the rotation point), if LDCad mirrored the matrices and inverted the position of subfiles, I could simply duplicate the subfile that contains the positioned/rotated segments, mirror, and then duplicate/mirror the segments. This happen a lot in highly symmetrical models.
Reply
RE: Mirroring
#4
(2020-12-14, 13:56)Orion Pobursky Wrote: It's extremely useful. Take, for example, the Batwing I just posted. The wing edge segments are subfiles and the main model is symmetrical but mirrored. Since I'm not changing the origin of the segments (i.e. the rotation point), if LDCad mirrored the matrices and inverted the position of subfiles, I could simply duplicate the subfile that contains the positioned/rotated segments, mirror, and then duplicate/mirror the segments. This happen a lot in highly symmetrical models.
Get it... I was thinking of mirroring the matrix of the subfile, not the matrix of elements in subfile. Yes, makes sense.
Reply
RE: Mirroring
#5
(2020-12-14, 14:44)Philippe Hurbain Wrote: Get it... I was thinking of mirroring the matrix of the subfile, not the matrix of elements in subfile. Yes, makes sense.

Heck, I'd be happy with a function that simply mirrors the matrix of a selected subfile. I can position manually.
Reply
RE: Mirroring
#6
(2020-12-14, 15:03)Orion Pobursky Wrote: Heck, I'd be happy with a function that simply mirrors the matrix of a selected subfile. I can position manually.

Do you mean literately mirroring the matrix (negative determinant)  or smart mirroring like normal (flips two axis)?

If you mean the later you can do that by checking the 'incl models' checkbox in the selection mirroring dialog.

This should work as long the sub-model itself is symmetric along the x-axis.

The first method is not really supported as LDCad's rendering optimizations won't correct for the flipped normals.

Or just duplicate the session and mirror the whole thing from the session menu.
Reply
RE: Mirroring
#7
(2020-12-14, 19:33)Roland Melkert Wrote: If you mean the later you can do that by checking the 'incl models' checkbox in the selection mirroring dialog.

Wait, what? Where did that checkbox come from? Now I feel like a dummy for even posting this thread.
Reply
RE: Mirroring
#8
(2020-12-14, 19:45)Orion Pobursky Wrote: Wait, what? Where did that checkbox come from? Now I feel like a dummy for even posting this thread.
I somehow missed the checkbox too! Blush
Reply
RE: Mirroring
#9
Sorry to necropost on this thread, but Christmas week is when I get to do my annual check up on interesting topics like ldraw.  So... I was wondering, is mirroring fully automated yet?  Once upon a time we made a mirwiz.ini file that listed a substitute part and transformation matrix for every part that wasn't symmetrical, or something like that.  That should be enough to make automated mirroring about as good as possible.   But in retrospect, keeping that info as a separate file was not maintainable. 

Would it be a good idea to standardize a 0 MIRROR_INFO comment line for this in the official parts?  Apologies if that's already done.

Enjoy,
Don
Reply
RE: Mirroring
#10
(2020-12-20, 16:50)Don Heyse Wrote: Would it be a good idea to standardize a 0 MIRROR_INFO comment line for this in the official parts?  Apologies if that's already done.

Do you mean adapting the 0 !LDCAD MIRROR_INFO into the offical spec?

I think that has already been suggested a while back, but the biggest problem is (just like with snapping) most authors don't want it added to their workload.

This is why LDCad uses a shadow library, which is a second collection of .dat files which content is merged with similar named official content before the program begins parsing the file as a whole.

The merge operation is also the reason you can (if you want) add any LDCad snapping and/or mirroring meta directly in LDraw parts if you wanted to.

I maintain the shadow myself so it doesn't interfere with the official files but it is a huge task for just one person.

Luckily I do receive some help from a small number of people now and then so you are welcome to join that effort.
Reply
RE: Mirroring
#11
I don't actually know the LDCAD MIRROR_INFO format, but I suspect it fits the bill. 

Back in 2004 there was an .ini file with a a single line per part containing a transformation matrix and a few options that might include a substitute part.  But many parts needed no special instructions and thus were not in the .ini file.  One extra line added to some files doesn't seem like a huge burden for part authors, but perhaps more wrinkles to the mirror problem were discovered in the meantime?

Anyhow, I guess a shadow library with extra metas is an adequate solution, so maybe I'll see if I still have the math skills to participate.  Is the LDCAD MIRROR_INFO meta documented?  I didn't see it listed here http://www.melkert.net/LDCad/tech/meta  Meanwhile, for historical reference purposes, I stashed the ancient mirror.ini file and test program in the ldglite github repository.
Reply
RE: Mirroring
#12
(2020-12-22, 2:16)Don Heyse Wrote: I don't actually know the LDCAD MIRROR_INFO format, but I suspect it fits the bill. 

Back in 2004 there was an .ini file with a a single line per part containing a transformation matrix and a few options that might include a substitute part.  But many parts needed no special instructions and thus were not in the .ini file.  One extra line added to some files doesn't seem like a huge burden for part authors, but perhaps more wrinkles to the mirror problem were discovered in the meantime?

Anyhow, I guess a shadow library with extra metas is an adequate solution, so maybe I'll see if I still have the math skills to participate.  Is the LDCAD MIRROR_INFO meta documented?  I didn't see it listed here http://www.melkert.net/LDCad/tech/meta  Meanwhile, for historical reference purposes, I stashed the ancient mirror.ini file and test program in the ldglite github repository.

I did not now about the .ini.

The LDCad mirror hint is reasonable simple it has 6 parameters, namely

baseFlip
This indicates the part space axis to be flipped in order to prevent a negative determinant, this is usually X as most LDraw parts are symmetrical in that direction.

corOri
This is the orientation of the part as it would be to make it its own mirrored counterpart using the baseFlip as the mirroring axis.

counterPart
self -> Indicates only corOri should be used.
auto -> LDCad will try to find a counterpart automatically using the description (replaces left with right etc).
some.dat -> Indicates a static counterpart

posCor
Indicates the mirroring center.

inheritable
true/false, indicated if higher parts using this .dat will inherit the mirroring information or not.


I will add this to the tech doc at some point, I'm a bit behind on that Smile
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 8 Guest(s)