Hi people,
For some reasons, I have to have a break in my contribution activity to this fantastic framework.
Therefore I decided to share my current TO-DO list here (not in Github feature requests, because I don’t request anything from the BJS team, it was just a personal challenge so far). Things I won’t implement in the next months but that I still wanted to.
So, if one of you is interested in one of these challenges … good luck
BJS CreateBox : the box mesh is one of the brick of BJS, so it could be improved by many ways
-
set and return fixed float arrays (positions, normals, indices, uvs) in the VertexData constructor instead of computing them
Babylon.js/boxBuilder.ts at master · BabylonJS/Babylon.js · GitHub
it would be simpler to set once for all arrays with known values (get them from the console with the current algo)
var positions = [1, 0, 0, 0, 1, 0, …etc ];
idem for every array. This would be simply one line of code per array instead of the current geometry computation.
Challenge level : very easy -
add a parameter alignSides (not sure about the name) to allow to wrap UVs from a continuous texture for 4 box sides with all the 4 images in the same orientation.
This would solve this issue : Apply Material to Individual Faces - Babylon.js Documentation
No need then for rotating some of the images in the texture. This would also allow to wrap standard exported UVs like the minercraft-style Mario head that was somewhere in the former forum.
Thsi feature is expected in the forum for a long time.
This requires to change a little the current box geometry at construction time by swapping some indices.
Challenge level : easy -
add a new box mesh : the tiled box. The tiled box can have any of these 6 sides (or all) tiled with a subdivision factor. Example :
var tileFactors = [2, 3, 1, 1, 5, 1];
CreateTiledBox(“box”, {tiles: tileFactors}, scene);
This would create a box with its side0 with 4 tiles (2 x 2), its side1 tiled with 9 tiles (3x3), its side2 as usual, and so on.
This requires to compute a dedicated new geometry and make it work with existing features obviously when possible : faceUv, faceColors. This would require to duplicate many vertices so the user can then attach different textures or colors per tile.
This feature is also expected in the forum for a long time.
Challenge level : average
Other Mesh types :
- add the feature faceUV and faceColor to the tiledGround mesh.
Challenge level : easy
Octree :
- implement a faster octree selection in the current BJS octree without modify its API.
The faster octree algo is known as the Morton code and is O(n) = log(n) max.
The implementation is very well described here in french : Octree optimisés gràce au code de Morton
english (didn’t read) : Advanced Octrees 2: node representations | The Infinite Loop
Challenge level : hard, maybe very hard
SPS :
-
implement the expandable SPS : the ability to add solid particles at any time after the SPS creation. Caution about all the internal indexes and about the garbage collection.
This feature is also expected in the forum for a while.
Challenge : rather difficult -
implement a particle recycler for the SPS based on the DynamicTerrain object recycler behaviour : the user could define a logical data map of millions particles (type, position, rotation, scaling, color, uv) in the space and the SPS would recycle a reduced pool of solid particles to render only the currently visible ones. This requires that the former optimized octree algo is already implemented (or implement this octree internally in the SPS recycler) and that this octree could work with logical objects from the data map and not only with meshes (fix or extend the octree API then).
Challenge level : very hard
PointCloudSystem :
- implement a PointCloudSystem : a bit like the SPS (same design and philosophy) but managing points (gl_point or pointCloud = true) instead of solid particles. The ability to manage, animate or set millions points in a single draw call.
The global design is in my head for months, but no time (it needs much) to do it.
This feature is expected also.
Challenge level : difficult, but rather long. This is a really big piece of code.
If I retrieve some of my lost ideas, I’ll add them in this thread.
My contributions so far : GitHub - jbousquie/MyBabylonJSContributions: List of my contributions to BabylonJS
Have fun at meeting one of these challenges, brave people