darcome Posted March 16, 2015 Share Posted March 16, 2015 Hello everyone, in this link,http://nissan-stagejuk3d.com/ if you launch the application and then try to change the color of the juke, there is a "wave" effect... How can you obtain it with babylonjs? Thanks in advance for your precious help! Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted March 16, 2015 Share Posted March 16, 2015 Wow it's cool ! I think it is modifying the geometry of the mesh. Maybe it is possible using a single material where the vertex shader modifies the geometry according to a function (function that looks like exponential until a max value where the animation is stopped).I cannot say more Quote Link to comment Share on other sites More sharing options...
darcome Posted March 17, 2015 Author Share Posted March 17, 2015 Maybe it could be done with the help of the wave effect of hte pixel and vertex shader like in the CYOS playground? Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted March 17, 2015 Share Posted March 17, 2015 I think it can indeed.But you have to find a function that computes the wave transformation in function of time and in a particular interval. Because the CYOS example is constant Quote Link to comment Share on other sites More sharing options...
darcome Posted March 17, 2015 Author Share Posted March 17, 2015 I think it could be possible set an interval, for example, 1 second, and then put back the normal shader. The problem is that I don't know how to make the effect begin for example start from the back of the car and then propagate to the front of the car Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted March 17, 2015 Share Posted March 17, 2015 I think the wave effect should be computed using the current vertex position on x or z (not y because y is the height) in function of the time. Or a gaussian moving in function of time 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.