I have a PG setBillboard
after setteing mesh.billboardMode = BABYLON.Mesh.BILLBOARDMODE_ALL the light bloom area is smaller,And the position has changed from the top right corner to the bottom right corner, why?
This is the style before I set it up, even if I don’t turn the camera, it’s a lot bigger
BABYLON.SceneLoader.ImportMesh("", url, modelName, scene, function (newMeshes) {
const model = newMeshes[0]
// // out bloom
const atmosphere = scene.getMeshByName('Earth_Atmosphere')
atmosphere.material.backFaceCulling = false
// out lighter
const hightlight = scene.getMeshByName('Earth_Hightlight');
hightlight.setParent(atmosphere);
hightlight.material.backFaceCulling = false;
atmosphere.billboardMode = BABYLON.Mesh.BILLBOARDMODE_ALL
});
I want to set up the billboard mode, the same as before, such as location, size What should I do?
Hello
Setting up BillboardMode
locks the rotation regarding the camera, but still you can edit rotation (which will then be considered as an offset on top of billboardmode)
In your case I would advise to :
- Set up the
atmosphere
as billboard alone (since it’s 2D, should remain in the camera plane, I guess)
- Set up the
hightlight
in billboard mode as well, and play with its rotations
Here is a Playground with a bit of UI for tweeking angles
NB
: For hightlight
I have setup the billboard to a TransformNode
and parented the hightlight
to it, to ease to rotation globe center.
++
Tricotou
7 Likes
You were amazing and very careful. Thank you very much!!!
2 Likes
Pleasure !
By the way, I like your night style earth model ! It reminds me about a version I had done in Blender some years ago, when I was a student : video (similar halow at the end) Except yours is real time while mine was taking like nights to render
1 Like
I’ve seen the video. It’s cool. It’s awesome,I’ve seen the video. It’s so cool, I’m sure I couldn’t have done it when I was a student