Jump to content

Cut faces on custom polyhedron


Marvin Walters
 Share

Recommended Posts

Hello everyone,

I'm working on the visualization of custom polyhedra with the Mesh.CreatePolyhedron method. I want them to be outlined with the edge renderer, but if you look at the following PG, you will see that the top and bottom faces are cut. I've realized that this problem occurs because 2 edges are overlapping each other. Is there any solution for this shape not being cut? Or is there anything I'm doing wrong?

PG: https://www.babylonjs-playground.com/#IKFFEZ

Link to comment
Share on other sites

Hiya MV, welcome to the forum.

I'm not sure that is possible.  (But Gods are nearby, thinking about it).

https://www.babylonjs-playground.com/#IKFFEZ#2

Line 47, that true parameter is for .useVerticesInsteadOfIndices

I thought SURE that would fix the red line crossing the mesh.  But noooo... Wingnut does a face-plant with added Purina Gravel-Chow  :D

I'm not sure that I understand the problem, but I think the red across-the-mesh line... is unwanted.  Also, it might be nice to have edgeRender in the corners of the 90 degree angles.

I also added light.groundColor... so we could get some bottom lighting.

Anyway, smarter people than I... will comment soon.  Stay tuned, please.

Link to comment
Share on other sites

Hi again, guys.  Ok, so, where are we at?

https://www.babylonjs-playground.com/#IKFFEZ#3

Is that red sideways line... the problem?  Is that what you mean by "cut", MW?  (there is another red line on bottom, in same position)

If so, ok... we need to find the "big dogs" of the edgesRenderer and see if they want to try a modification, yes?

I did another test. [link]  I wanted to create a wireframe clone of the mesh, and render THAT atop the main mesh.  I needed to LOWER the mesh.visibility  (to something < 1.0)... so I could see the wireframes.  When I did that, the edges render ACTIVATED in the 90 degree corners.  Know why?

Yep, the edgesRenderer, which is an angle-sensitive device... did its job perfectly... ON THE INSIDE OF THE MESH.  heh.  Ahh, robots... they are SO FUN to fool.   :)

How 'bout it, pros?  Any way to remove the cross-mesh red line shown in #3 playground?  Any ideas about WHY the edgesRenderer thinks that is an edge location?  (thx)

Also, MW... if I have stated the issue wrong, please correct me.  thx.

Link to comment
Share on other sites

12 hours ago, Wingnut said:

https://www.babylonjs-playground.com/#IKFFEZ#3

Is that red sideways line... the problem?  Is that what you mean by "cut", MW?  (there is another red line on bottom, in same position)

...

Also, MW... if I have stated the issue wrong, please correct me.  thx.

Yes those 2 lines "cutting" the top and bottom faces are exactly the problems.

 

11 hours ago, adam said:

That is a good temporary workaround, thanks for that :)

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