Jump to content

Quickly updating Textures


mop
 Share

Recommended Posts

Hi,

 

I have a few planes and I want to change textures on them as quickly as possible using preloaded HTMLImage Elements (same size). 

 

Initially I was disposing() and recreating Textures. That was obviously very slow.

 

I then changed to the DynamicTexture and painted them in the corresponding 2d context. Performance got notably better but as the texturing is still my bottleneck and using the 2d canvas seems overhead to me I started creating some kind of replacable image texture:

 

http://www.babylonjs-playground.com/#17OT80

 

Try playing with count (16 seems to be a good count to see performance problems ;) ) in the bottom and exchange doImage() and doDynamic().

 

Would something like this be a useful addition? Are there any existing solutions which I didn't see? Would you implement that as a new texture class or would one pimp the existing texture class?

 

Thoughts?

Link to comment
Share on other sites

  • 3 weeks later...

[bump]

 

Interesting topic, Mop, and it's good to see that you are still hanging-around with us.  I hope you are well.

 

This subject is way the hell over my head, but the framework authors need to see this... and give you a decent response.   This is the first PG that I've seen... using Promise, too.  Nice.  I remember following your composite glow thread... which was interesting but also way over my head.  I learn much by reading your posts and studying your playgrounds.  Thanks! 

 

Ok, texture-wrangling Gods (if there's some around)...  has Mop built something viable for including in the framework, here?

 

Looks fast to me.  Smokin' fast. 

 

Thanks Mop... sorry for the slow response.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...