Computer Graphics Thinking–texture tiling
Here is one question: how to tile texture?
One thing worth to notice: The DirectX and OpenGL stipulate that a texture source(normally a picture)’s texture coordinate is fixed as [0,1], which mean that it’s smallest x and y coordinate is 0, and largest coordinate is 1.
If that’s the situation, how can we tile a texture source?
Can we do it this way?
1 we shrink the texture coordinate
2 and then ma texture to our triangles
Actually, we do it in the opposite way:
1 we enlarge the texture coordinate
2 and then map texture to our triangles
Why?
The key is :
As we mention before, the texture is fixated in range [0,1], and the texture coordinate is map to the whole triangles(like the triangles comprised as a height map), if the texture source was shrinked, like to 0.3, than mean we get [0,0.3] of the texture source map to the whole triangles, which will get the effect as enlarging the texture source.
So we have to do it the oppsite way. For example, if we enlarge the texture to 5 times, we get [0, 5] of the texture source map to the whole triangles, just like we get a whole texture resource map to [0,1], and then if we warp up the texture, we get another same texture map to [2, 3], [3,4],[4,5], so we get the final effect that we tile our texture to our triangles 5 times.
That’s a very confused concept for rookies in computer graphics.
Computer Graphics Thinking–texture tiling的更多相关文章
- Texture tiling and swizzling
Texture tiling and swizzling 原帖地址:http://fgiesen.wordpress.com If you’re working with images in your ...
- Computer Graphics Research Software
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...
- Fundamentals of Computer Graphics 中文版(第二版) (Peter Shirley 著)
1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6 矩阵变换 7 观察 8 隐藏面消除 9 表面明暗处理 10 光线追踪 11 纹理映射 12 完整的图形流水线 13 图形学的数据结 ...
- How to Start Learning Computer Graphics
Background Input\Output Image Knowledge Image Digital Image Processing Computer Vision Knowledge Com ...
- 水题 HDOJ 4716 A Computer Graphics Problem
题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm ...
- Mathematics for Computer Graphics数学在计算机图形学中的应用 [转]
最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Gra ...
- HDU 4716 A Computer Graphics Problem
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- Mathematics for Computer Graphics
Mathematics for Computer Graphics 最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=105 ...
- Vector Math for 3D Computer Graphics (Bradley Kjell 著)
https://chortle.ccsu.edu/VectorLessons/index.html Chapter0 Points and Lines (已看) Chapter1 Vectors, P ...
随机推荐
- C# 文件上传
一.分析 本次博客,主要解决文件上传等一系列问题,将从两方面来论述,即1G以内文件和1G以上文件. 对于上传1G以内的文件,可以采用基本的三种上传方法:用Web控件FileUpload.html控件 ...
- [深入React] 3.JSX的神秘面纱
<div> <List /> </div> 会被编译为: React.createElement("div",null, React.creat ...
- JAVA把字符串当作表达式执行
直接能够穿一个字符串执行 private static void test(String pm1) { ScriptEngineManager manager = new ScriptEngineMa ...
- Node.js中的URL
Node.js中的URL 什么是URL URL是Uniform Location Resource的缩写,翻译为"统一资源定位符",也就是描述资源位置的固定表示方法.被URL描述的 ...
- c语言数组小练习
//查找数组中最大的值: #include<stdio.h> int main01() { , , , , , , , , , ,,}; ]; int i; ;i < ]);i++) ...
- HTML与CSS入门——第五章 使用文本块和列表
知识点: 1.在页面上对齐文本的方法 2.三种HTML列表的使用方法 3.在列表中放置列表的方法 5.1 在页面上对齐文本: 父元素内子元素文本的居中:在控制父元素的text-align:center ...
- 高仿QQ即时聊天软件开发系列之三登录窗口用户选择下拉框
上一篇高仿QQ即时聊天软件开发系列之二登录窗口界面写了一个大概的布局和原理 这一篇详细说下拉框的实现原理 先上最终效果图 一开始其实只是想给下拉框加一个placeholder效果,让下拉框在未选择未输 ...
- java鼠标与键盘事件监听
package cn.stat.p3.windowdemo; import java.awt.Button; import java.awt.FlowLayout; import java.awt.F ...
- git 笔记记录
分布式版本控制系统Git 是一套内容寻址文件系统,从核心上来看不过是简单地存储键值对.一: git 本地clone 一个仓库 1. 直接clone一个仓库: $: git clon ...
- [Leetcode][015] 3Sum (Java)
题目在这里: https://leetcode.com/problems/3sum/ [标签] Array; Two Pointers [个人分析] 老实交待,这个题卡半天,第一次做不会,抄别人的.过 ...