DylanD Posted July 12, 2018 Share Posted July 12, 2018 Hello again everyone, So earlier I figured out how to get gradients into my scene... but now I can't get them to do what I want. Im hoping to have the gradient go up and down kind of following water like movement, or even just something I could control the height. So in the playground I have the block with the gradient and one next to it, I want the intersection of the two colours to follow the moving blocks top edge(or at least goes up and down with the block, possibly all the way up or down)... https://www.babylonjs-playground.com/#2IFRKC#16 Any ideas how I could do this? Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 12, 2018 Author Share Posted July 12, 2018 I kind of got it... https://www.babylonjs-playground.com/#2IFRKC#17 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2018 Share Posted July 13, 2018 Pretty good no? DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 13, 2018 Author Share Posted July 13, 2018 17 minutes ago, Deltakosh said: Pretty good no? To be honest, no. They don't have much of an explanation for them(that I found) and I could get them to do what I wanted in the end. So not really. (not trying to hate but they're so close to pseudo shadows the way I want them but I just can't figure them out , so its a bit frustrating) But I have to understand that they are still in the "beta" or whatever *sigh* Good start though I guess https://doc.babylonjs.com/extensions/gradient Also I don't know if it is my machine specific but on safari the bottom bar of the website regularly blocks the last few lines of the documentation and I understand you are Microsoft and hate safari/Mac but I have not choice I must use Mac. (rant) ? (^doesnt happen on chrome though..) Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 13, 2018 Author Share Posted July 13, 2018 I still love Babylonjs though don't get me wrong, and everyones help on this site and the docs, are greatly appreciated. brianzinn 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 13, 2018 Author Share Posted July 13, 2018 Sorry Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2018 Share Posted July 13, 2018 Agree we can do better I fixed the doc: http://doc.babylonjs.com/extensions/gradient And here is a really simple example: https://www.babylonjs-playground.com/#2IFRKC#22 MyFault and DylanD 1 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 13, 2018 Share Posted July 13, 2018 (edited) it's a bug here is the working shader version: https://www.babylonjs-playground.com/#2IFRKC#26 Edited July 14, 2018 by Nabroski seems to be fixed DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 14, 2018 Author Share Posted July 14, 2018 18 hours ago, Deltakosh said: Agree we can do better I fixed the doc: http://doc.babylonjs.com/extensions/gradient And here is a really simple example: https://www.babylonjs-playground.com/#2IFRKC#22 Thank you! I very much appreciate this! Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 16, 2018 Author Share Posted July 16, 2018 So I have what I want working in the playground, but I can't seem to get that into my local code and I don't know why, I just update to 3.3.0 alpha.12 for just my gradient material, maybe I need to update my Babylonjs to 3.3.0alpha(current)? I don't know how good of an idea that is since it might break everything which would be really bad, so any ideas? Maybe il make a back up and then test the update... Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 16, 2018 Author Share Posted July 16, 2018 What I want is this https://www.babylonjs-playground.com/index.html#2IFRKC#27. (zoom out a bit) However when I have that in my code the .offset seems to only go from -1 to +1 instead of -15 to + 15, which is what I have in the playground. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 17, 2018 Share Posted July 17, 2018 not sure it works correctly on my pc : https://www.babylonjs-playground.com/index.html#2IFRKC#28 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 17, 2018 Share Posted July 17, 2018 This is not on npm yet (but should be there in a couple of days) Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 17, 2018 Author Share Posted July 17, 2018 1 hour ago, Deltakosh said: This is not on npm yet (but should be there in a couple of days) oh ok thanks! Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 20, 2018 Author Share Posted July 20, 2018 @Deltakosh I saw that the npm was updated yesterday . Do you know if it has been added to npm yet? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2018 Share Posted July 20, 2018 It has been added my dear! DylanD 1 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.