Pre Load

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/12/2009 at 16:35, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   11 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
I am inserting materials in to my scene with my object plugin.  The materials that are being inserting load rather large images inside of certain shaders.  This causes a lag in the loading process.  Is it possible to pre load images to prevent this lag when inserting the new material?

~Shawn

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/12/2009 at 20:11, xxxxxxxx wrote:

Originally posted by xxxxxxxx

User Information:
Cinema 4D Version:   11 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
I am inserting materials in to my scene with my object plugin.  The materials that are being inserting load rather large images inside of certain shaders.  This causes a lag in the loading process.  Is it possible to pre load images to prevent this lag when inserting the new material?

~Shawn

Hmm, why are you using the object to insert the materials? Is there a special reason? When are the materials exactly inserted? It is forbidden in GetVirtualObjects to modify the active scene. That should be mentioned in any case. What do you exactly mean by "lag in the loading process". Which loading process do you exactly mean? Some more information would be helpful...to help.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/12/2009 at 20:19, xxxxxxxx wrote:

The object creates three spheres.  And 3 materials, one for each sphere.  A few shaders are added to the materials and a texture tag is added to each sphere and linked to the material.  The materials have images that load in to the shaders and thus, when the materials are loading, they take longer to load than usual.   This is for my planet generator plugin.  The main PLANET object, is the parent and the spheres, when created, become children of the PLANET object.  When the user clicks the CREATE PLANET button,  all of the object mentioned above are created,  So there is a lag while all of this is being created.

I am wondering if there is a way to preload the image files so that the process happens in more realtime on the users end.

Thanks,

~Shawn

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/12/2009 at 03:20, xxxxxxxx wrote:

That's not really possible. Also I don't think it would be a good idea to hold huge preloaded textures in memory because that would be a waste of memory in case the plugin isn't used by the user.

cheers,
Matthias