Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:peluche [2014/08/13 23:02] – Poursuite de la trad Lyne | en:peluche [2021/12/03 19:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 114: | Line 114: | ||
Repeat the operation on the other "Nel Multi Bitmap" | Repeat the operation on the other "Nel Multi Bitmap" | ||
- | == Step 5: Scaling the model == | + | ===== Step 5: Scaling the model |
Our 3d model is almost ready. However, its size does not match what is expected. If you use the 3dsmax measuring tool you will see that the Gubani is 2m high. The simplest way to put it in the right size is to load a Homin model to have visual comparison and ensure that the teddybear can be taken in hand. | Our 3d model is almost ready. However, its size does not match what is expected. If you use the 3dsmax measuring tool you will see that the Gubani is 2m high. The simplest way to put it in the right size is to load a Homin model to have visual comparison and ensure that the teddybear can be taken in hand. | ||
Line 139: | Line 139: | ||
- | == Step 6: Adapt the texture for a fluffy look == | + | ===== Step 6: Adapt the texture for a fluffy look |
In terms of texture, to give a " | In terms of texture, to give a " | ||
Line 160: | Line 160: | ||
{{ fr: | {{ fr: | ||
- | == Step 7: Shape export | + | ===== Step 7: Shape export |
Line 174: | Line 174: | ||
{{ fr: | {{ fr: | ||
+ | |||
+ | ===== Step 8: Testing the plushy IG ===== | ||
+ | |||
+ | |||
+ | If we wanted to do it by the book, we should add the " | ||
+ | |||
+ | You have to know that a plushy is nothing more that a weapon hold in hand. So we could replace the model of the dagger with the one of our gubani to test it on the official server. There is a simple trick for this. The game client looks for the models and textures in the " | ||
+ | |||
+ | Now, when you'll take a dagger IG, you'll hold the " | ||
+ | To retrieve the original dagger, you just have to remove the shape file from the " | ||
+ | |||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | By doing this test, you can notice an anomaly: the toy is hold by its foot, which isn't necessarily what we want. | ||
+ | |||
+ | |||
+ | ===== Step 9: Orientating and positionning an object hold in hand ===== | ||
+ | |||
+ | The fastening point for an object hold in hand is at the point with (0,0,0) coordinates of the object. Its orientation obeys the following rule: | ||
+ | |||
+ | X axe goes up along the forearm; | ||
+ | Y axe starts from the back of the hand towards outside; | ||
+ | Z axe points towards the top of the object firmly hold in hand. | ||
+ | |||
+ | |||
+ | We realign the teddy-gubani in 3DSMax as shown in the following image: X axe exits the gubani' | ||
+ | |||
+ | {{ fr: | ||
+ | | ||
+ | After realigning the gubani model and re-exporting the shape, we get a plushy which is hold by its trunk: | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | If you want to know more about objects held, you can read [[creation_d_un_objet_prehensible_en_jeu|this tutorial]]. | ||
+ | |||
+ | |||
+ | ===== Step 10: Creating the icone for inventory and actions bar ===== | ||
+ | |||
+ | |||
+ | |||
+ | You have to create an icon to show the teddy-gubani item in the inventory and in the action bar. | ||
+ | This icon in tga format has do be of size 40x40 pixels, with a transparent background. We'll name it " | ||
+ | |||
+ | The 40x40 pixels icon: | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | For performance reasons, these icones aren't stored individually but gathered under one single image names: " | ||
+ | |||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | The text file uses the following format for each line: | ||
+ | |||
+ | NomFichierIcone u1 v1 u2 v2 | ||
+ | |||
+ | Where: | ||
+ | * u1,v1 is the position of the upper left corner of the icon | ||
+ | * u2,v2 is the position of the lower righ corner of the icon | ||
+ | |||
+ | |||
+ | Unlike coordinates in pixels, these coordinates are using the 3D UV Mapping technique, and have their values in [0|.. 1] interval. The (0,0) coordinate is the upper left corner of the image and (1,1) is the bottom right corner of the image. | ||
+ | |||
+ | Passing from one system to the other one is simple. Let (x1,y1) be the place of the upper left corner of our icon in the global image and (x2,y2) the place for its bottom right corner, then: | ||
+ | * u1 = x1 / image width | ||
+ | * v1 = y1 / image height | ||
+ | * u2 = x2 / image width | ||
+ | * v2 = y2 / image height | ||
+ | |||
+ | Knowhing that the " | ||
+ | |||
+ | icon_teddygubani.tga 0.115234375 0.779296875 0.1533203125 0.8173828125 | ||
+ | | ||
+ | Even if it can be added by hand, the proper way to do it is to use the dedicated NEL tool // | ||
+ | |||
+ | |||
+ | |||
+ | Nota: Adding the icon isn't enough, you'll also have to create the datasheet for the soft-toy object and specify in it the name of the icon to be used, as will be seen later in this tutorial. By the end, we're getting the following result IG: | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Step 11: Creating the names file ===== | ||
+ | |||
+ | |||
+ | To be completed. | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | ===== Step 12: Creating the datasheet | ||
+ | |||
+ | Basically, a soft-toy remains an object held like a weapon. Actually, the datasheet for the soft-toy is very similar to the one of a one-handed weapon, such as the dagger' | ||
+ | |||
+ | __icrm1pd.sitem | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <FORM Revision=" | ||
+ | <PARENT Filename=" | ||
+ | < | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | </ | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <LOG> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | What will be changed is: | ||
+ | |||
+ | * the reference for the shape in the " | ||
+ | |||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | |||
+ | * the reference for the icon used in the action bar and in the inventory in the " | ||
+ | |||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | |||
+ | * the base features which differ from the ones of a weapon: no level required, no craft stanza, etc... | ||
+ | |||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | </ | ||
+ | |||
+ | Here is then the datasheet for the teddy-gubani which will be called | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <FORM Revision=" | ||
+ | <PARENT Filename=" | ||
+ | < | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | </ | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <ATOM Name=" | ||
+ | <STRUCT Name=" | ||
+ | <ATOM Name=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Step 13: Deploying the soft-toy on the game server and client | ||
+ | |||
+ | |||
+ | In order to deploy the soft toy in game, the official method consists in using the " | ||
+ | |||
+ | We'll need the following files: | ||
+ | |||
+ | * teddygubani.sitem (the datasheet for the teddy-gubani) | ||
+ | * ge_acc_teddy-gubani_01.shape (the 3d NEL model for the soft-toy) | ||
+ | * ge_acc_teddy-gubani_01.dds (the texture for the 3d model) | ||
+ | |||
+ | Moreover, deploying this soft-toy will impact the following files: | ||
+ | |||
+ | * the " | ||
+ | * the " | ||
+ | * the " | ||
+ | |||
+ | To work properly, we'll also create a " | ||
+ | |||
+ | |||
+ | For the next operations, we'll consider that our game server uses linux, and that the following environement variable are defined as follow: | ||
+ | |||
+ | * LEVELDESIGNPATH points out the folder for the datas of the level design | ||
+ | * RYZOM_HOME on the install of the server sources | ||
+ | |||
+ | ==== | ||
+ | |||
+ | |||
+ | On server side, we'll create a folder dedicated to the soft-toys and place the gubani' | ||
+ | |||
+ | $ mkdir $LEVELDESIGNPATH/ | ||
+ | $ cp teddygubani.sitem $LEVELDESIGNPATH/ | ||
+ | |||
+ | ==== | ||
+ | |||
+ | ==== | ||
+ | |||
+ | The first step consists in regenerating the index file for the datasheets throught the " | ||
+ | |||
+ | $ make_sheet_id -o$LEVELDESIGNPATH/ | ||
+ | |||
+ | ==== | ||
+ | |||
+ | The " | ||
+ | |||
+ | $ sheets_packer | ||
+ | |||
+ | This command also regenerate the visual_slot.tab file. | ||
+ | |||
+ | ==== | ||
+ | |||
+ | * Copy the " | ||
+ | * Copy the $LEVELDESIGNPATH/ | ||
+ | * Replace the packet_sheets files in the " | ||
+ | |||
+ | |||
+ | ==== | ||
+ | |||
+ | To end this, you'll have to copy the shape and the texture of the soft-toy into the " | ||
+ | However, in order to work cleanly, let's create a dedicaed " | ||
+ | A " | ||
+ | |||
+ | Let's create a " | ||
+ | |||
+ | |||
+ | bnp_make /p soft-toy | ||
+ | |||
+ | The command will create a " | ||
+ | |||
+ | |||
+ | ==== | ||
+ | |||
+ | Restart the server with the //shard start// command and connect with your client. | ||
+ | |||
+ | If everything went well, when starting your game client, you can create a soft-toy in your inventory with this command: | ||
+ | |||
+ | /a createItemInBag teddygubani 1 5 | ||
{{tag> | {{tag> |