Jump to content

Use Layer class and LayerMask property


Dad72
 Share

Recommended Posts

Hello,

 

I'm not sure to understand the use of the class BABYLON.Layer() and property BABYLON.Mesh.LayerMask

 

Can we have some explanation, use cases, code example. I am interested in its two features, but I'm not sure to understand yet. I want to understand how it works concretely.

 

Thank you

Link to comment
Share on other sites

Ah, I have not seen her like this. sprites uses layer if I understand well. But the layers can also be used a anything else from making sprites not?

 

Then LayerMask that interests me is to create masks (for example a circle on my minimap to the places a carrer) but I'm not sure how to with LayerMask

 

PS: It would be although LayerMask is also implemented for the lights to illuminate only parts of the scene.

Link to comment
Share on other sites

It would be although LayerMask is also implemented for the lights to illuminate only parts of the scene.
 
Is it also a "CullingMask" (array()) for the camera that must make objects selectively with to the layerMask.
It would only display for example for a viewport (mini-map) disable some mesh in the scene (water, particle...)

Link to comment
Share on other sites

I mean just to illuminate the portion of meshes of the mask. not exclude a mesh as a whole, but enlighten just one part and exclude another of the same object

 

And what do you think of the ideas CullingMask (array) on the cameras? it could be very useful. (In the same manner as Lights.excludedMeshes)

Link to comment
Share on other sites

I partly understand, but I have several camera, one that is the view of the controllable character in viewport 1 (cameraRotative) and one which is for the mini-map in viewport 2 (freecamera). need some object to be rendered for a camera but not necessarily for the other and there I do not know.
 
I want to do is on the mini-map does not make some object on the viewport 2, but it still made for the camera on the viewport 1
 
Is it possible?
 
Thanks again DK.
 
********** FR ***********

J'ai en partie compris dans le cas de l'utilisation de une seule camera, mais j'ai plusieurs camera, une qui est la vue du personnage contrôlable en viewport 1 (cameraRotative) et une qui est pour la mini-map en viewport 2 (freecamera). il faut que certain objet soit rendu pour une camera mais pas forcement pour l'autre et là je bloque, je comprend pas trop.

 

Ce que je voudrais faire c’est sur la mini-map ne pas rendre certain objet sur le viewport 2, mais qu'il reste rendu pour la camera sur le viewport 1

 

Est ce possible ?

 

Merci encore DK.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...