Recommended Posts

I was inspired by this topic to produce a bezier surface. The surface is not a mesh but a logical object that contains the data from which you can build the mesh using a ribbon.

I restricted myself to a bicubic surface. Over the next weeks I will add some other methods and who know perhaps try to write a typescript version and PR it.

This PG animates the surface by changing the control points, https://www.babylonjs-playground.com/#KT9EE7#1

In this PG you can move the control points (purple spheres) in the direction of the chosen axis. Click on a control to move the axes to that control, click on a cone to set the axis along which you move  the control ( done by giving mesh behaviours a go) then drag the control https://www.babylonjs-playground.com/#KT9EE7#2

Work still in progress. have fun.

 

Share this post


Link to post
Share on other sites
1 hour ago, NasimiAsl said:

** move in z direction not worked for me

Had a look and it seems to depend on viewing angle whether an axis works or not. I expect it has something to do with my incomplete understanding of using dragBehaviors

After further reading and digesting what it said I have simplified the PG https://www.babylonjs-playground.com/#KT9EE7#3

NOTE: In new PG since no axis or plane is defined then ` Dragging will occur along the plane facing the camera `.

Thank you for spurring me on to check again.

Share this post


Link to post
Share on other sites
53 minutes ago, Arte said:

Spheres not selectable If points underneath the mesh.`

If you change camera view so that mesh not in front of them you can select again. First time with dragging behavior. Probably much better ways to interact with controls but wanted to give new methods a go and get a quick demo up and running. Any improvements welcome.

Working on multi surfaces at the moment.

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

  • Recently Browsing   0 members

    No registered users viewing this page.