Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material Preview Renders a scene #1336

Open
wants to merge 14 commits into
base: development
Choose a base branch
from

Conversation

marauder2k7
Copy link
Contributor

Removed SceneManager direct references eg gActiveClientScene / gActiveServerScene replaced them with global functions getActive scenes.
Decoupled containers to do the same
Everywhere that referenced these now uses the functions instead
Added ScopedSceneManager, for temporarily setting objects to a different scene and rendering said scene. Once it goes out of scope the main scene becomes the new currently active client scene.
SceneObjects now get added to the client side of the server scene they are added to not just the current active scene.
SceneManagers keep a references to their clientSide and serverSide respectively.

lose the externs to gClientSceneGraph and gServerSceneGraph and replace them with functions
getActiveClientScene and getActiveServerScene respectively.
now scene container works the same way as sceneManager
SceneManager now creates a server side automatically as the server side is the authoritative side
sceneManager now keeps control of its own container
since sceneManager are client/server server gets deleted first when deleting the client server preventing break in containers being freed. Now sceneManagers can keep track of their own containers which prevents leakage into other scenes

guiMaterialPreview now renders a scene, all objects are passed through to it as an asset this could be leveraged for adding custom shapes to it through a window for a shape asset now.

tsstatic required createShape pushed to public for this test.
lightmanager now just uses the current active client scene and so does its derivatives
guiMaterialPreview not completely functional with lighting and using tsstatic for the shape.

NOTE: guiMaterialPreview is still a test scene.
removed middle mouse button interaction from material preview.... because why!
SceneObject now adds the object to the clientSide sceneManager set to the object if the object was registered inside a scopedSceneManager this will be a client side scene of the scopedScene meaning we can stream objects that are inside a window (eg: guiMaterialPreview)
now we have a scene with a ground plane so we can see the shadows
we also use a real sun object so the shadows can be projected
removed bgsky so this can be merged until we figure out hdr's to use
the system now works mostly as expected still just the bug with preview window updating all the other shapes with the selected material.
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.

1 participant