Subject:
|
Re: LPub Bad results with LDView
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Sun, 14 Jun 2009 19:49:16 GMT
|
Viewed:
|
9190 times
|
| |
| |
In lugnet.cad, Jaco van der Molen wrote:
> In lugnet.cad, Kevin L. Clague wrote:
> > Well I guess people should understand that LPub 4.0.0.2 is a moving target. It
> > is not meant for general consumption, but people can take a peek at:
> >
> > www.kclague.net/LPub/LPub4_0_0_2_win32_setup.exe
> Kevin,
>
> Thanks for sharing this anyway :-)
> I like the new features you added (add pages, cover, images).
> Do you have a list of new features or changes?
>
> FYI: I've noticed there are some differences in rendering.
> See: http://www.binarybricks.nl/test/lpubswan.html
> Model: http://www.binarybricks.nl/voorbeelden/misaqabirds/swan2.mpd
>
> Jaco
Hi Jaco,
The right wing is being rendered weirdly because LPub thinks that the right
wing is being added using a mirror matrix.
You have wing1.ldr and wing2.ldr in your model. In theory you could get by
with just wing.ldr, because wing2.ldr *is* the mirror image of wing1.ldr.
When LPub renders the steps of a submodel, it examines the type 1 (add part)
line to determine if the add line means the model is being used as a mirror. If
not, the rotation matrix from the add line is not used.
If the rotation matrix of the add line represents a mirrored matrix, then LPub
renders the steps of the submodel with the rotation matrix of the add line
applied.
LPub thinks the bad wing is added using a mirrored rotation. LPub uses this
line of code to decide if the rotation matrix represents a mirrored matrix:
a*e*i - a*f*h - b*d*i + b*f*g + c*d*h - c*e*g < 0
The a-i variables represent the rotation matrix as defined by the LDraw file
format. The above formula is supposed to calculate the determinant of the
rotation matrix. If determinant is negative, we have a mirrored matrix.
Travis gave me the determinant < 0 algorithm, but the above is my
implementation. Travis, is it wrong?
Thanks,
Kevin
|
|
Message has 1 Reply: | | Re: LPub Bad results with LDView
|
| (...) Well, scratch that analysis. wing2.ldr and wing1.ldr are exactly the same model. When you added wing2.ldr you *did* use mirror matrix. LPub 4.0.0.2 notices that you used a mirrored matrix, and rendered the wing with the mirror matrix rotation. (...) (15 years ago, 14-Jun-09, to lugnet.cad)
|
Message is in Reply To:
| | Re: LPub Bad results with LDView
|
| (...) Kevin, Thanks for sharing this anyway :-) I like the new features you added (add pages, cover, images). Do you have a list of new features or changes? FYI: I've noticed there are some differences in rendering. See: (2 URLs) (15 years ago, 12-Jun-09, to lugnet.cad)
|
23 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|