Sign in to follow this  
DylanD

How do I actually use gradients

Recommended Posts

Hello again everyone, :D

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?

Share this post


Link to post
Share on other sites
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..)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.