Florent
04-11-2008 09:37:13
Hello,
First I'm happy that a new topic over Hydrax is born : it's an amazing add-on !!!
My problem is that I would like to create waves, ripples on hydrax water. The objective is to create a little race boat game, so I need to add waves after a boat movement.
I already try to add my own function in the noise Perlin in reference to that functions : "_readTexelLinearDual" but it makes nothing...
This is my code :
Is it r_noise (or p_noise) that I need to change ?
Is that anybody have an idea or did an equivalent thing ?
Somebody could explain me the parameters of Noise class ?
Thank you very much and sorry if I wrote english mistakes
bye
First I'm happy that a new topic over Hydrax is born : it's an amazing add-on !!!
My problem is that I would like to create waves, ripples on hydrax water. The objective is to create a little race boat game, so I need to add waves after a boat movement.
I already try to add my own function in the noise Perlin in reference to that functions : "_readTexelLinearDual" but it makes nothing...
This is my code :
// u, v the coord and ut the value
void Perlin::_writeTexelLinearDual(const int &u, const int &v,const int &ut)
{
int iu, iup, iv, ivp, fu, fv;
iu = (u>>n_dec_bits)&np_size_m1;
iv = ((v>>n_dec_bits)&np_size_m1)*np_size;
iup = ((u>>n_dec_bits) + 1)&np_size_m1;
ivp = (((v>>n_dec_bits) + 1)&np_size_m1)*np_size;
fu = u & n_dec_magn_m1;
fv = v & n_dec_magn_m1;
r_noise[iv + iu] = ut;
r_noise[iv + iup] = ut;
r_noise[ivp + iu] = ut;
r_noise[ivp + iup] = ut;
}
Is it r_noise (or p_noise) that I need to change ?
Is that anybody have an idea or did an equivalent thing ?
Somebody could explain me the parameters of Noise class ?
Thank you very much and sorry if I wrote english mistakes
bye