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的更多相关文章

  1. Texture tiling and swizzling

    Texture tiling and swizzling 原帖地址:http://fgiesen.wordpress.com If you’re working with images in your ...

  2. Computer Graphics Research Software

    Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...

  3. Fundamentals of Computer Graphics 中文版(第二版) (Peter Shirley 著)

    1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6 矩阵变换 7 观察 8 隐藏面消除 9 表面明暗处理 10 光线追踪 11 纹理映射 12 完整的图形流水线 13 图形学的数据结 ...

  4. How to Start Learning Computer Graphics

    Background Input\Output Image Knowledge Image Digital Image Processing Computer Vision Knowledge Com ...

  5. 水题 HDOJ 4716 A Computer Graphics Problem

    题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm ...

  6. Mathematics for Computer Graphics数学在计算机图形学中的应用 [转]

    最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Gra ...

  7. HDU 4716 A Computer Graphics Problem

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  8. Mathematics for Computer Graphics

    Mathematics for Computer Graphics 最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=105 ...

  9. Vector Math for 3D Computer Graphics (Bradley Kjell 著)

    https://chortle.ccsu.edu/VectorLessons/index.html Chapter0 Points and Lines (已看) Chapter1 Vectors, P ...

随机推荐

  1. 170109、JSONP是什么

    一.JSONP的诞生 首先,因为ajax无法跨域,然后开发者就有所思考 其次,开发者发现, <script>标签的src属性是可以跨域的 把跨域服务器写成 调用本地的函数 ,回调数据回来不 ...

  2. (转)苹果消息推送服务器 php 证书生成

    1.准备好 aps_developer_identity.cer , push.p12这两个证书文件 2. 生成证书如下: openssl x509 -in aps_developer_identit ...

  3. SQL Server error "Xml data type is not supported in distributed queries" and workaround for it

    Recently while working with data migration,got an error while running a following query where Server ...

  4. JavaScript学习笔记(高级部分—01)

    JavaScript的核心ECMAScript描述了该语言的语法和基本对象:DOM描述了处理网页内容的方法和接口:BOM描述了与浏览器进行交互的方法和接口. 简单说,ECMAScript描述了以下内容 ...

  5. C语言排序算法复习

    排序算法有很多种,这里在复习和分析的基础上,做一个自己的总结: 首先要知道有哪些排序算法,google一下,有云C语言7大经典排序算法(也有8大).主要包括冒泡排序,快速排序,选择排序,插入排序,希尔 ...

  6. android手机内存大小获取

    //获取手机中文件管理器中存储大小 File datadir = Environment.getExternalStorageDirectory(); //获取手机内部的存储大小 File datad ...

  7. Comprehensive learning path – Data Science in Python深入学习路径-使用python数据中学习

    http://blog.csdn.net/pipisorry/article/details/44245575 关于怎么学习python,并将python用于数据科学.数据分析.机器学习中的一篇非常好 ...

  8. MODULE_DEVICE_TABLE

    1. MODULE_DEVICE_TABLE (usb, skel_table);该宏生成一个名为__mod_pci_device_table的局部变量,该变量指向第二个参数.内核构建时,depmod ...

  9. C++沉思录之一

    一.系统跟踪类Trace的设计过程: step1:简单版 class Trace { public: Trace() { noisy = ; } void print(char* s) { if(no ...

  10. 从TableviewCell中获得TableviewController的几种方式

    id view = [self superview]; // 获取cell所在的tableview while (view && [view isKindOfClass:[UITabl ...