xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
563 stars 211 forks source link

Polyline with drop segments preview is skewed instead of flat. #3625

Open stevegiron opened 1 year ago

stevegiron commented 1 year ago

Instead of using multiple icicle segments to match my inverted V roofline, I used the polyline with drops. Sequencing works fine, output works fine.

The apparent bug is when viewing a multi-segment polyline (issue accentuated with drops), the model is not square to the screen but artificially rotated upon the Z axis.

To Reproduce Create a new polyline model that looks like this ^--^------^--- (that has 9 segments) Set pixel count to 360 Set the drops to 3,4,5 Add the model to a sequence Put a bars effect on the model and select the bars effect with model preview on. The model does not appear flat on the screen as drawn. The right edge of the model has been pulled into the Z axis by 30-40 degrees.

The model looks ok in the house preview window.

image

xLights 22.23 Windows

AzGilrock commented 1 year ago

Actually a single line PolyLine draws at a 45 degree angle in Model Preview. Could have sworn I saw a checking claiming to have fixed that.

AzGilrock commented 1 year ago
Screenshot 2022-12-07 at 5 02 37 PM
AzGilrock commented 1 year ago

Yeah this checkin sounds like it was fixing this exact issue. Maybe I un-fixed it when I worked on it...lol. What's hard is Keith does so many formatting changes I'm having trouble finding the real code changes in that checkin. https://github.com/smeighan/xLights/commit/05418b77c05a9cdb06dae1c08c76a55a46c6ad55

AzGilrock commented 1 year ago

Well from what I can tell all the code Keith added for that fix is still there. Not sure why it doesn't fix it anymore.

stevegiron commented 1 year ago

Well, render and playback is ok. Just looks silly on the model preview.

AzGilrock commented 1 year ago

That fix went into 2021.23. I ran my test setup with 2021.24 and it has the bug so it must not have fixed every scenario. Something to do with the Model Preview only drawing in 2D.

AzGilrock commented 1 year ago

Well what is happening is the Model Preview window tries to stretch the model to fill the full window height. So if there is any deviation in Y positions its going to create a scaling matrix that stretches the top Y value up to the top of the window. Try manually entering position values for all the segments that are on the lower vertical and type in the exact same value and then see how it does. That fixed it for me on my test PolyLine where I drew eaves like yours.

AzGilrock commented 1 year ago

Hmm...that doesn't work either once you add the drops. Really not sure how to improve it at this point.

stevegiron commented 1 year ago

How about adding multi-segment capability to the existing icicle effect since the preview works.

cybercop23 commented 9 months ago

Is this still needed? If not, please close.

AzGilrock commented 9 months ago

Well it would have been nice to fix it but I didn't find a solution when I tried and I created the PolyLine model