Jump to content
Arthur Spooner

No Noise on vector

Recommended Posts

@t = @ptnum;
f@lop = @t*=6;
v@tgh = @P;
float noise(@tgh);

I'd like to know why the vector @tgh isn't have noise applied ? I know I'm doing something awkward ! :unsure:

Edited by Arthur Spooner

Share this post


Link to post
Share on other sites

The noise() function returns a value, it does not modify the argument. So if you want to modify the tgh vector:

 

@tgh = noise(@tgh);

 

Share this post


Link to post
Share on other sites
4 hours ago, haggi said:

The noise() function returns a value, it does not modify the argument. So if you want to modify the tgh vector:

 


@tgh = noise(@tgh);

 

That code didn't work; no noise was applied to the grid ?

Share this post


Link to post
Share on other sites

@tgh is not your position attribute.

you gave it the position values but it's not link to your position attribute.

you will have to set your new position values

@P = noise(@tgh);

I know I already told you this, but based on your questions, I highly recommend you to take some introduction courses. It will help you a lot.

You can find courses on coursera or any other website

https://www.coursera.org/courses/?languages=en&query=introduction%20to%20programming

you will see, once you will understand those basic operations, it will make it much easier for you.

Share this post


Link to post
Share on other sites
3 hours ago, holycause said:

I know I already told you this, but based on your questions, I highly recommend you to take some introduction courses. It will help you a lot.

You can find courses on coursera or any other website

https://www.coursera.org/courses/?languages=en&query=introduction%20to%20programming

you will see, once you will understand those basic operations, it will make it much easier for you.

I've taken introduction courses, I just have to do a little when time permits until I understand, it will be tedious; unless you know of any courses which can fast track ?

 

Ohh I set the the attribute, then I have to get it and set it on the point position :mellow:

Edited by Arthur Spooner

Share this post


Link to post
Share on other sites
f@apl = ch("noise");

This works, but it doesn't change the noise, the values for @apl change but there all the same value when they change ?

I did another code adjustment trying to get it to work;

@P.y = ch("noise",noise(@tgh));

In this case, my grid moves but the noise is not applied ?

Edited by Arthur Spooner

Share this post


Link to post
Share on other sites

I suppose you have a parameter added to the pointwrangle node called "noise" and you want to use it as a multiplier for the general noise?

Then you can read the parameter:

float noiseMultiplier = ch("noise");

Then you can calculate the noise itself:

vector noiseVector = noise(@P);

And apply the whole thing to the @P:

@P = noiseVector * noiseMultiplier;

 

Share this post


Link to post
Share on other sites

I want a slider to control the noise, when the slider is at 0, no noise, anything above 0 there is noise ?

I set the point position on an vector attribute, then I assigned that attribute to noise() on the position.y that all works successful but what isn't working is applying the noise to a slider or I believe it's called channel ?

v@tgh = @P;
@P.y = noise(@tgh);
@apl = ch("noise");


 

Share this post


Link to post
Share on other sites
@apl = ch("noise")

Does not really do anything. You're setting an attribute of an unknown type (you really should specify the type) to a channel value. The attribute is just made up. So that's like saying my_gobblygook = a slider. What did you expect the code to do for you?

Share this post


Link to post
Share on other sites
2 hours ago, Atom said:

@apl = ch("noise")

Does not really do anything. You're setting an attribute of an unknown type (you really should specify the type) to a channel value. The attribute is just made up. So that's like saying my_gobblygook = a slider. What did you expect the code to do for you?

I know I'm only setting it, I know it's wrong but the only other code method I know is

float ch("noise",@apl);

that doesn't work either :unsure:

 

@P.y = noise(ch("noise"));

The grid moves, but no noise is applied ?

Edited by Arthur Spooner
Code

Share this post


Link to post
Share on other sites

There is this website called google where you can search for things. I found this link.

http://www.sidefx.com/docs/houdini15.0/expressions/ch

It clearly shows that the ch function does not accept two parameters. Also you are trying to define it as a float, it is not a variable, it returns values. There are companion functions such as chf (which returns a float) and chs (which returns a string).

Share this post


Link to post
Share on other sites

as holycause told you, and as I told you too, you should start at the beginning.

All your threads and questions are clearly showing a lack of the basic knowledge. And I'm not mocking you, I am too in the process of learning houdini.
I've accepted to help you via skype, and I could see that you need to understand the basic philosophy of houdini before you can tackle some vex coding.

It's like your asking for help to pilot an space shuttle when you've never rode a bike !

Share this post


Link to post
Share on other sites

chf is (channel,frame) which I don't want the frame 

@P.y = noise(0,ch("noise"),0);

noise takes three parameters, if the channel noise is controlling the Y which is suppose to control the noise ?

Share this post


Link to post
Share on other sites

if you want to control the amplitude of the noise, you need to multiply the result of the noise() function

so for example :

@P.y = noise(@P) * ch("amp");

if you decide you need to have control over frequency as well then you can do this:

@P.y = noise(@P*chv("freq")) * ch("amp");

and with offset control it would be:

@P.y = noise(@P*chv("freq")+chv("offset")) * ch("amp");

 

Edited by anim

Share this post


Link to post
Share on other sites
16 hours ago, anim said:

if you want to control the amplitude of the noise, you need to multiply the result of the noise() function

so for example :


@P.y = noise(@P) * ch("amp");

if you decide you need to have control over frequency as well then you can do this:


@P.y = noise(@P*chv("freq")) * ch("amp");

and with offset control it would be:


@P.y = noise(@P*chv("freq")+chv("offset")) * ch("amp");

 

I assume you only need to use, for example, the temp variable vector chv  if you are creating the variable, not if you are applying it, as in the last two VEX code examples ? I thought noise needs three values,  there is four if you including @P; I'm probably completely wrong in the sense that you need three values. I don't see the big difference between chv & ch ?

How do I keep the grid stuck at it's position because currently it moves on the Y in the world ? Thanks for help up to this point, truly am appreciative

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×