amo yeh Posted November 14, 2016 Share Posted November 14, 2016 Try to generate a custom mesh with material. this is what I did so far ~ http://www.babylonjs-playground.com/#1WGFZV#2 Appreciate if anyone could answer or correct my issue 1. How to create a double sided face ? tried backFaceCulling but don't seem to work. 2. I would like the triangle to display custom uv position, a image explain what I am trying to accomplish. I search on the forum and found out a similar problem here , but still uncertain the correct way to do it. thanks for the help ~ update : I think I posted this on the wrong section , should be under Question and answers , please help to modify , thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 14, 2016 Share Posted November 14, 2016 Hello (I moved the post) 1. I tried with backFaceCulling = false and then I can see the back face: http://www.babylonjs-playground.com/#1WGFZV#3 But I guess you want different UV for the back face? In this case you have to duplicate geometry 2. For this you will need 6 vertices instead of 4 as the corner vertices do not share UV Kemal UÇAR 1 Quote Link to comment Share on other sites More sharing options...
Kemal UÇAR Posted November 14, 2016 Share Posted November 14, 2016 Hi amo yeh ; I used instances and zoffset hope helps you, http://www.babylonjs-playground.com/#1WGFZV#4 drawcalls still 2 hv nice works Quote Link to comment Share on other sites More sharing options...
Kemal UÇAR Posted November 14, 2016 Share Posted November 14, 2016 http://www.babylonjs-playground.com/#1WGFZV#5 http://www.babylonjs-playground.com/#1WGFZV#6 line rendering for triangles , I hope helps you hv nice works Quote Link to comment Share on other sites More sharing options...
jerome Posted November 14, 2016 Share Posted November 14, 2016 I have on my todo list to add different UVs (a bit like faceUV) to the back side generated with sideOrientation = DOUBLESIDE Quote Link to comment Share on other sites More sharing options...
amo yeh Posted November 20, 2016 Author Share Posted November 20, 2016 I tried to use 6 points instead of 4 to create 2 triangles with different scaled uv as mentioned from the image. http://www.babylonjs-playground.com/#1WGFZV#9 It seems to work as expected, a square with two custom uv locations. according to other post replied @RaananW said Quote "The babylon format works differently. It is rather redundant, but wonderful for performance. If you want to add a new uv to an existing position definition, you will have to duplicate this position and add the uvs definition at the correct position. This is due to the indices definition. Not like obj, indices is only 1 number, meaning 1 position of the array. You can't reference a specific uv definition and a different positions definition. " so I suppose this is the correct way to do it ? Thanks for the help~ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2016 Share Posted November 21, 2016 It is Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.