Thanks for this awesome library !!
I’m a beginner with babylon.js and with 3D in general.
I have a side project where I need to display at least 10 000 differents pictures.
- All pictures are positioned with x and y.
- The z axis is only used to avoid superposition between picture, it’s a random float between 0 -> 10.
- Once picture are positioned, they never moved.
- I position my camera to (0, 0, -200) and I can zoom in/out and right/left bottom/up between all pictures.
- The user can zoom on each picture if he want.
- All pictures can be displayed at the same time if I zoom out.
- If the user click on a picture, I display some information about the corresponding image.
- the user can search for a tag, and I color the corresponding picture
- Pictures have a resolution of 128, and are concatenated by 1000 in one big pictures of 3.6 Mo. To avoid load time.
- I have a JSON which contains the list of all pictures, with:
– Coords x, y, z.
– The url of the big picture.
– The coords in pixel of the corresponding part in the big picture.
I’ve tried different solutions:
- Big mesh with dynamic texture
- 10 big mesh, position at (0, 0, [0, 1, …, 10]), with a resolution equal to the max of possible picture coordinates.
- In each mesh I have a material with dynamic texture and
- Then I draw each image in the texture.
- That’s work.
- But it’s difficult to detect a click on a picture.
- And it’s difficult to colorise a specific picture.
- And the render quality is not satisfying
- One mesh by picture
- One mech by picture.
- The mesh is a clone of an origin one. They have all the same size.
- For each, one dynamic texture where I draw a part of the big picture.
- Tried with mipmaps=true and false.
- That works, I can click on picture
- The render is good.
diffuseColor='red'I can colorise a specific mesh correspond to the tag, the user have searched
- But … it is really slow (less than 10 fps).
- I understand Babylon have to call a draw for each visible mesh.
- The same as 2
- But instead of using concatenated picture, I used a compressed file by picture (
-dxt.ktx) with mipmaps generated.
- But there is not a visible difference on fps.
- And the loading time is way too long.
Questions time :
- Is there a solution I’ve not tried ?
- Or some improvement
- Or may be, I’m not using the right library for what I want to do.
Thanks in advance for your advices