Key steps of Rendering objects:

1 Create objects’ meshes, which we can use C++’s vector container to hold them. They just some points structures, and indices(represented by int). Knowing exact what they are can demystify them.

2 Set up transformation matrixes: world matrix, view matrix, and projection matrix.

1) World matrix is identity matrix;

2) View matrix is caculated with three matrix, which can be done with one intrinsic function in DirectX:

// Build the view matrix.
XMVECTOR pos = XMVectorSet(x, y, z, 1.0f);
XMVECTOR target = XMVectorZero();
XMVECTOR up = XMVectorSet(0.0f, 1.0f, 0.0f, 0.0f); XMMATRIX V = XMMatrixLookAtLH(pos, target, up);

3) Projection matrix, which is also called perspective projection matrix, can be calculated with one intrinsic function in DirectX, too:

XMMATRIX P = XMMatrixPerspectiveFovLH(0.25f*MathHelper::Pi, AspectRatio(), 1.0f, 1000.0f);

The math behind them can be very complicated. And sometime we may need to know them to perfrom some specific effects.

If we want to move our objects to some specific position and have specific orientation, we can use RST(rotation matrix, scaling matrix, and translation matrix) to transform our objects.  And we can multiply RST with world matrix, like this: W = W*RST; and then use the new W as other non-transformed objects.

3  Create buffers to hold, majorly, vertice and indices, we call them vertics buffer and indices buffer, and then we must bind the buffers to our drawing context, so that our DirectX know what to draw.

4 Remember to set up our vertex layout, which mean we have to specify how to arrange our vertices, is it a vertex with color, normal, or even with texture coordinate? We have to make every thing crystal clear, otherwise computer just never know how to do it.

5 We have to watch out what variabl we have to set up in Shaders. We can achive it by dividing it into three steps:

1) Create effect

2) Get techniques names and variables names

3) Set up these variables’ values with their names

The five step should be the key things tokeep in mind when we need to do rendering.

One more things to notices is:

The object(like a simple sphere) meshes we created by hand is essentially the same thing as modle meshes created by artisets. They record vertices’ position, normal, color and so on. One major different point between them would be molde meshes created by artisets with modle software, like 3DSMax, Maya and so forth, is more complicated than the simple shpere meshes we created, with more informations inside the modle files(like obj, x files).

3D objects key rendering steps的更多相关文章

  1. #学习笔记# VALSE 2019.01.09 朱俊彦 --- Learning to Synthesize Images, Videos, and 3D Objects

    视频类型:VALSE-webinar 报告时间:2019年01月09日 报告人:MIT朱俊彦 报告题目:Learning to Synthesize Images, Videos, and 3D Ob ...

  2. [ReactVR] Render Custom 3D Objects Using the Model Component in React VR

    React VR isn't limited to simple 3D primitives. By using the <Model/> Component we can place a ...

  3. 从3D Studio Max导入物体 Importing Objects From 3D Studio Max

    原地址:http://game.ceeger.com/Manual/HOWTO-ImportObjectMax.html If you make your 3D objects in 3dsMax, ...

  4. Rendering Transparent 3D Surfaces in WPF with C#(转载)

    Rendering Transparent 3D Surfaces in WPF with C# The primary problems that arise when rendering semi ...

  5. DirectX 11游戏编程学习笔记之6: 第5章The Rendering Pipeline(渲染管线)

            本文由哈利_蜘蛛侠原创,转载请注明出处.有问题欢迎联系2024958085@qq.com         注:我给的电子版是700多页,而实体书是800多页,所以我在提到相关概念的时候 ...

  6. 基于ACIS/HOOPS的3D应用开发简介 【转】

    (整理) 平台:                造型引擎——ACIS         显示引擎——Direct3D/OpenGL/GDI         应用框架——HOOPS   组件关系图     ...

  7. 全球最大的3D数据集公开了!标记好的10800张全景图

    Middlebury数据集 http://vision.middlebury.edu/stereo/data/ KITTI数据集简介与使用 https://blog.csdn.net/solomon1 ...

  8. 3D HTML5 Logo标志 超炫酷旋转特效

    今天又要为大家带来一款超酷的HTML5 Canvas 3D动画特效,是一款可以旋转的HTML5 Logo标志.画面上一共有两块可旋转的区域,第一是可旋转的背景,第二则是可旋转的Logo标志.Logo标 ...

  9. 国外60个专业3D模型网站

    原始链接:http://blog.sina.com.cn/s/blog_4ba3c7950100jxkh.html Today, 3D models are used in a wide variet ...

随机推荐

  1. XMPP通讯开发-好友获取界面设计

    在XMPP通讯开发-服务器连接 中我们成功连接到服务器上面,然后进入到主界面,接下来就是获取好友列表,这里我们分段开发,首先就是界面的设计,这里仿照QQ好友界面,里面的数据先是用模拟的,下一章获取服务 ...

  2. 手游2dx面试笔记一

    第一轮IQ测试:都来面试程序了,相信IQ再怎么也坑不到哪里去吧.要问什么样的题,几页纸呐, 如:1.找出不同类:羚羊.斑马.鲨鱼 2.在()里添一字使2边都能组词:木()料 3.中间值?:1,2,4, ...

  3. android 绘图

    在main.xml文件中代码如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout ...

  4. 忘记 mysql5.5.24 数据库 root 密码

    兹整理如下,供网友参考 第一步:关闭mysql服务 第二步:新建txt 写入如下内容 UPDATE mysql.user SET Password=PASSWORD('blog.const.net.c ...

  5. 配置squid代理服务

    1. 简述一下squid的用途?squid可以做代理和缓存服务器,而做代理时,可以分为正向代理和反向代理.正向代理用在企业办公环境中,企业员工上网通过代理来上网,代理的缓存功能可以为企业节省宝贵的带宽 ...

  6. C#基础语法总结

    C#笔记——基础篇 一.入门知识 VS中的常用快捷键 Ctrl+K+D:快速对齐代码 Ctrl+Z:撤销 Ctrl+S:保存(一定要经常保存!) Ctrl+J:快速弹出智能提示 Shift+End . ...

  7. EasyUI 1.4.4 DataGrid(大数据量) bufferview滚动时不加载下一页数据解决方案

    在使用Easyui DataGrid 过程中,发现若单页数据量超过300,IE浏览器加载速度很慢.也通过网上找寻了很多解决方案,最典型的就是去掉datagrid的自动列宽以及自动行高判断. 1.解决自 ...

  8. win7 重启 IIS.

    步骤 1,打开 "控制面板",并将右上角的"查看方式"设置为 "大/小图标". 2,选择 "管理工具": 3,打开 In ...

  9. 如何快速恢复MyEclipse的默认主题

    这里天在研究主题,到网上找了一些主题导入,可是有一部分主题导入后不能通过preference选项进行恢复默认主题!那怎么办?有没有别的办法! 在网上找了一些答案,有更改工作空间的办法,也有替换.set ...

  10. out返回值的用法与用途

    static void Main(string[] arr) { Console.WriteLine("请输入用户名"); string uname = Console.ReadL ...