#πŸ”’ perlin noise

378 messages Β· Page 1 of 1 (latest)

uncut shoal
#

hi so I'm trying my hand in perlin and for the most part it works perfectly but sometimes it'll have this weird and insane jumps which make the mountains look terrible

xpix = 3840

def noisegen(weight):
    wave = []
    noise1 = PerlinNoise(octaves=3)
    noise2 = PerlinNoise(octaves=6)
    noise3 = PerlinNoise(octaves=12)
    noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        scaled_val *= weight * 3.14159  # Scale to [0, 2*pi] range

        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])
        wave.append(sin_val)
        print(sin_val,scaled_val,round(scaled_val))
    return wave
wave3=noisegen(5)

and what it prints is

379 3.797148242731564 4
380 3.801569785571575 4
380 3.805958758643142 4
381 3.8103139327684117 4
381 3.8146341547567983 4
381 3.818918352702095 4
382 3.8231655413806434 4
382 3.827374827750552 4
383 3.831545416551955 4
383 3.8356766160083082 4
383 3.839767843628782 4
384 3.8438186321116414 4
384 3.8478286353487268 4
385 3.8517976345309455 4
385 3.855725544354846 4
385 3.8596124193302086 4
386 3.8634584601887205 4
386 3.867264020393657 4
387 3.8710296127506623 4
387 3.8747559161195397 4
387 3.878443782227103 4
388 3.8820942425810814 4
388 3.8857085154850783 4
388 3.889288013154568 4
389 3.8928343489339317 4
389 3.8963493446145843 4
389 3.8998350378540976 4
390 3.903293689696419 4
390 3.906727792193098 4
391 3.910140076125602 4
391 3.913533518828646 4
391 3.9169113521146026 4
392 3.9202770702989254 4
392 3.923634438326665 4
785 7.853975 8

just this weird huge jump to 8

vagrant geyserBOT
#

@uncut shoal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

fringe musk
#

tbh, this seems like an awfully narrow question that might be a better gitissue for the project

uncut shoal
#

I'm just have issue with the code I'm using to generate it

fringe musk
#

So waht's the issue? You get 785 for sin_val, sin_val comes from scaled_val, wchih is weight * pi which is derived from noise_val 1-4.

uncut shoal
#

yeah the jump is the issue

#

here I'll show you something

fringe musk
#

But the jump is just math?

uncut shoal
#

it's not meant to jump

#

I'm just not understandingwhy it is

uncut shoal
#

obviously it's not normal

fringe musk
#

Each iteration comes from ```py
noise_val = noise1([i / xpix])
noise_val += 0.5 * noise2([i / xpix])
noise_val += 0.25 * noise3([i / xpix])
noise_val += 0.125 * noise4([i / xpix])

uncut shoal
#

yeah

fringe musk
#

So, any jump would be due to the PerlinNoise implementation.

#

Which you ahven't shared?

uncut shoal
#

I did

#

from perlin_noise import PerlinNoise

fringe musk
#

Not in this thread?

uncut shoal
#

that's all it is

#

it's just a sin wave

uncut shoal
#

I think it's the scaling

#

I'm unsure why it's causing the issue

fringe musk
#

Well, there's two separate questions here:

#
  1. What perlinnoise library are you using?
fringe musk
#

Anyway...

#
  1. Print the noise_val so you can see what's going on
uncut shoal
fringe musk
#
  1. Print the results at each step of the calculation
uncut shoal
#

oh you want me to print it prior

#

sure

#

I printed the results

#

I get it now

#

want me to print the initial noise? or

fringe musk
#

Basic debugging: trust nothing and nobody

uncut shoal
#
noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])
        print(noise_val)

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        scaled_val *= weight * 3.14159  # Scale to [0, 2*pi] range
        print('scaled ',scaled_val)
        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])  
        print('sin ',sin_val)
        wave.append(sin_val)
#

where I'm gonna put them

#

ty for responding btw

fringe musk
#

So, instead of reusing the variables, use new variables for each step

#

Then you can just print the all at the end

uncut shoal
#

I just noticed it's already set up to do that

fringe musk
#

ie: ```py
scaled_val = (noise_val + 1) / 2 # Scale to [0, 1] range
scaled_val_weighted = weight * 3.14159 # Scale to [0, 2pi] range

uncut shoal
#
def noisegen(weight):
    wave = []
    noise1 = PerlinNoise(octaves=3)
    noise2 = PerlinNoise(octaves=6)
    noise3 = PerlinNoise(octaves=12)
    noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        scaled_val *= weight * 3.14159  # Scale to [0, 2*pi] range
        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])
        print('scaled', noise_val)
        print('scaled ',scaled_val)
        print('sin',sin_val)
        wave.append(sin_val)
    return wave
#

have to run it a few times

#

cause 99% of the time it's normal

#
scaled: 0.008294812152537077 scaled: 3.959561123637861 sin: 395
scaled: 0.007719518143530403 scaled: 3.957301951255667 sin: 395
scaled: 0.0071407864992006145 scaled: 3.9550292793225297 sin: 395
scaled: 0.006558765576547641 scaled: 3.9527436904345326 sin: 395
scaled: 0.005973620372598647 scaled: 3.95044583253294 sin: 395
scaled: 0.005385533241903769 scaled: 3.9481364217217902 sin: 394
scaled: 0.004794704625275592 scaled: 3.9458162451296497 sin: 394
scaled: 0.00420135378975644 scaled: 3.9434861638154515 sin: 394
scaled: 0.0036057195798268604 scaled: 3.9411471157184854 sin: 394
scaled: 0.0030080611798436524 scaled: 3.9388001186524817 sin: 393
scaled: 0.0024086588877185533 scaled: 3.936446273343835 sin: 393
scaled: 0.0018078148998263224 scaled: 3.934086766513932 sin: 393
scaled: 0.0012058541071551523 scaled: 3.931722874005622 sin: 393
scaled: 0.0006031249026836809 scaled: 3.9293559639537774 sin: 392
scaled: 0.0 scaled: 7.853975 sin: 785
scaled: 8.972264650911905e-05 scaled: 7.854679679422616 sin: 785
scaled: 0.00017971153469939293 scaled: 7.85538644990074 sin: 785
#

@fringe musk

#

I made an error put scaled twice but the first one is actually the noise val

#

just typo'd is all

#

as you can see

#

ok I think I get it?

#
scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range```
#

from this line it becomes 0.5

#
scaled_val *= weight * 3.14159  # Scale to [0, 2*pi] range

#

and from here multiplied right?

#

yep

#

I have the weight set to 5

uncut shoal
#

I'm confused on how it drops though

#

scaled: -0.00039320445645412853 scaled: 7.8508867820291215 sin: 785
scaled: 0.0 scaled: 3.14159 sin: 314
scaled: 4.397580601435668e-05 scaled: 3.1417281539524167 sin: 314
scaled: 8.636259696560768e-05 scaled: 3.141861315871001 sin: 314
scaled: 0.00012562288440011167 scaled: 3.141984655597403 sin: 314```
#

this is where it drops

#

and you can see it drops to pi

fringe musk
#

What's weight?

uncut shoal
#

just how much it's multiplied

fringe musk
#

Oh, you said, 5

uncut shoal
#

it's set to 5

#

ye

#

what do you think?

fringe musk
#

Paste yuour current code plz

uncut shoal
#
xpix = 3840
def noisegen(weight):
    wave = []
    noise1 = PerlinNoise(octaves=3)
    noise2 = PerlinNoise(octaves=6)
    noise3 = PerlinNoise(octaves=12)
    noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        scaled_val *= weight * 3.14159  # Scale to [0, 2*pi] range
        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])
        print('noise:', noise_val,'scaled:',scaled_val,'sin:',sin_val)
        wave.append(sin_val)
    return wave
# Repeat the values for each y level```
#

wave3=noisegen(5)

fringe musk
#

Well, something doesn't make sense here: ```py
weight = 5
pi = 3.14159

noise_val = -0.00039320445645412853
scaled_val = ((noise_val + 1) / 2) * (weight * pi)
print(scaled_val)

noise_val = 0.00012562288440011167
scaled_val = ((noise_val + 1) / 2) * (weight * pi)
print(scaled_val)

uncut shoal
#

wdym?

fringe musk
#
7.8508867820291215
7.854961638993507
#

Your last example was: scaled: 0.00012562288440011167 scaled: 3.141984655597403 sin: 314

#

But for 0.00012562288440011167, you should have gotten 785

uncut shoal
#

ah

#

man this is so confusing

fringe musk
#

I'm going to guess that this isn't the code that's running

#

Are you running in a jupyter notebook?

uncut shoal
#

no

#

cmd

fringe musk
#

Rename the function and run it again

#

Make sure this is actually the code being used.

uncut shoal
#

I'm positive

#

but sure

#

what will renaming change?

fringe musk
#

Like, sometimes people think they're running A, but they're really running an old version of A

uncut shoal
#

oh I don't have anything like this

#
  • this one draws mountains on my screen
#

but ye I'll change it to billy bob

fringe musk
#

My point is: all your noise_vals are approximately 0. Therefore, the scaled should be approximately 2pi the same val

uncut shoal
#

same frustating code

light fractal
#

shouldnt it be 5*pi/2 ?

uncut shoal
#

I'll try

#

I probably did get it wrong

#

I hope to god I did

fringe musk
#

Yah, I'm just saying, they should all be 7.85... : ```py
weight = 5
pi = 3.14159

noise_val = -0.00039320445645412853
scaled_val = ((noise_val + 1) / 2) * (weight * pi)
print(scaled_val)

noise_val = 0.008294812152537077
scaled_val = ((noise_val + 1) / 2) * (weight * pi)
print(scaled_val)

light fractal
#

Like you said, noiseval is around 0, so you get 1/2 * 5 * pi

uncut shoal
#

thank you!

#

πŸ™

uncut shoal
fringe musk
#

(I'm confused, what worked?)

uncut shoal
#

works perfectly now

uncut shoal
light fractal
#

Never, I dont even know what it is.
But also, I’m not sure if what you did worked? Because what I said there is just what your code Should output with the provided math

uncut shoal
#

oh

#

weirdly enough it worked

fringe musk
uncut shoal
#

yeah that's what I thought

light fractal
uncut shoal
#

but I thought I Was just being dumb

#

but weirdly just changing the order

#

fixed it

fringe musk
#

The only explanation I can think of is somehow you wre modifying weight. But your code didn't. So, I'm stumped.

light fractal
#

So whats your code now?

uncut shoal
#

maybe it has to do with decimals being less accurate? but I've only read about that never looked into it

uncut shoal
# light fractal So whats your code now?
def noisegen(weight):
    wave = []
    noise1 = PerlinNoise(octaves=3)
    noise2 = PerlinNoise(octaves=6)
    noise3 = PerlinNoise(octaves=12)
    noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        scaled_val *= 5 * 3.14159/2  # Scale to [0, 2*pi] range
        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])
        print('noise:', noise_val,'scaled:',scaled_val,'sin:',sin_val)
        wave.append(sin_val)
    return wave```
#

same I just changed the order like how you typed it

uncut shoal
#

I even checked the references for the weight

#

only came up twice ofc

#

in the def and the call

#

I genuinely have no idea why it wasn't working before

#

or why it's working now

fringe musk
light fractal
uncut shoal
#

wdym?

uncut shoal
#

do you ever get the error

#

well bug ig

uncut shoal
#

maybe if it goes over the last print by 2 have it quit so you can read the outputs

fringe musk
uncut shoal
#

no worries

#

gn man

nova laurel
#

tbh int(str(sin_val).replace('.', '')[:3]) is the part i'm most suspicious of even though i can't actually see how it could plausibly be breaking anything

uncut shoal
#

so if it became 10.2xxxxxx

#

it'd drop to 102

light fractal
#

You want to scale to 2pi, but also you get answers of 7+, so something is going wrong there still?

uncut shoal
#

that's easy to gix tho

nova laurel
#

or if it became too small and ended up stringifying as like, 1.23e-5

uncut shoal
#

wdym

#

can you give an example?

nova laurel
#

well, 1.23e-5

#

!e py print(0.0000123)

vagrant geyserBOT
#

@nova laurel :white_check_mark: Your 3.12 eval job has completed with return code 0.

1.23e-05
uncut shoal
#

ah

light fractal
#

At least they are using it on scaled_val, not on the noise value

nova laurel
#

so you'd get 123 even though that number is basically zero

uncut shoal
#

I don't think it'll gen that low

nova laurel
#

yeah also the problem is already happening by scaled_val which is before that step happens

#

it just stands out as the one step that has these kinds of bizarre edge cases

light fractal
#

noise: 1 scaled: 7.853975 sin: 785
2*pi == 6.28318

nova laurel
#

where something like math.floor(sin_val * 100) is just entirely mathematical

uncut shoal
#

tbh I'm just lost

nova laurel
#

because the code says 5*pi/2

uncut shoal
#

is this my issue?

nova laurel
#

it's one of the issues

#

it doesn't explain why it would suddenly jump, because what this should be doing is just make all of the values a bit bigger than they should be

light fractal
light fractal
#

Maybe I worded it wrong. But that was what the code was doing.

uncut shoal
#

ah ok I see now

#

this problem has just been melting my brain

#

been on it for hours taking breaks out of boredom

nova laurel
#

i think the answer is to print more things

uncut shoal
#

can do

nova laurel
#

or wait hang on what even is the problem at this point

uncut shoal
#

the sudden jumps

light fractal
#

What do you get when you run that function now with the prints?

uncut shoal
#

with how you typed it?

#

or still originally

light fractal
#

I guess whatever is latest πŸ˜›

nova laurel
#

whichever one is giving the sudden jumps that we're trying to debug i guess?

light fractal
#

So maybe original code

uncut shoal
#

alr

#

let me add prints

#

should I add a ton of prints

#

or just on the scaled stuff

nova laurel
#

after every line of code print every variable

#

that's obviously excessive but also this obviously shouldn't be happening so being excessive seems like the right thing to do

light fractal
#

I;m struggling to understand the weights though, but maybe that's because I lack the Perlin knowledge.
What needs to be weighted?

uncut shoal
#

just scaling it

#

why I called it scaled_val

#

for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val1 = noise_val + 0.5 * noise2([i / xpix])
        noise_val2 = noise_val1+ 0.25 * noise3([i / xpix])
        noise_val3 = noise_val2 + 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val3 + 1) / 2  # Scale to [0, 1] range
        scaled_val1 = scaled_val * weight * 3.14159  # Scale to [0, 2*pi] range
        sin_val =scaled_val1
        sin_val=int(str(sin_val).replace('.', '')[:3])
        wave.append(sin_val)
        print('noises[0:-3:', noise_val, noise_val1, noise_val2, noise_val3,'scaled:',scaled_val,scaled_val1,'sin:',sin_val)```
#

what I got

#

looks good to me

nova laurel
#

yeah that works, let's see what that does

uncut shoal
#

noises[0:-3: 0.11742809378626616 0.2638681818661029 0.26898524854381795 0.2758605071617961 scaled: 0.637930253580898 10.020576526736066 sin: 100
noises[0:-3: 0.11676051419686566 0.26226095997681936 0.2672570377684315 0.273480429989178 scaled: 0.636740214994589 10.001883460124253 sin: 100
noises[0:-3: 0.1160923865380333 0.2606512657577249 0.2655253848865476 0.2711036254845698 scaled: 0.6355518127422849 9.983216096965174 sin: 998
noises[0:-3: 0.11542371819203597 0.25903917408761507 0.2637904059220572 0.26872992484472313 scaled: 0.6343649624223615 9.964573111482332 sin: 996```
#

oh lol did the thing I just talked about

uncut shoal
#

right it just did this right?

nova laurel
#

yep

light fractal
#

It shouldnt get more than 6.28 though?

uncut shoal
#

no I think it can climb this high

#

it's just rare

light fractal
#

Sure, but then it's not scaled to 2pi

uncut shoal
#

Γ­f I lower the weight it won't get that high but I don't think this is the issue of the normal climbing

#

this should be an easy fix tho

#

and we can look at the real climb bug

light fractal
#

Then for the last part I would do the round(val*100) to get around this issue. (what bee said earlier)

uncut shoal
#
        if sin_val<10:
            sin_val=int(str(sin_val).replace('.', '')[:3])

        else:
            sin_val=int(str(sin_val).replace('.', '')[:4])```
#

this a good fix?

#

wait what am I doing

#

I don't don't need to string it to see if it's <10

light fractal
#

!e

vals = [10.001883460124253, 9.964573111482332]
for val in vals:
    print(round(val*100))
vagrant geyserBOT
#

@light fractal :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 1000
002 | 996
uncut shoal
#

ah

#

interesting

#

ok I can try that

light fractal
uncut shoal
#

I think all brokeness stopped

#

but bees solution looks better

#

yeah no longer broken

nova laurel
#

ok that is... really confusing because why was it broken earlier

uncut shoal
#

Β―_(ツ)_/Β―

nova laurel
#

like when it was jumping from 300 to 700 or whatever i don't think that was a power of 10 thing

light fractal
#

Agreed.

uncut shoal
#

it wasn't

#

that's why I said that this wasn't the issue earlier

#

like I pointed this out that it'll be a problem if the number goes over 9

#

man

#

I'm so lost

light fractal
# uncut shoal

This as soon as anything negative, it's 1.25 pi, other wise it's 2.5pi

uncut shoal
#

neg numbers are fine

#

it's how sin waves are

#

gonna try the rounding now

#

I was just still running it a lot to make sure it wasn't a fluke

nova laurel
# uncut shoal

what if you run this code, but add print(scaled_val) after the scaled_val = (noise_val + 1) / 2?

#

since the issue is clearly somewhere around there

uncut shoal
#

sure

light fractal
#

that would be around 0.5 no?

uncut shoal
#

I believe lower

#

but ye

light fractal
#

well, noise_val == close to 0.
so 0.9 through 1.1 /2 will be 0.5

nova laurel
#

i mean given that the output makes no sense, no it's probably going to be like 7 or something

uncut shoal
#

you're right

nova laurel
#

ok are we sure that the weight is actually a number?

uncut shoal
#
def noisegen(weight):
    wave = []
    noise1 = PerlinNoise(octaves=3)
    noise2 = PerlinNoise(octaves=6)
    noise3 = PerlinNoise(octaves=12)
    noise4 = PerlinNoise(octaves=24)
    for i in range(xpix):
        noise_val = noise1([i / xpix])
        noise_val += 0.5 * noise2([i / xpix])
        noise_val += 0.25 * noise3([i / xpix])
        noise_val += 0.125 * noise4([i / xpix])

        # Scale the noise value to fit within the range of a sine wave
        scaled_val = (noise_val + 1) / 2  # Scale to [0, 1] range
        print(scaled_val)
        scaled_val1 = scaled_val* weight * 3.14159  # Scale to [0, 2*pi] range
        sin_val =scaled_val
        sin_val=int(str(sin_val).replace('.', '')[:3])
        wave.append(sin_val)
    return wave```
#

this all good?

nova laurel
#

actually print the weight too

uncut shoal
#

it'll always be 5 but sure

nova laurel
#

in the same place as the print(scaled_val)

uncut shoal
#

gotcha

nova laurel
#

and also print type(weight)

uncut shoal
#

woah

#

wait hold on I think I have the code wrong

nova laurel
#

(brb)

#

(back)

uncut shoal
#

perfect

#

ready?

nova laurel
#

...for what

light fractal
#

show us!

uncut shoal
#

I gotcha

#
935 5 <class 'int'>
0.5002441943924367 5 <class 'int'>
0.5001632277489836 5 <class 'int'>
0.5000817493727714 5 <class 'int'>
0.5 2 <class 'int'>
0.4999559243312672 2 <class 'int'>
0.4999112136241481 2 <class 'int'>```
#

how did it change

#

I'm not sure where in the print this happened

#

since I didn't print the sin

#

how did weight change

#

this is how I called the noisegen func

#

the only references

#

I'm actually confused

#

I gotta do this and print sin now

#

am I just stupid?

#

I feel like I'm going crazy

light fractal
#

Are you calling this function multiple times?

uncut shoal
#

nope

#

just once

light fractal
#

also, scaled_val1 went from 935 to 0.5?

uncut shoal
#
0.5000639389404649 2.5 <class 'float'> 392
0.5000319618335546 2.5 <class 'float'> 392
0.5 5 <class 'int'> 785
0.4994002905956486 5 <class 'int'> 784
0.49879998658691044 5 <class 'int'> 783```
uncut shoal
light fractal
#

okay gotcha

uncut shoal
#

ye

#

just the last 3 digits of a number

nova laurel
#

ok well we know now what the issue is, it's that the weight is changing

#

so now you add print(weight) after every line to see which line changed it

uncut shoal
#

but how

light fractal
#

How is weight changing inside this function though?

uncut shoal
#

ok

nova laurel
#

don't think about it just add more prints

light fractal
#

xD

uncut shoal
#

dude

#

you have no idea

nova laurel
#

the answer to how it should have happened is that it shouldn't be happening, so thinking isn't going to solve this problem

uncut shoal
#

how relieved I'm not the only one stumped

nova laurel
#

(i'm not a dude btw)

uncut shoal
#

I thought I was an ape for 5 hours striaght

light fractal
nova laurel
#

oh wait the obvious thing

uncut shoal
#

?

nova laurel
#

you think this function is only called once, but clearly nothing can be trusted

#

add a print as its first line to see if it actually gets called multiple times

light fractal
#

That's what im thinking. I dont see how weight can change in this function.

#

But like you said, trust noone lol.

uncut shoal
#

ah good call

#

ah wait

#

it was getting called other times

#

but

#
for x in range(0, 3840, 2):

    pygame.draw.rect(background_surface, (51, 51, 51), (x, (wave3[x]), 2, 1000))```
#

this is the draw

#

there's still a weird jump

#

and after removing all the calls to it still happens

#

but now it might not be the weight

nova laurel
#

...removing all the calls? as in the function is now not called at all?

uncut shoal
#

just by wave3

nova laurel
#

so now it's only called once?

uncut shoal
#

yeah

#

I'm guessing now

light fractal
#

Can we zoom out a bit and see more of the file?

uncut shoal
#

it's probably the digit going over 10 and the other calls just hid it

#

sure

#

oh I can't zoom out

light fractal
#

You can take a bigger screenshot? πŸ˜›

uncut shoal
#

only 2 results

#

and bigger sc

light fractal
#

print weight lol x

uncut shoal
#

lmao

#

the issue has to be it going over 10 right?

#

and it was just getting lost cause of the other calls to noisegen

light fractal
#

It will be with that str() method yes

#

So the weight you want to use to increase the value of the noise created right?

uncut shoal
#

yeah it just makes it more speratic

#

lower for more planes

#

higher four more mountains n stuff

light fractal
#

Don't you want something like this then?

    scaled_val = (noise_val*weight + 1) / 2  # Scale to [0, 1] range
    # print(scaled_val)
    scaled_val *= 2 * pi
uncut shoal
#

looks a bit wonk

#

ngl

light fractal
#

little wonk indeed πŸ˜›

uncut shoal
#

but ye fixing the thing from going over 10 fixed everything

#

thanks guys

#

I was just a bit wonk

#

and forgot I was calling it a few times

light fractal
#

10 > 2*pi

uncut shoal
#

so the issue got burried

#

time to add snow

#

and shading

#

and more mountains in the foreground

#

and I got a decent animatd wallpaper

#

yeah?

light fractal
#

Nice πŸ™‚

uncut shoal
#

sweet

#

gonna close this make it look nicer

#

cya guys

light fractal
#

good luck!

uncut shoal
#

ty for the help

#

!close

vagrant geyserBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.