Lets Build Community

Lets Build is a community of 163 amazing members

We're a place where indie game developers to connect with one another to share ideas, ask for help and teach each other.

Create new account Log in
loading...
Cover image for Pivot Transformation

Pivot Transformation

sketchpunk profile image SketchPunk Updated on ・1 min read

Read a medium post by @IRCSS and thought to give it a try but instead of dealing with a bunch of matrices, how about just a pivot position and quaternion rotation. Its pretty easy to implement, the secret sauce is that you need to lerp between to original world space vertex and its new rotated position to get that nice arc.

[Demo]
https://sketchpunk.bitbucket.io/src/fungi_v5/006_pivot_transform.html

[Source]
https://bitbucket.org/sketchpunk/sketchpunk.bitbucket.io/src/master/src/fungi_v5/006_pivot_transform.html

[Related Links]
https://twitter.com/IRCSS/status/1226253364662501377

https://medium.com/@shahriyarshahrabi/look-at-transformation-matrix-in-vertex-shader-81dab5f4fc4

https://github.com/IRCSS/Look-At-Transformation-Matrix

Discussion

pic
Editor guide
Collapse
cpluta profile image
Chris Pluta

How do you check the source? Just check it in the browser or is there another way?

Also do you mind linking to the article as well? I can conceptualize how this works with lerp and changing the position, but how does it work with matrices?

Edit: This is a really cool concept!

Collapse
sketchpunk profile image
SketchPunk Author

There you go. Updated the post with direct link to source plus the related links.

Collapse
cpluta profile image
Chris Pluta

Thanks for updating the links.

What's your background, is it as an artist or programmer? What did you use to learn webgl?

Thread Thread
sketchpunk profile image
SketchPunk Author

I'm kinda both, an artist and a programmer. I like to draw, i tend to always have a sketchbook on me. My day job is as a software engineer, but I tend to make boring software for my day job.

I learned WebGL in the beginning from tutorials online and by dissecting code then rewrite it my own way once I understand how things work. Just kept at it since its the perfect union of Art and Programming.

Thread Thread
cpluta profile image
Chris Pluta

It really shows and I'm really digging the content your putting together!