BabylonJS Vram usage versus Unity

You are right, that was my fault, sorry !

1 Like

I don’t think that I’m messing up the mipmaps though, generated with -mipmap and unpacked to test (mipmaps were there), but distant objects (and not-so-distant too) do look like they don’t have any mipmaps, I am familiar with the look.

yep mipmaps are not yet supported

Yep all of these are on my todo list this week so far. If you have any other requests/issues for it let me know.

Thanks !

Was testing it rigorously yesterday and nothing major to report except mipmaps really. It works great.
The only other minor thing I found is that the loader doesn’t show the loading progress. :fearful:

There are some concerns regarding the quality of the textures which basisu outputs even at the highest quality (-level 5 -max_endpoints 16128 -max_selectors 16128 -no_selector_rdo -no_endpoint_rdo`) I wanted to make a report yesterday but decided to wait and test more. But since size reduction is absolutely insane (considering it packs in so many textures into this one package too!), I’m not really sure if its worth reporting.

What I also find weird is that the output size doesn’t really seem to change much between the highest quality and the lowest quality settings, if I generate at default settings, the size will for example be only 20% smaller than what it was at max settings, e.g the original image is 2mb, basisu default brings it down to 200kb and max settings will be 240kb. And the quality difference between those two options is nothing to write home about.

Just reporting my findings, maybe I’m doing something wrong, who knows.

This is top quality encode, but the difference between level -1 and level -5 isn’t really much and I got a bit lazy and didn’t make the -level 1 thing.

Anyway, might not seem like much, but it does introduce some weird blockiness and loses detail. Also once again, for 3 textures (base color, normal and RGB for pbr) basis is 642kb and png source is 4mb, so this is a huge saving in disk space and vram usage.

@somerandomguy83 Thanks for sharing your findings. I’ll write a babylon docs page on this so having some numbers is nice.

My PR with mipmaps and webworker support should be up soon. Would you be able to share the file you are using so I can test with it?

That’s great to hear, really looking forward to the mipmaps release !

My apartment scene is a big mess right now, no point in sharing, but I made you a comparison scene which you can use for testing.

Archive also includes 1.07 basis encoder and batch files which you can use to drop png textures and they’ll output .basis files with the same names, feel free to edit the settings in any text editor and test for yourself. Right now its set to -level 1, and you can go up to -level 5 for maximum quality.

Also included Blend file

Link to the archive

Or you can live-view the scene here

Playground doesn’t work for me for some reason, but if you want you can upload it to a playground.

1 Like

Thanks a lot, love the comparison :slight_smile:

Np, figured your time could be spent developing more important things instead of creating testbeds and my time isn’t worth much anyway. Hopefully that’ll help you pump out that mipmaps fix a bit sooner :slight_smile:

1 Like

This thread is why, luv this community… just sayin.

2 Likes

@somerandomguy83 After basis test and multi file loading fix by TrevorDev Ā· Pull Request #6463 Ā· BabylonJS/Babylon.js Ā· GitHub is merged and a nightly is done give it another try and let me know if you find any other issues or missing features you need. I also got your scene working on the playground which should look right once that PR goes through Babylon.js Playground and mipmaps should work here https://playground.babylonjs.com/#4RN0VF#6. Thanks again for the scene/assets :+1:

1 Like

Pbr mats dont seem to work for me, or i’m not really sure what’s going on here. It’s the same scene as before, i just linked the new versions

Raises hand. Hi sebavan… that was really neat. Calculations (above somewhere)

If I may ask… what was it? How to calculate texture sizes…

: )

Layman Guess:

1024x1024 resolution

  • 2048 ( doubled - dont know why)
    but then…
    85, 4, 1.33 ? : )

GUESS:
is that the size of material, texture instances, etc?

Cool : )
Thanks.

85 = 170 / 2 cause 170 textures half 1024 half 2048

And compute is: number of textures * size in pixels * 4 bytes (r g b a channels) * 1.33 (about 1/3 increase with mip maps)

This is the memory size on the gpu.

Hope that helps

2 Likes

Really sorry for being dumb in the posts about errors earlier, was not entirely familiar with BabylonJS development cycle, only now did I realize that I have to wait for the changes to be compiled into the next release version for them to take effect.

Took some time to read up the docs and figured out how to compile the new version with updated basis.ts file and got it working, but not really seeing any effects at the moment, guess i’ll have to wait for the official release to discard any possible errors on my behalf again.

@somerandomguy83 the changes were not yet deployed to the playground. Give it a try now and let me know if you still hit issues.

https://playground.babylonjs.com/#E4VDDW

Unfortunatly I cannot use my basis encoded textures

basisAndJpg.zip (936.0 KB)

Any though on this?

should be working fine, at least your texture unpacks properly, i noticed _ny at the end, are you trying to use it as a cubemap ?

basis doesn’t work for cubemaps yet i think