查看: 2029|回复: 1
打印 上一主题 下一主题

max网格转成untiy3d地形小扩展

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-3-14 14:19:05 |只看该作者 |倒序浏览
非常有用的扩展工具。
Small free tool, for my own testing actually,
so it takes a bit of work to install & setup..
If you get it to work, let me know any ideas/suggestions for extra stuff.
(There is not much error checking done, so dont try anything funny..)
mTerrain
Intro
- 3ds maxscript, that exports mesh to Unity "terrain heights"
- Whats nice, you a have full control of the terrain mesh in 3DS Max
ie. edit as much as you like, stack modifiers, precisely edit few/single vertices etc..then easy export to Unity
- This plugin doesnt create any terrains, use 3DS Max or external software to do that (this is for export/import only)
- Good way to start, create plane, add displacement modifier, add some maps or bitmaps as displacement..

Requirements
- 3ds Max 2008+
- Unity 3.x

Download
- http://www.mediafire.com/?ksotir8l1pl7csm

Donation
- Feel free to donate : )

(bonus. Those who donate _any_ amount, get the MaxScript source : )..which is nothing special, it just exports vertices to a file..)

Licence
- mTerrain is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
http://creativecommons.org/licenses/by-sa/3.0/
Installation
3ds Max Script Installation
- Copy mTerrainMaxV10.mse to your 3ds Max scripts-folder (usually c:/program files/autodesk/3ds max 20xx/scripts/)
- Run the script from 3dsmax menu: Maxscript / Run script... browse for the script, select it and run.
- Now go to menu:
- Customize / Customise user interface
- Go to "Toolbars" tab
- Group: Main UI, Category: mTerrain
- Drag the script from the cction list named "mTerrain" to your toolbar (existing or create new)


3ds Max Script Setup - First Run


- Click the mTerrain button without any objects selected
- This will open mTerrain Setup Window, fill in the values (You can see the values in Unity, from menu: Terrain / Set resolution )
- Unity Heightmap resolution: ___
- Unity Terrain height: ___
- Unity project asset folder: ____ (this is the folder where your mterrain-textdata-asset will be saved)
- Click "Save settings"
- Done


Unity Script Installation


- Import mTerrainV10.package
- Inside the package you get 2 scripts (+1 sample terrain data asset)
- mTerrainObject.js (can be anywhere in the project tree)
- mTerrainEditor.js (its in editor/ folder)


Usage / Tutorial #1


Unity
- Start new project or use your old one
- Add unity terrain to your scene
- Check Terrain / Set resolution.. settings (they must match the values you have used in 3DS Max)
- Add mTerrainObject.js script to your terrain (drag & drop the script to terrain)


3ds Max : Creating terrain
- Create plane
- 2000x2000 (same size as your Unity terrain)
- 512x512 segs (Important. 512 in Max is 513 in Unity, so its minus 1, if you use different resolutions)
- Modify your plane to make terrain (for example, add a wave modifier)
- Or use any displacement map with displacement modifier
- Select the plane
- Press "mTerrain" button
- Wait...(progressbar is shown)
- Done, go to Unity..


Unity : Getting 3DS Max terrain
- Select your terrain (which has "mTerrain.js" attached)
- Drag mTerrainAsset to mTerrainAsset in inspector window (under mTerrain script, its the terrain height values)
- Note. You can rename "mTerrainAsset" to keep it, new imports are saved again as "mTerrainAsset"
- Press "Update mTerrain"
- Wait...
- Done (your terrain should look like the one in 3DS Max)


After that you can keep modifying the 3ds Max plane and update it in Unity when needed


Go back to 3ds Max
- Modify your plane
- For example: add noise modifier
- Press "mTerrain" button (1 object must be selected when exporting, if nothing is selected, setup window is shown)


Go back to Unity
- Select your terrain
- Press "Update mTerrain" in the inspector
- Note. You need to click "apply materials" in TerrainTools, to get the correct textures in slopes etc.
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

797

主题

1

听众

1万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
5568
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-3-16 19:40:47 |只看该作者

   
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-13 22:57 , Processed in 0.061315 second(s), 31 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部