JCPalmer Posted February 9, 2017 Share Posted February 9, 2017 I am starting to use ShaderBuilder for some new 'grand entrances'. That is when a mesh is instanced (after any textures have been loaded), it is accompanied with some kind of effect & sound. My entrances till now have been assigning temp materials, scaling, or animating a shapekey. ShaderBuilder is actually done against a temporary mesh. A cylinder for Teleport entrance, and sphere for a Poof entrance. I wanted to show the mesh & any kids when 85% of the animation is complete. Problem is, if this is the first time permanent mesh is being made visible, there is a slight hesitation right in the middle of the shader builder animations. It just kind of ruins it. Works purrrrfect on subsequent entrances. Is there something I can call on the permanent meshes before I start the animation, to make sure everything is ready? I could do a quick show while mesh was at scale(0.0000001, 0.0000001, 0.0000001), but looking to find a crap-free method. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 10, 2017 Author Share Posted February 10, 2017 Ok, I find the effect / shader is actually defined in the call to a material.isReady(). Would calling this after I know the mesh geometry is complete, and all my texture completion callbacks have run be a way? Node.isReady() does not really do anything. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 10, 2017 Author Share Posted February 10, 2017 mesh.material.isReady() also does not remove the short frame freeze. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 10, 2017 Author Share Posted February 10, 2017 Actually, setting the scaling incredibly small works good. A little bit of a hack, but I was already hacking a bit. QI was setup not to allow new queue items to start while mesh was not enabled. I was enabling the mesh to get the queue to process events, but setting visibility to 0. At 85% complete, was setting visibility back to 1. Visibility does not apply to child meshes, unlike scaling, so had to get all the descendants & apply visibility both ways in loops. Using scaling at just the mesh is still cleaner on a relative basis. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.