您的位置:首页 > 其它

使用blender做一个地球模型,贴上UV纹理,导出Obj格式

2014-07-22 09:37 1736 查看

使用blender做一个地球模型,贴上UV纹理,导出Obj格式

Table of Contents

1 blender

1.1 图文教程
1.2 export to objloader, coordinate rotate

1.3 UV image editor: add texture to surface

1 blender

1.1 图文教程

我用的blender版本是2.63.0,各个版本之间应该是大同小异的

首先打开blender, 删除startup默认添加的cube(左键选中后,按一下del), 这样就是一个空白的world了。



从mech菜单中,选择添加一个UV sphere, 快捷键是 'shift+a':



球就出来了:



为了能够一遍编辑这个Sphere, 一边编辑UV映射, 我们拉开一个新的窗口。点击下图中的这个三角,往左拉动,就变成2个窗口了:





然后左边切换到 Edit-Mode(快捷键 Tab), 右边把Editor切换到 UV/Image Editor. 两个切换的地方不一样:



然后在右边的 UV/Image Editor中添加一个Material, 然后添加Texture, 选择子菜单中Type为Image, 然后子菜单中打开图片, 然后最下面的图片选项,选择我们刚才打开的图片:



结果就是这样:



然后左边切换到Editor-Mode以后,选择unwrap, 选择 sphere projection, 如下调整参数,这样右边就会出现UV网络,用translate, scale, rotate调整到你想要的地方就完了:



参数:



好了, 在选中左边的窗口, 按一下F12, 就能看到结果了:



最后是导出Obj格式, 需要注意Blender里面的坐标是右手坐标系,向后躺下来的. 所以, 这里要调整一下坐标系方向(Y forward), 同时做好用Triangle Face应为后面的Objloader没有那么高端:



这样,我们就得到了旋转地球的2个素材, obj和一张png, obj里面包含了模型点坐标,normal坐标,uv坐标,png则是我们准备贴上去的纹理资源.

下面两项是总结与其它链接

1.2 export to objloader, coordinate rotate

blender's coordinate is x-right, y-forward, z-up. But opengl isx-right, y-up, -z-forward. So when use blender export .obj file, thecoordinate system should changed

1.3 UV image editor: add texture to surface

in Object Mode, select which object you want to add texture
press tab, switch to Edit Mode.a, for select all vertex;seam, for let blender know where should start unwrap;or use smart unwrap/projection, or sphere project
in Object Mode, press u, show the UV menu, select unwrap. Thiswill show the
UV Image editor.
In UV image editor, add Material to object, then add
Textureto Material.
select Texture type to image, than press alt+o or select
open image to open external resource.
use g, s, r, addtional x, y, z strict into given coordinate, torerange the UVs to match pixels in
Texture
save & export
read example

offical_manul

earth_example

http://digitized-life.blogspot.jp/2011/07/blender-249-uv.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐