Fantastic Park // WIP


(Yannick Deharo) #44

Hi james, thank you for your intervention !

I believe it’s something I can do ! That was very cool for me to use your all new SSR function but YES its not really essential here…

For the textures size I believe I can do something too… But I have questions:

  1. Is the clamp mode on the textures is less heavy than the repeat mode or that makes no difference ?
  2. I’m not sure to use the best solution for glass. I have one mesh and I separate its pieces by 11 different shaders in order to prevent Z fight as possible… maybe I could really break the mesh in pieces directly in the FBX and apply one only shader on them ? But is it always true that you didn’t merge transparent objects with the same shader ? And would it make a difference in matter of optimisation ?
  3. How can I see myself the needed amount of RAM ? That could be cool to see its variation when I apply changes.
  4. How are you ? Personaly I’m fine ! :wink:

Edit : I already decrease Maps size and turn OFF AO and SSR. Is it enough for memory ?


@stephomi correct me if I’m wrong:

No difference.

Transparency is trickier. If you’re using Blending mode, you will have to keep meshes separate to avoid z-fighting, but they should still be able to share a single material.

memory usage = width x height x channels (i.e. 1 byte per channel per pixel)

so a 4k texture memory = 4096 (pixels) x 4096 (pixels) x 4 (RGBA channels) = ~67 MiB

2k texture memory = 2048 x 2048 x 4 = ~16 MiB

So, decreasing your texture size by 50% reduces your RAM usage by 75%.

Doing well, happy Friday!

(Yannick Deharo) #46

Thank you for answering everything. I realize that the time I get to define the “Clamp” mode was lost time :sweat_smile:!

In fact my second point is always hard to understand for me. For now, my mesh isn’t separated in the FBX. That’s the fact he as different shaders on it which makes it split into pieces by sketchfab itself.

I understand that I can have one unique shader on already splitted meshes.

My question is based on my misanderstanding about your textures support. About how many times is loaded:

  1. one unique map used in different shaders applied on different meshes each.
  2. the same map used in one unique shader applied on different meshes (which remain splitted because of their transparency).

Is there a method better than the other ?

In addition you seems to say that only the pixels number counts ? So the JPG compression ratio isn’t took in account by the memory ? Just by the download time ?

Thank you and have a good Weekend or monday… depending on when you are reading ! ^^


Correct, as far as I know.

I’m not really sure about the performance difference here. @stephomi or @tuan_kuranes probably knows.

(Yannick Deharo) #48

Okay, thank you James !
I will wait a possible answer of @stephomi or @tuan_kuranes in order to make the best choice for my scene.

(Paul Sketch) #49

At runtime, texture are packed whenever possible to makes it load as few separate texture as possible, so it aims for 2.

(Yannick Deharo) #50

Okay. My english level isn’t perfect but if I understand well, I have to follow the method 2 which is one unique shader on different meshes ?

(Paul Sketch) #51

We may have to clarify what you call “Shader” :slight_smile:
What I understood from it is what is called material in sketchafb (in the editor, the tab where you change/add textures)

(Yannick Deharo) #52

Yes @paul_sketch, I mean “material”. For the moment, I have 11 different materials and 1 unique mesh. But sketchfab split my glasses in different meshes according to the materials and the “Z-fight glitch” is contained.

If I understand well, I should better split my mesh in 11 pieces from 3DS Max and apply 1 unique material ? That should be better for performances ?

(Paul Sketch) #53

It was more about one texture atlas (nicely packed offline by your 3d editor).

The number of mesh is for sketchfab to do the transparency ordering (“z-fight glitch”), but that can be ignored if doing dithered (did you tried?), additive (not really for glass) or alpha mask transparency (not really for glass, more for decals on glasses)

The number of material is for the case you need different material settings in sketchfab (like different slider value or types of transparency)

For Transparency specifically, you could have all glass using the same material, without texture at all, just colors, but with seperate meshes (for ordering)

And if you need things (like writings) ON the glasses, those could be either opaque meshes (best, but need some fine detail meshes) in a main unique mesh/material/texture, or more easy, Decals which are quad using an alpha masks texture that says which part if full transparent and which is full opaque (and there you can have all decals in one unique mesh/material/texture)

(Yannick Deharo) #54

I tryed dithered, but I dont like its “noisy” effect. I never succed in having a result with Alpha mask transparency which give me a fully opaque render.

I will probably use the same material for all the separate meshes of glass. But I need textures for sand and graffitis that have to be partially opaque. So, I can’t use entirely your solution.

Thank you @paul_sketch !

(Paul Sketch) #55

Indeed, if the sand and graffities needs bleding, it cannot be decals then

( for another time, Alpha masks need a gray texture to do the mask, slider allow to select value on where opacity is enabled/disabled, it’s the most efficient way when you don’t need blending but need parts either full transparent or full opaque )

(Yannick Deharo) #58

I add this here because it belongs to the same universe !