Skip to content

Conversation

@ivanimanishi
Copy link
Member

No description provided.

yannci and others added 29 commits October 6, 2022 16:48
We noticed huge FPS drops in scenes with a huge amount of
`SceneShapes`. Profiling showed that a lot of time is spend by
`SubSceneOverride` requesting draw updates from the shapes in
the scene. This also happens for shapes that are set as hidden,
what we consider a bug/flaw in Maya's VP2 drawing API.

To alleviate this issue, we derive the proxy from `SceneShape`
and inherit all of it's behaviour with the exception, that we don't
register it as drawable. This allows us to replace `SceneShape`s with
its proxy implementation, where only the data reading capabilities
are needed, e.g. layouts or rigs.
SConstruct : Fix slash error on Windows
We backport the Python3 compatibility changes for `FnSceneShape.py`
and `__init__.py from the following commits:
   - 58d250f
   - 8f7f614

This is to avoid merge conflicts later on
Changing all `staticmethod`s to `classmethod`s and replacing
all method calls from within the class to use either `self`
or `cls` instead of the class name. This allows for easier
inheritance and less code duplication in subclasses
With overriding the `__new__` method of the `FnSceneShape` class we
change the object type during construction and before initialization.
This gives us the ability to use `FnSceneShape` regardless if it's
dealing with a `SceneShape` or it's proxy version.
We add the `shapeType` argument to the methods that can create a
`SceneShape` node to specify if we want to create an `ieSceneShape` or
its proxy version. If we don't pass in the argument `FnSceneShape`
will create shapes of the type it was initially created with.
Moving the node creation in the `setUp` method, which is called before
every test method, gives subclasses the ability to run the same test
cases with a different node. This is e.g. useful for
`ieSceneShapeProxy` as we need to make sure that it behaves the same
way as it's non proxy version
…ath::Box3d and Imath::M44d to DD::Image::Matrix4.
We want to maintain the world space matrix instead of transforming the points
so we can more easily round trip scene cache in/out of nuke.
This allows to write the bounds as the SceneInterface expects ( local space ).

Due to some kind of reset happening in the SourceGeo source code, we need to store
the matrix in create_geometry and apply in the geometry_engine.

I think this should work fine considering that Op are instantiate per output context ( frame )
so we shouldn't have a clash in the map data structure.
Allow to query the Nuke's scene representation through the SceneInterface API.
@ivanimanishi
Copy link
Member Author

Seems like this approach requires merging a commit to 10.3 directly if I resolve the conflicts via the web interface, so I'll likely close this PR and do the merge between 10.3 and 10.4 via the command line once I've setup git with internet access tomorrow...

@ivanimanishi
Copy link
Member Author

Ok. I think I got it by using a temporary branch. But I'll only merge it tomorrow, after reviewing it one more time.

@ivanimanishi ivanimanishi merged commit 3ea584c into RB-10.4 Nov 4, 2022
@ivanimanishi ivanimanishi deleted the tmp-10.3 branch November 4, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants