Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Loading and unloading scene

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
User avatar
Robert
Posts: 318
Joined: 21 Jan 2012, 09:25
Location: Toulouse - France
Contact:

Loading and unloading scene

Post by Robert » 02 Feb 2014, 23:16

Hi,

It's a question I wanted to ask since a long time.
Working on huge projects I use a lot of scene port. Usually I load and unload scene port. To unload the scene I pass an empty URL to the scene port. In async mode it seems to be ok. Is it the good way to do? I understood the resource manager constraint.
Why there's no Boolean value to load or unload this scene port directly on the scene port. Most of the time only blocking the scene port is not enough if we talk about performance.
Why unloading scene is blocking the designer even if async value is checked?

R

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: Loading and unloading scene

Post by Karol » 03 Feb 2014, 12:04

Hi Robert,

If you just want to save performance, it's enough to block the Scene Port node. This has the same performance gain as if you would unload the scene.
If you want to save performance AND memory, you have to unload the scene from the Scene Port by setting an empty URL to the 'Scene' property.
There is no 'Unload' command because the 'Scene' property defines the state of the node. An additional 'Unload' could conflict with the 'Scene' property value.

The cause why Ventuz is blocking even if the Scene Port is in Async mode is .Net! If we release a scene asynchronously the .Net Garbage Collector will start to clean up the memory and free resource.
Unfortunately it has to stop the whole process to have a defined state of the memory for clean-up.
Hope this clarifies some things.

Best Regards
Karol

User avatar
Robert
Posts: 318
Joined: 21 Jan 2012, 09:25
Location: Toulouse - France
Contact:

Re: Loading and unloading scene

Post by Robert » 03 Feb 2014, 12:23

Ok it's clear.

I made a test loading a scene without any content inside but Director log this: took 16ms to activate and may caused rendering stalls.
How is it possible since this scene is empty?

Does nested scenes inherit from the async properties of the parent scene? Or is it a better way to define explicitly the async properties for each.

R

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: Loading and unloading scene

Post by Karol » 04 Feb 2014, 10:49

The rendering stall for an empty scene is strange - I will check this.
If you load a scene asynchronously via Scene Port and this scene has Scene Ports again everything is loaded asynchronously, no matter if these inner Scene Ports are set to async mode or not.

Cheers
Karol

Post Reply