Square direction

DschoonmakerDschoonmaker Posts: 260Member
in 3D

Using built in distance and direction functions, I get a circular pattern(I'm making a terrain mesh). That makes sense, but I need square distance and square direction functions for my square terrain.

To make the square distance function, I get the distance between point A and point B on each axis, then return the greatest axis distance. That works, but I can't figure out how to make the direction function. Do you know how to make a square direction function?

Answers

  • MegalomaniakMegalomaniak Posts: 2,785Admin

    only ever turn by 90 degree angles?

  • SIsilicon28SIsilicon28 Posts: 749Moderator

    What part of terrain generation would require a "square direction"?

  • DschoonmakerDschoonmaker Posts: 260Member

    I'm trying to make a grid mesh with LOD. If I multiply some vertices' positions, I get a gap between levels of detail. If I move the vertices in a little with a normal direction function, the grid gets "bent":

    Maybe there's a different way to move vertices in, but I think a "square" direction function would work.

  • SIsilicon28SIsilicon28 Posts: 749Moderator

    Can I see what it looks like without the normal transformation?

  • DschoonmakerDschoonmaker Posts: 260Member

  • SIsilicon28SIsilicon28 Posts: 749Moderator
    edited July 14

    I think simply uniformally multiplying those vertices' positions would do fine. Have you tried to scale them by √2 instead?

  • DschoonmakerDschoonmaker Posts: 260Member

    Which part should be multiplied by √2? Right now I multiply inner vertices by 0.5, should the √2 come before that, or after, or should it be applied to only some vertices? I tried moving the √2 to a few different places, but nothing I tried worked.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file