Pryme8 Posted March 23, 2018 Share Posted March 23, 2018 I will have dynamic grass if it eff word kills me. https://www.babylonjs-playground.com/#3D3RPL#3 It looks like I am losing the added buffer uvRef that I am adding to each individual blade. Does that mean I just keep pushing the values to the array and then set the buffer on the merged mesh? The Vertices data should be in the same order I would imagine? But when I do that I get this result:https://www.babylonjs-playground.com/#3D3RPL#6 The Buffers seem to be there now, but using it in the shader makes it disappear so I wonder what I am doing wrong? https://www.babylonjs-playground.com/#3D3RPL#7 then the mesh reappears when I nerf line 19 in the vertShader. https://www.babylonjs-playground.com/#3D3RPL#8 this is Approx what I am going for, but from the uvRef Data not position. https://www.babylonjs-playground.com/#3D3RPL#10 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2018 Share Posted March 23, 2018 Hey! So mergeMeshes will only merge know kinds and not all of them if you add custom ones . You will need to manually merge the custom ones Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 23, 2018 Author Share Posted March 23, 2018 https://www.babylonjs-playground.com/#3D3RPL#12 So am I merging them wrong? Ok I think I just am setting it up wrong... I think its because my numbers are off on how many I am pushing to the array. Yup has to be, because the counts should be the same as the uv attribute. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2018 Share Posted March 23, 2018 You should try without merge at first. Making sure the shader works Then switch to mergemeshes. I'm ok to add a version which could also merge additional custom attributes Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 23, 2018 Author Share Posted March 23, 2018 ASD:LFKASDFSNAKFNDASKL YAAAAAASSSSS!!! https://www.babylonjs-playground.com/#3D3RPL#13 This will do. Im starting to get excited, wait to you see what I am planning with this. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2018 Share Posted March 23, 2018 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.