Jump to content

CSG union rendering problem


robeebdg
 Share

Recommended Posts

Hi,

 

I am just starting to experiment with BabylonJS and I tried to create a simple CSG union of a box and rotated cylinder. However, after applying the same material to the resulting mesh, it looks different from the two original meshes.

 

You can find the scene here:

 

http://www.babylonjs-playground.com/#YMNPT#4

 

The original seperate meshes are on the bottom while CSGs are on top. As you can see, without rotating the cylinder, CSG and original look the same (left).

 

I would be very grateful, if anyone could give me a hint as to what goes wrong (or rather what I am missing) here.

 

Robert

 

Link to comment
Share on other sites

Wow, thanks for the quick fix. It seemes to work now in playground.

 

But while we are at it and I really like those CSGs ;) , here is my next problem:

 

http://www.babylonjs-playground.com/#YMNPT#5

 

Again CSG on top, single meshes on bottom. You can comment out individual meshes from the union to get different results. E.g., if you remove the backRight sphere everything looks as expected (except for the minor difference (top vs bottom) in reflection from the backLeft corner).

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