找回密码
 注册
X系列官方授权正版
搜索
查看: 4059|回复: 2

[转帖] 关于炮塔制作转动不同步的解决【英】

[复制链接]
发表于 2009-9-30 19:06:34 | 显示全部楼层 |阅读模式
The Problem: A turret who's guns did not follow the turret body when tracking.

While working on a mod, trying to figure out why the main guns of a cap ship were not able to fire, I noticed the ships main turrets behaving in an odd manner:

(simulated results)


Which prompted my posting for help in the XFP forums. Observe got ahold of me in IM, and with his help, I was able to find out the above results was because the guns were rotating on their own pivot point, and not the turrets.

Observe had me check each guns pivot points, and to reset them to 0,0,0 on the grid.

This entailed several steps in 3DS Max:

Load the gun (left or right) with DBOX2 with 'Highest LOD only' unchecked, and 'Detach parts' checked (explained later) Aligning the 'Pivot' area to 0 on the X, Y and Z axis. Changing the 'Pivot point' to match the new alignment. So I loaded both the guns. Because I wanted to make sure they ligned up, not only with the pivot point, but with each other (I'm a bit of a perfectionist with alignments ). Once I had them ligned up with each other, I took note of the coords, then cleared and loaded one at a time to adjust their positions.



I was ready for the next step.

I clicked on the gun to select it, pressed the 'Hiearchy' button in the list of tools, selected 'Pivot', then in the 'Adjust Pivot' rollout, selected 'Affect Pivot Only'.



I then selected the 'Select/Move' from the top:



In this mode, you can alter an objects pivot point to whereever you want it to be. I used the coord area to center the point to 0 on all 3 axis:



Now that the guns position and pivot points are set, we need to save the gun.

The reason I loaded the gun with the 'Detach Parts' option, was to unbundle a specific detail necessary for the weapons operation. That is, the 'laser'

If you've read DS's 'Modding Doc' from the DBOX2 rollout, you'll know the laser plays an important role. DBOX is not only able to export the laser with the body, but is able to update the Components.txt file with the guns laser information. (ie: where it fires from, and the direction).

Normally, the laser is linked with the gun, so even the Detach Parts option, coupled with any moving of the gun itself, will not dislodge it. The Detach Parts just makes it accessable to you, for exporting the components entry and final saving of the gun. It is only with new guns that you'll have to make a 'laser', and link it to the gun. (See DS's Doc)

With just the 1 gun loaded (or both, if your careful with draging selector lines), hit ctrl-a to select all (not if you have more than one item loaded ). This will select the gun and the laser. This is important.

Go to DBOX, and in the Exporter rollout, select 'Body'. You can use either Export Set or All, depending on the situation. This saves the gun's current coords, its mesh, and the laser information.

If you've moved the guns coords, you'll need to use the Components rollout, and Export the guns laser information.

You next need to load the scene file for the turret (Detach Parts UN-checked), and make adjustments to the loaded positions of the guns, especially if you altered their coords. Then, using the Exporter, Select 'Scene' and 'Export All'. This will update the scene file (or make a new one) with the positions of the turrets parts.

It was at this point I thought I was finished. I loaded all the files into the mod, and ran it. The turrets STILL behaved badly.

Because of the guns position, Observe told me to load up the scene, then drop it's Y axis to 0, then adjust its Pivot Point. When I was preparing to do this, I had another notion. So I loaded the Scene with Lod off and Detach parts on.

I then selected each gun, opened the Pivot manipulation, and adjusted the guns X axis pivot Point to 0, based on where the gun was sitting in the scene. Next, I selected each gun, and its laser, and saved its body to file and exported the components information.

Once both guns had been adjusted, I selected everything in the scene except the lasers (not needed for the scene) and saved the scene. Adjusting the Pivot Point like this does cause the scene file to be needing an update.

So here we go again. Loaded the bods into the mod, and ran with it, fingers crossed. Lo and behold, the turrets behaved themselves.

So remember, with articulated turrets like this one, there are 3 different pivot points:

1) The point the 'Body' of the turret uses to rotate around

2) The point a 'Gun' uses for up/down tracking

3) The point the 'Gun' is supposed to use to maintain it's 'position' with the 'Body', and the rest of the turret, when it's in motion.

Understand, in Max, the X and Y pivot points are for 2 and 3, and are not mutually exclusive.

Also note: Changing a guns Pivot Point can alter (and usually does) where the gun will load in a scene, so it's important to update the scene files after such adjusments.

Now, I wasn't quite through. If you notice, the guns for this turret are rather blocky looking, even the 'pipes' coming out of their back ends are blocking looking. So I decided to try something I found earlier.

3DS Max 8 (not sure about GMax or earlier 3DS versions), has an interesting feature called 'Use NURMS Subdivision' (Non-Uniform Rational MeshSmooth).

With an object selected (don't select the laser ) click on the 'Modify' button, and scroll down to the 'Subdivision Surface' rollout. Here you'll find the NURMS option.

Now NURMS does 2 things:

1) It attempts to smooth out your object more than it is already 2) It increases the vertice(edge)/poly(face) count of the object. For exampe:

发表于 2010-9-11 16:10:48 | 显示全部楼层
hao hao hao
回复

使用道具 举报

发表于 2011-1-15 19:55:53 | 显示全部楼层
问题:一个炮塔上的机枪不能随着塔身旋转
turret:(战舰,坦克的)可旋转炮塔
回复

使用道具 举报

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

本版积分规则

关闭

站长推荐上一条 /1 下一条

Archiver|手机版|小黑屋|DeepTimes.NET 太空游戏站