0
\$\begingroup\$

I'm experimenting with texture generation so I can begin to implement height map generation/terrain generation. Right now I'm just experimenting with different generating functions. Right now I'm just generating a 256x256 rgb texture when I apply the sin function to the sum of the normalized coordinates I get the following:

<x,y>/|<x.y>|

When I apply sin to the sum of the unnormalized coordinates I get the following:

<x,y>

Is there a way I can hit the whole of the sin domain multiple times while keeping the normalized coordinates so that there is the wave-like texture of the unnormalized version but it retains the smoothness from the normalized coordinates

\$\endgroup\$
4
  • \$\begingroup\$ Did you consider multiplying your sum by some number between 0 and 1 to reduce the frequency of the waves? \$\endgroup\$ Commented Sep 12, 2023 at 12:40
  • \$\begingroup\$ Yes, this was the first thing I tried, but unfortunately it didn't give me the effect I was looking for, it gave me more of the same as the normalized coordinates. @DMGregory \$\endgroup\$ Commented Sep 12, 2023 at 16:04
  • \$\begingroup\$ Did you try a bigger number? \$\endgroup\$ Commented Sep 12, 2023 at 17:03
  • \$\begingroup\$ I tried a whole range of numbers between from 0..1, things bigger than 1 just made the texture white \$\endgroup\$ Commented Sep 12, 2023 at 18:24

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.