Help creating complex GUI

What do you mean with ‘modeler’? How would this be done?
I am having a issue with current implementation, because the text is not really visible, and gets lost behind the texture.

I mean softwares like Blender, 3dsMax, Maya, etc.

For improving performance:
I would look into using the SPS system of Babylon, seems like the perfect fit for me.

Thanks ill have a look into SPS.

I’m having a performance issue also. On the first “rotation”, there is a noticeable delay, but subsequent animations seem much smoother. Is there something here im missing?

That is hard to say without the code. Care to share a playground?

Its basically exactly the same as was posted by @Evgeni_Popov: https://playground.babylonjs.com/#QS3BLK#6

I don’t know if its the same on other people’s pc’s, but on the first “key press”, there is a slight lag.
Playground performance seems better to me than what i’m running locally, which is strange tbh

Hmm, I see no reason for it to lag…
When I am home I will gladly try to help you more. Cause my work unfortunatly doesn’t pay me helping others :stuck_out_tongue_winking_eye:

2 Likes

Ok thank you. I tried disabling other walls, and only rendering 2x walls, but it still happens…

Another interesting problem…
So in the current implementation, the cube remains still and the camera rotates around it.
This is not ok, since the shadows need to be always present on the “front” wall.
I then disabled the camera rotation, and just rotated the cube, but then I notice I lose the “text” on the block?
I seems like the lights didnt update after the rotation?

Here is a little SPS proof of concept:
https://playground.babylonjs.com/#US03I4

It still lacks commentary or actual buttons, but it should run a lot smoother, even with a bigger wallSize.

Edit: I played a bit with it and it doesn’t seem as effective as I tought…

2 Likes

Turns out not updating every particle on every frame, is a good idea:
https://playground.babylonjs.com/#US03I4#1

Hope this helps as a base to build up upon.

4 Likes

Thanks alot @Kai_Jessen, I will have a look and adapt accordingly.

All right everyone, I restarted the whole thing, and made some adjustments.
Instead of writing on a cube directly, I now attach a plane to one of the sides, and then write on the plane.
This resolved the text clarity issue when other textures are used.

Secondly, i figured out the scaling and offset of the textures, so now I use one large image texture, scale it 0.1 per cube, and do some offsets, and it ‘appears’ as only large wall, with each cube having a unique part of the texture.

Ill port everything to a playground soon to demonstrate, but i’m hoping this won’t cause performance issues. I’m wondering if displaying textures on the ‘never visible’ parts of the walls will impact performance?
Also, how performance costly is it to create and destroy cubes? or is it better to just hide them when not in use?

Also, what exactly is the benefits of using SPS @Kai_Jessen? I see how it’s used, but what why would that be more performant that regular meshes?

All right folks here is the playground. @Kai_Jessen @Evgeni_Popov @JohnK @ycw @sebavan @Wingnut
Use “d” button first, and then “a” to do toggle animations.

On the playground, the animations happens smoothly, always.
On my local machine, there is always a noticeably drop on the first rotation, but then not after??

Any performance tips would be much appreciated! I tried using the SPS, but since the textures are unique per cube, it didn’t quite work.
Something feels wrong about creating the same “materials” for each wall. I have a large image, and each cube gets a unique piece of that image. I figured using the sprite system would be perfect, but that didn’t lead to any results.
Using the .clone also forced me to recreate the materials each time…

@Vinc3r What could I do with a modeler here to improve performance? I’m willing to download and play with Blender a bit, but what are the keywords for what I would need to create there?

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

1 Like

About performances I don’t know, it’s just that as an artist it’s a lot simpler to create a beautiful scene or animations with a soft like Blender than using code :smile: But if you don’t know how to use a modeler it will be easier for you to keep using code.

Update for everyone: babylonjs - Streamable
I completed the base finally, huge learning experience, lots of fun. Obviously it looks much better than the video, but its smooth and fairly functional.

I even found the sound resources, but I haven’t figured out how to replicate the sound effect as in the first video from this thread.
If anyone is interested in helping out, find the resources here:
https://www.sounds-resource.com/download/20621/

4 Likes

Woooot Really cool man!