285 | | |
286 | | ---- |
287 | | === Tutorial: Proping with pyrogenesis 3ds max plugin === |
288 | | This tutorial teaches on how to use the Prometheus 3ds Max propping tools. This will enable you to use the propping feature while doing your modding for 0 A.D. Well, if we are going to work with 3ds Max, we are going to need a plug-in and you can download that [http://www.wildfiregames.com/%7Eart/pmdexp6.rar HERE]. |
289 | | |
290 | | What propping does is allows us to transform this: |
291 | | |
292 | | ||[[Image(http://www.wildfiregames.com/0ad/images/artspec/image006.jpg)]]||VS.||[[Image(http://www.wildfiregames.com/0ad/images/artspec/image007.jpg)]]|| |
293 | | |
294 | | This is an important tool because in 0 A.D. we only allow one texture per model. We also made an effort to conserve the texture database size by reducing the quality of textures in the game. This also, in the long [[BR]] run, sped up the development process and encouraged visual cohesion. |
295 | | |
296 | | So, what is a prop? Well a prop is an actor with its own attributes and behaviours. In this example, here is a a better view of the above images that shows what in the image are props: |
297 | | |
298 | | [[Image(http://www.wildfiregames.com/0ad/images/artspec/image008.jpg)]] |
299 | | |
300 | | We have a crate, barrel, anvil, dummy, shield, windows, door trim, and a chimney. Now, in the game, we can create multiple prop points. This can be useful because you could add variety with a random function that swaps out prop actors with every new entity created in the game. So, for example, with this one, we could have that shield actor switch out with a collection of shield props. However, for the purpose of this tutorial we will consider this collection of props as one prop. |
301 | | |
302 | | So lets get started! |
303 | | |
304 | | [[Image(http://www.wildfiregames.com/0ad/images/artspec/image010.gif)]] |
305 | | |
306 | | This is how the building looks on our 0 A.D. max file template. You can see the building is properly scaled for a 3x3 tile size and all the props are so far unique actors. Even though the props are separate objects (at the moment), they are sharing the same textures. Again, if a prop has a separate texture, it must be attached separately with its own prop point. Here is the texture that these props are skinned with: |
307 | | |
308 | | [[Image(http://www.wildfiregames.com/0ad/images/artspec/image009.jpg)]] |
309 | | |
310 | | The first thing we want to do is get everything orientated in one common location. The reason being is that each prop is anchored by a prop point. When we export the prop object, its orientation is based off its local axis. So, the idea is - we need the prop objects pre-positioned to ensure proper alignment in the game. |
311 | | |
312 | | ||Step 1 - Attaching[[BR]][[BR]] [[BR]][[BR]]The next step is to select the structure and attach all [[BR]] the props:[[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image011.gif)]][[BR]][[BR]][[BR]][[BR]] [[BR]][[BR]] [[BR]][[BR]]You will see the following menu pop up, just hit OK.[[BR]][[BR]] [[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image012.gif)]]||Step 2 - Pivot Placement[[BR]][[BR]] [[BR]][[BR]]Now, all your props will be included in one object. We [[BR]] next should move our object to the centre of the 3dsmax world. In order to do that we need to make sure our pivot point is in the correct location.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image013.gif)]][[BR]][[BR]][[BR]]Click on the hierarchy tab, then click the pivot button, then the "Affect Pivot Only" button.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image014.gif)]][[BR]][[BR]][[BR]]Centre your pivot (X,Y) to the centre of your structure (or where you want it to be anchored in the game).[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image015.gif)]][[BR]][[BR]][[BR]]The Z is a bit different; we want to position this to the bottom of the structure. If we put it in the middle, then your structure would be buried halfway in the game's terrain. Not good.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image016.gif)]][[BR]][[BR]][[BR]]Ok, youre now done moving your pivot. Turn off the Affect Pivot Only button.|| |
313 | | |
314 | | ||Step 3 - Detaching[[BR]][[BR]] [[BR]][[BR]]Now, let's move our structure to the centre of the world. You can do this by just inputting zeros in the world coordinates at the bottom of the screen.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image017.gif)]][[BR]][[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image018.gif)]][[BR]][[BR]]The next step is to separate the props again from the object. So first we select all the prop objects like this image to the left.[[BR]][[BR]] Then we detach them.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image019.gif)]][[BR]][[BR]][[BR]]A new window will pop up.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image020.gif)]][[BR]][[BR]][[BR]]Im going to go ahead and properly name it right here.[[BR]][[BR]] While Im at it, Ill go ahead and properly name the structure too.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image021.gif)]]||Step 4 - Setting the Prop Point[[BR]][[BR]] [[BR]][[BR]]Now, it's time to work with the prop point. First, we need to create one.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image022.gif)]][[BR]][[BR]][[BR]]Click on the create tab, then the helper object button, [[BR]] then scroll down and you will see a choice of PS Helpers. Select that.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image023.gif)]][[BR]][[BR]][[BR]]Now our prop tab looks a bit different. Go ahead and place a prop point. Once you place it, it will look like this:[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image024.gif)]]|| |
315 | | |
316 | | ||Step 5 - Exporting[[BR]][[BR]] [[BR]][[BR]]It is time to export! select both the prop point and the [[BR]] structure.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image025.gif)]][[BR]][[BR]] [[BR]][[BR]]Go to File => Export Selected[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image026.gif)]][[BR]][[BR]] [[BR]][[BR]]Now go ahead and export your structure.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image027.gif)]][[BR]][[BR]] [[BR]][[BR]]And that's it! You just exported an object with a prop point included! Repeat the same export for the prop point.||Step 6 - xml code[[BR]][[BR]] [[BR]][[BR]]Youre all done in 3dmax. Now it is time to look at the [[BR]] xml code.[[BR]][[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image028.gif)]][[BR]][[BR]][[BR]][[BR]] [[BR]][[BR]]In this code snippet:[[BR]][[BR]] [[BR]][[BR]]We have given it the proper name (the name that will appear in Atlas). We are also pointing to the newly created *.pmd file. We call up the texture.[[BR]][[BR]]We name the prop point and tell it what actor is supposed to go there.[[BR]][[BR]] [[BR]][[Image(http://www.wildfiregames.com/0ad/images/artspec/image029.gif)]][[BR]][[BR]][[BR]] [[BR]][[BR]]In this code snippet:[[BR]][[BR]] [[BR]][[BR]]We have given it the proper name (that will be called up by the code above). We are also pointing to the newly created PMD file. We call up the texture.[[BR]][[BR]] [[BR]][[BR]]Summary[[BR]][[BR]] [[BR]][[BR]]The tutorial above probably has some unneeded steps, but for the beginner, this is a good way to start. You will find yourself refining your procedures with experience.|| |
317 | | |
318 | | = = |