Create a mobile cloud texture in the program

Source: Internet
Author: User

Or through our Perlin Noise

1. create four textures of 256,256,256,256

2. Create a temporary texture with the size of 32.

3. Add a random number to the temporary texture and compress it to the 0-255 range (relative to d3dfmt_a8r8g8b8 format)

4. Use the texture created in step 1 as the rendertarget, and render the texture in step 3 to a rectangle of the same size as rendertarget. Note that the texture coordinate is multiplied by 2 on the basis of the previous one. Linear filtering,

Surround mode.

5. Use a shader to synthesize the four images and add an animation to move the texture coordinates. The high frequency moves faster than the low frequency, and the high frequency amplitude is twice higher than the low frequency.

6. Use POW (sharpness, C) to make the cloud more fluffy. C is [0,255]

 

Smaller noise texture size

 

Large noise texture size

I was planning to write the cloud light rendering on game programming gems5, but I never figured out the algorithm. Let's take a look at it and solve it slowly.

I have another article. You can check it out. Introduction of a Website: http://www.vterrain.org/this site is good, outdoor scene rendering, including all aspects. There are many resource connections.

Reference:

Http://freespace.virgin.net/hugo.elias/models/m_clouds.htm

 

Download:

/Files/ttthink/cloudrendering.rar

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.