Jump to content

Flickering textures on iOS


ozRocker
 Share

Recommended Posts

@Deltakosh

I dont know, you more experience in this topic, i stat to read about IOS GLSL programming, so what i know for now, its better to use lowp texture2D and also i think if i convert like this i avoiding floating point texture issue. Its experimental. oZRocker is also a Hacker like me. We just have fun :)

Link to comment
Share on other sites

1 hour ago, Nabroski said:

Okay, so it's his system full of garbage apps blocking the gpu ram. :)

Chrome will remove indexeddb in February. Maybe it will work then. 
 

I don't get it. How are other apps using up gpu ram? Only one app can run at a time.

 

I'm using an iPhone 6+ running iOS 10.1.1. Is that the same phone you are using @Deltakosh?

Link to comment
Share on other sites

I turned off mipmaps with this

var engine = new BABYLON.Engine(canvas, true, { generateMipMaps: false });

but it didn't make a difference.

The interesting thing is that Sketchfab is much more stable.  I understand that I may not have the latest and greatest iPhone but I believe if Sketchfab can work 95% of the time on my device then I should be able to achieve that with my own implementation.

Link to comment
Share on other sites

created my own json webgl phraser within 3hours and becourse this is so awesome i leave it here
http://pharmacist-felix-60764.bitballoon.com/

@ozRocker  Sketchfab  has half a million users. the devs have tones of money, hoes and parting every weekend. Babylonjs has 2 main volunteer (totally genius without any change to get a life). Sorry, to hear u miss a deadline. I learn WebGL, trust me Babylonjs is awesome!  many chances that something gone wrong, trough the complexity of WebGL and different platforms. 

Link to comment
Share on other sites

4 minutes ago, Nabroski said:

created my own json webgl phraser within 3hours and becourse this is so awesome i leave it here
http://pharmacist-felix-60764.bitballoon.com/

@ozRocker  Sketchfab  has half a million users. the devs have tones of money, hoes and parting every weekend. Babylonjs has 2 main volunteer (totally genius without any change to get a life). Sorry, to hear u miss a deadline. I learn WebGL, trust me Babylonjs is awesome! Their are many changes that something gone wrong, trough the complexity of WebGL and different platforms. 

Yes i know. I get that Sketchfab is a commercial platform, but I don't think that has anything to do with the complexity of this problem. Just because they have a feature that Babylon.js does not have doesn't mean we need millions of users and devs with tonnes of money to implement it.  It may be a simple problem to fix or it may be difficult.  What else should I do if I see Babylon.js crashing or with missing features? Just ignore it?

Link to comment
Share on other sites

2 hours ago, ozRocker said:

Yes i know. I get that Sketchfab is a commercial platform, but I don't think that has anything to do with the complexity of this problem. Just because they have a feature that Babylon.js does not have doesn't mean we need millions of users and devs with tonnes of money to implement it.  It may be a simple problem to fix or it may be difficult.  What else should I do if I see Babylon.js crashing or with missing features? Just ignore it?

does this one work ?
http://pharmacist-felix-60764.bitballoon.com/

I think its like RaananW said you are trying to load to many stuff once and you Smartphone refuses.

Try to test:

  • A simple babylonjs plane with a 4098px texture. check ?
  • Your model without uv export (you got a lot of extra data, and is not needed, just delete your uv map in blender before export, will save 50% of file size)  to .babylon.file check ?
  • Your model without textures. check ?


If the first one is running, you already can say, that the problem is: too many to large files.

Sketchfab  converting your files in their own format, its up to you, to make sure you have a good performance in a byblon.js engine, becourse its a engine, with a lot of functions, switch online to your needs. Scetchfab has a different keel of their boat .
 
Next time you have a small project, i can put you something together, just for the love of art. And thats the point, with babylonjs you can go everywhere, with many different clients, - if you only work on a very specific small project once, you can also create a weggl page on your own. I work now a quad wireframe shader. 

 

Link to comment
Share on other sites

7 hours ago, Deltakosh said:

You did not turn mipmap off like this. This is a parameter in the texture constructor?

Please tell me how I can disable mipmapping properly.  I searched the documentation and it just looks like a parameter for the engine and for video textures.

Link to comment
Share on other sites

14 hours ago, Nabroski said:

does this one work ?
http://pharmacist-felix-60764.bitballoon.com/

I think its like RaananW said you are trying to load to many stuff once and you Smartphone refuses.

Try to test:

  • A simple babylonjs plane with a 4098px texture. check ?
  • Your model without uv export (you got a lot of extra data, and is not needed, just delete your uv map in blender before export, will save 50% of file size)  to .babylon.file check ?
  • Your model without textures. check ?


If the first one is running, you already can say, that the problem is: too many to large files.

Sketchfab  converting your files in their own format, its up to you, to make sure you have a good performance in a byblon.js engine, becourse its a engine, with a lot of functions, switch online to your needs. Scetchfab has a different keel of their boat .
 
Next time you have a small project, i can put you something together, just for the love of art. And thats the point, with babylonjs you can go everywhere, with many different clients, - if you only work on a very specific small project once, you can also create a weggl page on your own. I work now a quad wireframe shader. 

 

Your link works on my iphone.

Thanks for the good advice.  Well I've discovered something weird.  My model has failed ALL TESTS!

I removed all textures from the .babylon file and it still crashes http://www.punkoffice.com/scan/none.php?scan=cat_kasey .  Usually the model will rotate a little bit then crash the browser.  I removed the UV from the model and exported it http://www.punkoffice.com/scan/nouv.php?scan=cat_kasey.  The filesize went from 762KB to 553KB.  It will crash but it rotates for a bit longer before the crash.  For some reason the Y-axis has changed in that one.  So it seems textures aren't even the problem.

We have established that some phones don't experience this.  I don't have the latest device so that could be a factor, but even with my device and its current configuration I'm still able to view this model with the same resolution textures (both diffuse and normal map) and the same number of polygons using other webGL frameworks.  So despite the shortcomings of my device, I still think this is possible, hopefully without devs with tonnes of money and hoes!

 

 

 

Link to comment
Share on other sites

@ozRocker


have also a look at the initialization of the engine. maybe turn everything of, if mobile, else use default settings. 


var engine = new BABYLON.Engine(canvas, false,

{ antialias: false,

preserveDrawingBuffer: false, //http://stackoverflow.com/questions/27746091/preservedrawingbuffer-false-is-it-worth-the-effort

limitDeviceRatio:1.0,

generateDepthBuffer: false,

generateMipMaps: false,

samplingMode: 2 },false);
https://doc.babylonjs.com/classes/2.4/Engine

 

I now its sucks, but can you also do a test with out shaders of babylon.

 

BABYLON.Engine.ShadersRepository =null;
Link to comment
Share on other sites

3 hours ago, Nabroski said:

@ozRocker


have also a look at the initialization of the engine. maybe turn everything of, if mobile, else use default settings. 


var engine = new BABYLON.Engine(canvas, false,

{ antialias: false,

preserveDrawingBuffer: false, //http://stackoverflow.com/questions/27746091/preservedrawingbuffer-false-is-it-worth-the-effort

limitDeviceRatio:1.0,

generateDepthBuffer: false,

generateMipMaps: false,

samplingMode: 2 },false);
https://doc.babylonjs.com/classes/2.4/Engine

 

I now its sucks, but can you also do a test with out shaders of babylon.

 


BABYLON.Engine.ShadersRepository =null;

Woh dude!  IT WORKS!!! :D

It doesn't just work, its really smooth, I can have both hi-res diffuse map and normal map AND there is no degradation in quality.

I used the engine parameters you wrote and turned off shadersrepository.  Still looks perfect.  Its actually smoother than Sketchfab too.

You are the grandmaster of webGL @Nabroski!

 

Edit: I removed the shadersrepository line and it still works the same

Edited by ozRocker
Link to comment
Share on other sites

4 hours ago, Deltakosh said:

@Nabroski: Good catch man!!

So I just need to understand which parameter was the issue :)

can you try with only:

limitDeviceRatio:1.

- antialias: false,

- preserveDrawingBuffer: false

 

And let me know which ones was the problem :D

Ok, I tried each one and the only parameter I need to solve this problem is "limitDeviceRatio: 1"

So if I use this:

var engine = new BABYLON.Engine(canvas, true, { limitDeviceRatio:1.0 });

it works

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...