Jump to content
• Advertisement

Flow fields all having yaw, pitch and roll components?

This topic is 433 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

	float heading = noise->noise(xoff, yoff, zoff) * TWO_PI;

D3DXQUATERNION q;
D3DXQuaternionRotationYawPitchRoll(&q, heading, 0, 0);


For one single standalone field, where the perlin noise only produces a scalar, how do I feed them into a quaternion? I believe in 3D worlds, flow fields have all yaw, pitch and roll components...

Thanks

Jack

Share this post

Share on other sites
Advertisement

What are you trying to do?

Share this post

Share on other sites

What is the Perlin Noise used for in your implementation ??

Normally, a single Field simply holds a vector which is used as the direction to move in.

I've written a basic Flow Fields implementation for Unity a few weeks ago:

Share this post

Share on other sites

I use it for particle animations.

For example, when the flowfields are used for driving a rainfall system. The raindrops should follow the flow fields, the fields may be the wind and gravity sum up together. They should be falling to the ground inclined with some axis angle.

Edited by lucky6969b

Share this post

Share on other sites

You don't need yaw, pitch and roll for this, since you aren't dealing with rotations. You just need vectors. You can probably get good results for the rain by using gravity + prevalent wind + 4D Perlin noise (the 4th dimension is for variation with time). These are just vectors.

Share this post

Share on other sites

If the perlin noise function only produces a scalar value (a float), how can I change it to a vector? You can't have the scalar to define the whole vector?
Thanks
Jack

Edited by lucky6969b

Share this post

Share on other sites
3 hours ago, lucky6969b said:

If the perlin noise function only produces a scalar value (a float), how can I change it to a vector? You can't have the scalar to define the whole vector?
Thanks
Jack

The most obvious thing to do is to use 3 noise functions, for x, y and z. Use three different seeds to generate them.

At least logically you would do that, but the code will be faster if you implement Perlin noise that produces vectors directly. If this second paragraph confuses you, ignore it and go with the first paragraph solution.

Share this post

Share on other sites

Yes, I grasp the right materials now.
I am going over them.
thanks
Jack

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
2. 2
Rutin
19
3. 3
khawk
15
4. 4
5. 5
A4L
13
• Advertisement

• 13
• 26
• 10
• 11
• 44
• Forum Statistics

• Total Topics
633744
• Total Posts
3013653
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!