TAILIEUCHUNG - Focus On 3D Terrain Programming phần 3

Hình Heightmaps được tạo ra bằng cách sử dụng các thuật toán lỗi hình thành và bộ lọc sự xói mòn. Hình ảnh trên cùng có một giá trị bộ lọc của , hình ảnh giữa một giá trị lọc của , và hình ảnh dưới cùng có một giá trị lọc của . | Fractal Terrain Generation 33 Figure Heightmaps that were generated using the fault-formation algorithm and the erosion filter. The top image has a filter value of the middle image has a filter value of and the bottom image has a filter value of . NOTE It s important to note that the midpoint displacement algorithm has a slight drawback to it The algorithm can only generate square heightmaps and the dimensions have to be a power of is unlike the fault formation algorithm in which you can specify any dimension that you want. Midpoint Displacement Fault formation works great for a nice little scene composed of some small hills but what if you want something more chaotic than that such as a mountain range Well look no further. Midpoint displacement2 is the answer that you re looking for This algorithm is also known as the plasma fractal and the diamond-square algorithm. However midpoint displacement sounds so much cooler and it gives the reader that s you a better idea of what actually is going on in this whole process so I ll stick to that term most of the time. All we are doing in this algorithm essentially is taking a single line s midpoint and displacing it Let me give you a one-dimensional run-through. If we had a simple line such as AB in Figure we d take its midpoint represented as C in the figure and move it A----ỗ----B Figure A simple line which is the first stage in the ID version of the algorithm. Now we re going to displace the midpoint of that line by a height value which we ll call fHeight see Figure . We ll make it equivalent to the length of the line in question and we ll displace the midpoint by a range of -fHeight 2 to fHeight 2. We want to subdivide the line in two each time and we want to displace the height of the line somewhere in that range. Figure The line from Figure after one displacement pass. After the first pass we need to decrease the value of fHeight to achieve the roughness that we .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.