0

Overlay not showing when source is added to a RVSequenceGroup, RVStackGroup or RVLayoutGroup

Hi there.

 

I'm having a problem with dynamically created RVxxxGroups.

Let's say I have loaded a source with a green box as overlay.

If I then create a new viewable from the editor (sequence, stack or layout) and assign the loaded source to this viewable it will work ok.

But, when I try to do this from code, overlays won't show up. Also, images will appear kind of washed-out.

 

This is the code I'm using to do this:

# create sequence group for the image shots
shots_group = commands.newNode('RVSequenceGroup', 'shots_group')
commands.setNodeInputs(shots_group, image_shots)

# select new vie
commands.setViewNode(shots_group )

Is there maybe a clever way of creating groups?

 

Thanks.

Chema

11件のコメント

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    I think the issue here might have more to do with how image_shots was created. In any case can you give me the smallest but complete code to reproduce the issue you are seeing?

    Thanks,
    Jon

  • 0
    Avatar
    José M. Calvo

    Hi Jon

     

    I've found out that the problem is not with the group creation, since I managed to add sources from the editor to dynamically created groups and it worked too.

    To create the image_shots I simply do this:

     

    commands.clearSession()

    image_shots = []

    for path in paths:
        image = commands.addSourceVerbose([path])
        image_shots.append(image)

        # then I add the overlay to this shot

        self._addOverlayInfo(image, info)

    # finally create sequence group for the image shots
    shots_group = commands.newNode('RVSequenceGroup', 'shots_group')
    commands.setNodeInputs(shots_group, image_shots)

     

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    Thank you for the additional information, but this is still not a complete piece of code I can execute without making assumptions about what is going on. Most notably there is no definition for _addOverlay. Please send me a complete package. I will work on creating something from scratch based on the spirit of what you are discussing here.

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Chema,

    Here is a working example with RVFolders I found in my ~/.rvrc.py:

        def makeAndFillSeq(event):
           vfx_group_node = commands.newNode('RVFolderGroup', 'vfx_shots')
           for i,shot in enumerate(['smptebars.movieproc','solid.movieproc','blank.movieproc']):
               shot_source = commands.addSourceVerbose([shot], None)
               shot_group = commands.nodeGroup(shot_source)
               (inputs,outputs) = commands.nodeConnections(vfx_group_node)
               commands.setNodeInputs(vfx_group_node, inputs + [shot_group])
        commands.bind("presentation_control", "global", "key-down--X", makeAndFillSeq, "")

    Does that help?

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    I think you need to set the RVSourceGroups as the inputs and not the RVFileSources like you are presently doing. Something like:

    commands.clearSession()

    image_shots = []

    for path in paths:
        image = commands.addSourceVerbose([path])
        image_group = commands.nodeGroup(image)

        image_shots.append(image_group)

        # then I add the overlay to this shot

        self._addOverlayInfo(image, info)

    # finally create sequence group for the image shots
    shots_group = commands.newNode('RVSequenceGroup', 'shots_group')
    commands.setNodeInputs(shots_group, image_shots)

  • 0
    Avatar
    José M. Calvo

    Hi Jon.

    Thanks for the prompt responses.

    I tried what you said and it does work. Thanks again! The problem was that I thought that addSourceVerbose would return the source group instead of a RVFileSource. My mistake.

     

    Let me explain what I'm trying to do.

    We use per shot overlays to show the typical info, but they don't want the overlays to cover any part of the video, so what I'm doing is creating a sequence group for all shots in the scene and a different sequence group for just the overlays (with blank movieprocs). Then create a stack group and add those two sequences to it so the bottom layer would be the image sequence and the upper layer would be the overlay sequence. This is what I've done so far, but I still need to figure out how to scale down the image group so it will be seen through the overlay layer. I hope this makes sense.

    It feels a little tricky to me but I don't know if there are better ways to accomplish the same task. I would appreciate if you'd let me know.

     

    Thanks.

    Chema

  • 0
    Avatar
    José M. Calvo

    Hi Jon.

    Thanks for the prompt responses.

    I tried what you said and it does work. Thanks again! The problem was that I thought that addSourceVerbose would return the source group instead of a RVFileSource. My mistake.

     

    Let me explain what I'm trying to do.

    We use per shot overlays to show the typical info but, despite that's what overlays do, they don't want them to cover any part of the video, so what I'm doing is creating a sequence group for all shots in the scene and a different sequence group for just the overlays (with blank movieprocs). Then create a stack group and add the two sequence groups to it so the bottom layer would be the image sequence and the upper layer would be the overlay sequence. This is what I've done so far, but I still need to figure out how to scale down the image group so it will be seen through the overlay layer entirely. I hope this makes sense.

    This approach feels a little tricky to me but I don't know if there are better ways to accomplish the same task. I would appreciate if you'd let me know.

     

    Thanks.

    Chema

  • 0
    Avatar
    José M. Calvo

    Sorry for the double post, we're having network issues!

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    I understand what you have described in terms of RV graph structure, however I don't yet fully understand the motivation. Can you please tell me more about why you cannot use the RVOverlay nodes associated with the RVFileSource nodes (this is the ones from the same RVSourceGroup)? Please explain why there is a need for the separation of layers the way you are assembling your graph.

    Thanks,
    Jon

  • 0
    Avatar
    José M. Calvo

    Hi Jon.

    The motivation is simply that reviewers don't want overlays occluding any portion of the video.

    The overlays are just a couple of thin bands located at the top and at the bottom with some text on them, so the idea is to have two different layers and resize/scale down the video layer so it's not occluded by the bands. Does it make sense now?

    Thanks

    Chema

  • 0
    Avatar
    Jon Morley

    Hi Chema,

    Sorry for the slow response here. I still think you can achieve what you want with the overlays associated with the RVSourceGroups you already have. I think you simply need to set the uncrop values of your source's RVFormat node to add padding for your text wherever you like it. Please read over this node documentation:

    http://tweaksoftware.com/static/documentation/rv/current/html/rv_reference.html#RVFormat

    Thanks,
    Jon

ログインしてコメントを残してください。