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
551 stars 209 forks source link

Ability to import sequences with viewpoints #3672

Closed snow56border closed 1 year ago

snow56border commented 1 year ago

Currently, Xlights warns, during check sequence, that view points do not get imported.

image

When switching layouts, it can be infeasible to manually check every effect and what its viewpoint is set to for updates.

Original sequence: image

Updated layout sequence: image

Both layouts define the View Point top the same way, and the same coordinates. It would be helpful if Xlights could set the Camera field in Layer Settings to the value it was in the original sequence. Perhaps it could have the same prompt as missing models. If you did not have a View Point with the same name, it could ask the user which View Point it should use, or revert to the default 2D

snow56border commented 1 year ago

It would be cool to be able to have importing views work between sequences.

keithsw1111 commented 1 year ago

If the layout includes the view then it should import ok and match the view you have in the target layout.

An alternate approach would be to create groups with a default view set and then import onto that. That will work pretty much automatically.

It is not possible to actually import the view as every layout is different.

snow56border commented 1 year ago

The example I indicated above was two layouts with the same views defined (I copied the xlights folder so I could be sure they were identical layouts). I have been unable to get an imported sequence to match the exported sequence Buffer Camera value.

The buffer camera value seems to always revert to default, regardless of what the effect in the sequence has. I had a feeling that this property is just not carried in the sequence.

setting a group to default to a view isn’t a great workaround as the intent is to use this buffer camera option at the effect level. If I was assigning the entire group, I could just bulk edit the timeline. An example is when I sequence pixel poles. Creating a ripple that starts in the center and moves outward looks quite a bit different rendered from a typical front of house view vs a top down view. To get some of these effects, people have used shadow models and sequence on those (which is equivalent to setting a default view for a group )… but replicating every model for each view seems to waste a cool thing 3D layouts give you.

Other options like render type get set correctly, it would be a big help if the camera option could be set to the value it was in the original sequence. For a workaround, I could go back to shadow models, but it feels a shame since it feels like the sequence could contain this information on export and simplify a layout directly.

keithsw1111 commented 1 year ago

So I just did this and it worked fine.

I created 2 show folders. One model in each ... different names and types. I also added a group and set its default camera to "Top" which i created in both layouts.

In 1 layout I created a sequence with one effect on the model and one on the group using the "Top" camera ... then I imported this into the second layout. The effects came in and the camera was correctly mapped for both effects.

Clearly you are doing something slightly different ... but i am not sure what ... and until we can identify this we wont be able to resolve it.

snow56border commented 1 year ago

I was able to test this out. I started from:

I then created a new sequence

The Results

Is it a limitation that groups can not have the camera property updated on an effect level? I see the group window in the layout does have the 'Default Camera'. I was hoping I could have something like the following:

I could make a group called 'Pixel Stakes - Top', 'Pixel Stakes - Side', 'Pixel Stakes - Front' and set their default views to be the correct view. But that means I need to do that for every group. I currently have 32 groups, which would mean I would potentially need 96 groups. It seems very cumbersome, and I was hoping that I could apply effects at group levels and have them retain the effect camera setting. Then, if the layout its being imported into doesnt have that view name defined... then it could use the group default.

merryoncherry commented 1 year ago

I believe the reason here is a piece of code in SeqFileUtilities around line 1129, which says: // if we are mapping the effect onto a group and it is a per preview render buffer then use the goups default camera

I think this is not always necessary to do, and it could be changed so that if it is set to a non-default camera in the import sequence and the camera exists in the target layout that the camera is left alone.

I could probably make and test this change next week, if the dev team (Keith, as he wrote the code for per-group cameras?) thinks it is a reasonable approach.

AzGilrock commented 1 year ago

I created the Viewpoint feature and the ability to render from different Viewpoints but others may have touched it after. But I probably didn’t do the import part….I’d say just try it and test it. I’ve been busy on other stuff so haven’t tried to reproduce it

snow56border commented 1 year ago

Glad it could be found in the code. Would be great to see this feature updated! But also, patiently waiting on Gil’s moving head work :D

snow56border commented 1 year ago

@keithsw1111 , did you think what @merryoncherry mentioned is reasonable? I'd love to see this update!

merryoncherry commented 1 year ago

Will try it soon.

merryoncherry commented 1 year ago

See #3893.

@snow56border if you would please read the comment there to understand the limitation... and I can give you a binary to try if you like. I did try it myself and it works the way I expect using top, side, and nonexistent camera in the imported sequence.

snow56border commented 1 year ago

@merryoncherry just tried the nightly build and it worked exactly as expected. Thanks! This is a huge help.