All Questions

Community

Daniel Queiroz Porto

Couldn't see any difference at the end of the tutorial

After I finished all the steps in the tutorial, there were no perspective deformation to be seen.

I found it odd, but kind of makes sense doesn't it?

I mean if multiplying it by the identity transform gives back our points initial coordinate, then doing:

  vec3 projection = vec3(UV, 1.0) * transform;
  vec2 uv = projection.xy / projection.z;

Without making any changes to the uniform transform will keep things just as they were, right? And since our transform is identity at this point, projection.z will be equal to 1 as well, so it won't change anything as well, I imagine.

But I didn't know how to change the uniform transform to reproduce the perspective effect, and messing with the values I could see clear changes but none in the direction I wanted, so I went to explore the demo in the project source to see how you were changing it in the final product.

I think it would be nice to have a paragraph or something giving some directions for us to experiment or, if that's coming in the next part (haven't read it yet) maybe not finish this one with an image with perspective applied, and just say we will learn how to manipulate it later?

If I should have seen a perspective effect even before messing around with the transform uniform values, than there's something wrong in my code and you can disregard this comment haha.

  • Nathan Lovato replied

    You have to change the matrix, yes. I can write a note to share my values.

    I think the tutorial mentions that the matrix we use is like the one used in the perspective tool in Gimp. You can use Gimp to interactively set the perspective projection you want and copy the values from the matrix it gives you.

    My values are

    1 0.2 0

    0 1.8 0

    0 0.5 1

  • Nathan Lovato replied

    Actually, I could make a short video to show the ways in which the values interact, I think it won't be too clear with text.

    I'm preparing our next Kickstarter, launching in 10 days, so note I might not do that in a timely fashion.

  • Daniel Queiroz Porto replied

    No problem, this was more of a feedback with my impressions than a problem in itself. When I finished the tutorial and noticed no change the first thing I did was to explore the source code of the course, and it was how I noticed I really had to change the transform matrix.

    I guess the only thing I felt was missing in the tutorial itself, was a more explicit cue to play around with the tranform matrix.

    Maybe just changing the last line from "And with that, we have water in perspective." to something like:

    "Now you are ready to modify the values of the transform matrix in the editor and whatch the changes in the water perspective! Try it out and see if you can get some results you like. My values for the picture below are:

    1 0.2 0

    0 1.8 0

    0 0.5 1"

    By the way, I'm super curious for the next kickstarter and can't wait for it!