NathanR Posted October 26, 2018 Posted October 26, 2018 (edited) I'm using Bricksmith and LPub 4 to create instructions for a rather large MOC (~8k pieces), but I need help with angles for a few ROTSTEP commands. Currently, I have two steps set in Bricksmith as: Step: Relative to default view: x,y,z = 10, -8, 7 Step: Additive: x,y,z = 180, 70, 180 This gives the following commands in the LDraw file: 0 ROTSTEP 10.971 -6.596 8.335 REL. (Side issue - why is this different to the angles I specified??) 0 ROTSTEP 180.000 70.000 180.000 ADD The problem is that Bricksmith does an ADD relative to whatever rotation was used for the previous step, while LPub does an ADD rotation relative to the default step orientation (i.e. ROTSTEP 0 0 0 ADD is identical to a STEP command with no previous rotations). So LPub shows a different view to the one I set in Bricksmith. I know xyz rotation angles cannot be directly added, so I tried converting them to quaternions, combined them, then converted back to an x,y,z rotation angle. Unfortunately (10,-8,7) + (180, 70, 180) gives (-140, -76, -148), which is nothing like what I expected. Is there any way to convert the ROTSTEP ADD command to a ROTSTEP REL command showing exactly the same rotation? Edited October 26, 2018 by NathanR Quote
mocbuild101 Posted October 27, 2018 Posted October 27, 2018 It seems like LPub is where the problem is, as it's applying the incorrect rotation for an ADD ROTSTEP: Quote Relative, Absolute, Additive determines how the project will be rotated in the relationship to its current view angle. Relative turns the project relative to the default view angle. Absolute will overwrite the default view angle in the 3D pane and set the view point of the rot-step exactly at the values you enter in the X, Y and Z fields. Additive turns the project based on the previous rotation steps adding the entered values to the already existing view angles. - from http://www.holly-wood.it/mlcad/basic6-en.html#rotation_steps Not sure what the best way of solving this would be, but you could just use an absolute rotation as a workaround... Quote
NathanR Posted October 27, 2018 Author Posted October 27, 2018 6 hours ago, mocbuild101 said: Not sure what the best way of solving this would be, but you could just use an absolute rotation as a workaround... I thought about that, but I'm not sure if this change the projection mode from perspective to orthographic? I found a Relative rot step that gave the same view as an Absolute top-down view, maybe the relative command didn't cancel out the rotation completely, but the rendered images were very slightly different with lines between bricks more prominent. Quote
Mylenium Posted October 27, 2018 Posted October 27, 2018 16 hours ago, NathanR said: (Side issue - why is this different to the angles I specified??) Because it uses an awful matrix decomposition code? Just guessing here of course, but most of the time unstable under-the-hood rotation code is to blame for such issues. Otherwise I'd simply observe the value the rotations in LPub produce and then kinda hack my way through the script code with values that appear to make the most sense. The "Regenerate Page" button is your friend... Mylenium Quote
supertruper1988 Posted October 27, 2018 Posted October 27, 2018 Have you tried LPub3D instead? It is being actively developed unlike LPub 4. Quote
NathanR Posted October 27, 2018 Author Posted October 27, 2018 I tried LPub3D a few months back, but on opening a model I couldn't get either LDView or LDGLite to render any step images. I see a new version got released earlier today, might check that out. Quote
supertruper1988 Posted October 28, 2018 Posted October 28, 2018 10 hours ago, NathanR said: I tried LPub3D a few months back, but on opening a model I couldn't get either LDView or LDGLite to render any step images. I see a new version got released earlier today, might check that out. There are a few quirks to it but I have found that it works really well. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.