Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


How to create random curves and apply them to a surface ?

This topic is 5174 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

Hi ! I have to simulate a oil slick on a water surface. But I have 2 main problems: 1. I want to create a random oil slick: To do this I have some point z (x,z) which represents the middle of the slick and n (>=3) points(x, z) which define some points laying on the border. To create a random border I want to use a curve which goes through all n points, but I can''t find anything wich explain how to do something like this. 2. I want to change the color of the water where the oil slick is from blue to black. My problem is, that the water can have any shape (simple quad, heightmap, dynamically changing waves, ..) and I don''t know which one it is.. I want to do something like this: computeWater (); // compute waves for example drawWater (); computeSlick (); // compute new position (x,z) of slick drawSlick (); Is this possible ? Is it possible to create some kind of dynamic texture and apply this one to my water surface ? If it''s not possible, how can I make it possible ? Thx. for ANY help. Andre

Share this post

Link to post
Share on other sites
This should be used for real simulations, so I can''t fake it.
The shape of the slick will change in the simulation (wind, current, ..) and I have to use it later on.

For example in the next step I have to determine if there''s oil at some position (x,z) or not and I thought the easiest way is to check which color the water surface at this position has...

I''m not sure if that''s possible with projective texturing..
furthermore the viewpoint can change at any time. How can
I compute the position/size/shape of the texture to draw ?


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!