Japanese Lamp and Babylon practice

Hi guys,

Normally I am a pure 3D artist and I almost never play with the code editing except for materials and render settings. I basically have 0 knowledge in HTML/JS/CSS.
As I had some free time this week, I decided to create my first complete Babylon scene from scratch to enhance my knowledge, in order to gain some autonomy about scene creation. Usually my good friend @Vinc3r is taking care of most of the coding part.
I started with a simple Japanese lamp scene, which I did following a Blender/Unity tutorial to push it into Babylon.
About 3D specs, it has been made in Blender, using Cycles to bake the lightmaps, and I used Photoshop and Shader Map Pro for the textures.
I tried my best to play with lightmaps integration, post-process effects and other Babylon cool stuff. It’s still a WIP and I don’t know where I am going with it :smiley:

The current scene is here

And a little peak about it :

21 Likes

This is extremely beautiful!

1 Like

Amazing work! The particle effect really makes the scene come to life.

1 Like

Thanks to both of you.

In my todo list, I want to redo the switch and its wire and to set up properly the starting camera angle. I also need to create a play/pause system for the music (and find a real Japanese track, not a Chinese one).
And, if possible, to find a trick to start the particles system only when all the other assets are loaded. :face_with_head_bandage:

You could try using the async loader with promises to wait for everything to load before starting the particles.

Something like this should do the trick.

var loadLamp = function () {
    return new Promise((resolve, reject) => {
        BABYLON.SceneLoader.LoadAsync('', 'your/file/url', scene).then(function (asset) {
            resolve(asset)
        })
    })
}

loadLamp().then(startParticles())
3 Likes

Thanks, I will give it a try.

That’s a really beautiful scene!
Great work!

1 Like

MAN! This is impressive! We will add the demo on our homepage!

1 Like

Hey, thank you!

Awesome!

It would be pretty cool if we could hit the switch on the ground to flip it on and off.

2 Likes

The first thing I tried to do was flip the switch.

1 Like

Ah ah I could do that, but it means I need to bake a new lightmaps pack for the OFF version. And to understand how JS works :smiley:
But it is a terrific idea! Let me think about it.

1 Like

you will also have to make sure you an reference the “switch” mesh so you can know when it is hit, and also make it flip back and forth!

You got this, if you were able to get this far.

Glad to see that I am not the only one. Welcome to the club :grin:

Very very nice @Crotmoul though as others have said, I tried clicking the switch! But you are a details man.

Too often people just grab a model from somewhere then complain BJS does not work. Every team needs a model creator. Very good to see your demo on here

cheers, gryff :slight_smile:

1 Like

@Crotmoul I see you can be able to do code as well when I’ll come back from vacations :nerd_face:

Do you have screenshot from the Unity tutorial you’ve made at the time?

Nice piece of scene :wink:

I didn’t push anything on Unity, I went directly with Babylon.

2 Likes

Hi all,

As @Vinc3r is back to the office after his vacation, he was able to help me a lot with the coding part. So… This little app has been updated. Now you have:
• The ON/OFF system with two dedicated lightmaps and materials sets
• A proper play/pause button for the music
• The particles are turning off when we switch the light off (and they come back as well)
• An animation for the switch (plus a click effect on the pointer)

Also a good thanks to @devAxeon for his help. It was way to complicated for my knowledge ah ah.

Still available following this link

Have fun playing with it :slight_smile:

2 Likes

And BTW, it would be awesome to have an option to occlude the specular from the shadows. Because it’s not so realistic to have the specular effect glowing in shadowed parts of a scene and it would be a great way to go further in realism with Babylon.

There is this option available in the Sketchfab editor or in Unity or the UE for instance. We’ll make a proper request with some examples in the proper section of the forum later :wink:

There is no specular in shadowed area (there is literally no light). Can you repro this behavior?

In fact I was talking about the specular working with the lightmaps. Vinc3r will prepare a dedicated scene tomorrow in the request section to explain it the best technical way possible :smiley:

For example with the scene above: