UE4: the basics of Rotate About Axis

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 37

  • @rq146
    @rq146  7 років тому +1

    Mistakes:
    At 0:56 I misspoke about the reason for normalizing the axis. Using the magnitude of the axis would not be a substitute for inputting the rotation angle, it'll just give you artifacts and unwanted offset.
    Around 2:20 I explain deriving the X vector of the mesh from world up and the normal of the plane. It's much simpler to just transform (1, 0, 0) from local to world to get the same result. This can be used to get you any direction relative to the orientation of the mesh and won't limit you to having perfectly flat planes.
    At 2:41 I meant to say "Vertex Normal" and at 9:48 I say "angle" repeatedly when I meant to say "axis."

    • @pedrogonzalezm.2609
      @pedrogonzalezm.2609 6 років тому

      hi! everything Works ok for me until I try to interact with the bp on screen… any possibilities? I linked everything_ Meanwhile Im using the unreal visual studio. Could this be the reason?

    • @rq146
      @rq146  6 років тому

      Hey, sorry for the late reply. I was never notified of this comment.
      I don't see why that would be an issue. I compiled UE4 with Visual Studio all through college and was even doing this kind of thing on that project.
      Do you have any more details?
      Is it possible you hooked this up in the event graph instead of the construction script?

  • @Soaring_Penguin
    @Soaring_Penguin 3 роки тому

    THANK YOU SO MUCH! I'm a hopeless noob and I've been trying to use World Position Offset to make a simple fish swimming loop and butterfly flying loop. Finally made some progress with the fish thanks to this.

  • @augustinchauveau6787
    @augustinchauveau6787 Рік тому

    this is great, thanks for this awesome learning material ! you've won a subscriber !

  • @adriandelgadodelsol4461
    @adriandelgadodelsol4461 3 роки тому

    Thanks for this! Awesome tutorial

  • @CorporalDanLives
    @CorporalDanLives 6 років тому

    Oh oh oh oh oh thank you! This was the missing link in getting really nice foliage in my game.

  • @ZlotyChannel
    @ZlotyChannel 6 років тому +1

    Great tutorial!

  • @OsLivrosDoOdenir
    @OsLivrosDoOdenir 5 років тому

    Wow!!! Great tutorial! Thank you!!!

  • @Fafmagic
    @Fafmagic 3 роки тому

    So useful!

  • @MichaelKlimenko
    @MichaelKlimenko 5 років тому

    Thanks
    Very useful info

  • @jamesc8377
    @jamesc8377 4 роки тому

    Very helpful, thanks!

  • @hengxingzhang7415
    @hengxingzhang7415 Рік тому

    perfect

  • @PiPiCatStudio
    @PiPiCatStudio 3 роки тому

    nice tut!!! will you continue make tuts?

  • @UnrealTefel
    @UnrealTefel 4 роки тому

    Hey Ryan, inspiring video, have you ever tried with rotating mesh around 2-3 exes at the same time?

    • @rq146
      @rq146  4 роки тому +1

      Yes, I have. For example, a pendulum that is twisting, but also swinging on one or both of the other axes.
      You will notice if you use extreme values with something like this that the mesh will shear.
      The trick is to take the output of the first RotateAboutAxis and add it the the Absolute World Position of the next RotateAboutAxis. (and the output of the 2nd added to the AWP of the third)
      I have been meaning to make a followup video covering things like this but unfortunately I never got around to it.

    • @UnrealTefel
      @UnrealTefel 4 роки тому

      @@rq146 Thanks. I've already figure it out using Rotation Matrix en.wikipedia.org/wiki/Rotation_matrix. I am able to rotate all 3 axes and also correct normals.

    • @UnrealTefel
      @UnrealTefel 4 роки тому

      Ok now I am really stuck, so I have all shaders animations and shader movement working fine, but now I want to add shaders animation to a mix.
      For Shader animation offset is simple like adding another World Displacement to it. For rotation of already animated vertices I got pretty ugly results. Not sure how I can rotate all vertices (existing WPO) around pivot.

    • @UnrealTefel
      @UnrealTefel 4 роки тому

      For example I want to rotate this media.discordapp.net/attachments/221799195806400512/590715363419881472/unknown.png
      How would you approach to combine it with RotateAboutAxis? Thanks in advance.

    • @rq146
      @rq146  4 роки тому +1

      ​@@UnrealTefel If you're trying to stack offsets, you'd have to add the previous offset to the Absolute World Position as I mentioned previously.
      Or are you asking about also correcting the normals afterwards using the custom UVs? I don't know off-hand what the custom UV outputs are doing in this function. I've never used the Max Script. All I can tell at a glance is that it's decoding some info in a texture but I am not sure how that info is used by the two custom UV channels.
      Looks like it does output the vertex normals in tangent space, so maybe you could work with that.
      However the description of this node says the following:
      "Also, one mustn't use vertex normal in their base shader when applying this technique. The vertex normals do not get updated and therefore that node will produce incorrect results.
      "
      Sorry that I don't have more complete knowledge of this. Might be worth trying to post on the UE4 AnswerHub for more help.

  • @juliette5192
    @juliette5192 3 роки тому

    Thanks so much for sharing those usefull tips. I tried it to get an object swinging and it works the movement correctly but it is deforming the mesh, would u have any idea why is it working badly??

    • @rq146
      @rq146  3 роки тому

      Yes, I know exactly what you're talking about! I was going to make a video on that at some point.
      Let's say the Z axis is going down the length of the object. I assume you're trying to swing it on one axis, Y for example, but also spin it on Z at the same time.
      What you want to do to fix this is take the Output from your first rotator and Add it to the Absolute World Position of your second rotator.
      If that's not what you're trying to do, or you need more clarification let me know.

  • @LaMiteCreative
    @LaMiteCreative 7 років тому

    thx very good tuto

  • @marcelocosta7893
    @marcelocosta7893 6 років тому

    incredible, can you show me a way to make a ball stretch a net when it collides?

    • @rq146
      @rq146  6 років тому +1

      Thanks!
      Possibly. How realistic does it need to be?
      You can try adding that blueprint position to your ball and driving a soft Sphere Mask with that to push the net.
      But if you need it to look more sophisticated you'd likely want to try a physics solution (which I'm not very experienced with).

    • @marcelocosta7893
      @marcelocosta7893 6 років тому

      @@rq146 I already have the physics of the net, when the ball collides with the net, it rocks
      but the collision accuracy is not perfect, I'm trying to increment this system of physics in the material of the network,
      I'm going to try, but if I do not succeed you would be able to charge how much to do a simple project of a ball stretching the net?

    • @rq146
      @rq146  6 років тому +1

      I won't have access to my desktop for a few more days.
      I can try to cook up something really basic when I get home though.
      But what I have in mind would likely be a perfectly taut net which would stretch unrealistically.
      If that kind of result is not what you're going for (i.e. you want a loose net to move naturally) then WPO is probably not the solution for you.
      I think physics and WPO probably won't work well together either, it'd have to be one or the other.

    • @marcelocosta7893
      @marcelocosta7893 6 років тому

      @@rq146 I was able to use APEX on my network along with the material physics, I see that you know how to work very well with the material and blueprint nodes, so if you join the two disguises I believe I can reach a perfection in network simulation, How can I contact you? where?

    • @rq146
      @rq146  6 років тому

      I checked your channel. This seems to be for a soccer game. That might work since those nets usually appear to be taut.
      I will message you with my contact info privately.

  • @marcelocosta7893
    @marcelocosta7893 6 років тому

    Hello, How can I contact you?

    • @rq146
      @rq146  6 років тому

      Oh, my apologies, I never saw your last reply 3 weeks ago.
      Skype is the only thing I have out of all of those options you mentioned.

    • @marcelocosta7893
      @marcelocosta7893 6 років тому

      @@rq146 my skype is it "strongbullrj" email mc_marcelo_@hotmail.com