Jump to content

EdgesRenderer with Solid Particle System


Woodro
 Share

Recommended Posts

Hello All,

Is it possible to use the EdgesRenderer with the Solid Particle System?  I cannot get it to work with a simple box. I'm able to create a box with edges, and a SPS with lots of boxes, but not both at the same time. Any pointers would be appreciated.

Here is a small section of my code. The boxes show but without any edges.

 var box = BABYLON.MeshBuilder.CreateBox("b", options, scene);
 box.enableEdgesRendering();   
 box.edgesWidth = 10.0;
 box.edgesColor = new BABYLON.Color4(0, 0, 1, 1);
 var mat = new BABYLON.StandardMaterial("mat1", scene);
 box.material = mat;
 // SPS creation ==========================================================
        var sps = new BABYLON.SolidParticleSystem("sps1", scene);
       sps.addShape(box, nb);
        box.dispose();

 

 

Link to comment
Share on other sites

Sorry for the late reply. I tried your suggestion, but no luck. I can get by with making the edges in the texture (see attached pic), but was thinking that the EdgeRenderer would have worked perfectly and looked better on my scaled boxes.

I work at a Parts Distribution Center for an automotive company, and have been working on a Babylon project to help us look at storage location data (empty locations, most picked from, etc.). In the past few weeks I have found many answers to my questions on this forum, so thank you (and to your team) for all the posts/replies.

StorageBins.PNG

Link to comment
Share on other sites

I have just been testing the EdgesRenderer in my existing project. I really should make a small SPS to test/tinker with, and I still need to learn how to post to the Playground.

I'm sure I will need the best performance as possible, so I will stick with the texture to make the edges. Thank you for the info!!

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...