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 22:56] – Suite de la trad Lyne | en:peluche [2021/12/03 19:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
The aim of this tutorial is to show how to create cuddly toys based on the models of atysian animals. | The aim of this tutorial is to show how to create cuddly toys based on the models of atysian animals. | ||
- | {{ 00-tuto-peluche.png? | + | {{ fr:00-tuto-peluche.png? |
Prerequisite for modelising only the cuddly toy: | Prerequisite for modelising only the cuddly toy: | ||
Line 31: | Line 31: | ||
- | {{ 01-tuto-peluche-dossiers-mobs.png? | + | {{ fr:01-tuto-peluche-dossiers-mobs.png? |
===== Step 2: Getting the model and creating a dedicated work folder | ===== Step 2: Getting the model and creating a dedicated work folder | ||
Line 43: | Line 43: | ||
- | {{ 02-tuto-peluche-asset-tracking.png? | + | {{ fr:02-tuto-peluche-asset-tracking.png? |
The aim here is to deploy cuddly mobs for the month object. Hence, we'll create a dedicated folder for our to-be toys and respect the naming convention used by Ryzom. | The aim here is to deploy cuddly mobs for the month object. Hence, we'll create a dedicated folder for our to-be toys and respect the naming convention used by Ryzom. | ||
Line 64: | Line 64: | ||
In the " | In the " | ||
- | {{ 03-tuto-peluche-dossier-soft-toy.png? | + | {{ fr:03-tuto-peluche-dossier-soft-toy.png? |
===== Step 3: Cleaing the 3D model using 3DSMax | ===== Step 3: Cleaing the 3D model using 3DSMax | ||
The monster 3D model contains a skeleton and animation track. This is not necessary for a toy accessory and unnecessarily overburden the final ryzom model. We will delete it. | The monster 3D model contains a skeleton and animation track. This is not necessary for a toy accessory and unnecessarily overburden the final ryzom model. We will delete it. | ||
- | {{ 04-tuto-peluche-animation.png? | + | {{ fr:04-tuto-peluche-animation.png? |
Select with the mouse the " | Select with the mouse the " | ||
- | {{ 05-tuto-peluche-physique.png? | + | {{ fr:05-tuto-peluche-physique.png? |
Then we will open the scene explorer screen | Then we will open the scene explorer screen | ||
- | {{ 06-tuto-peluche-bones-01.png? | + | {{ fr:06-tuto-peluche-bones-01.png? |
Now we have only one element in our " | Now we have only one element in our " | ||
- | {{ 07-tuto-peluche-nettoyer-modele.png? | + | {{ fr:07-tuto-peluche-nettoyer-modele.png? |
In the right panel, we will rename the mesh " | In the right panel, we will rename the mesh " | ||
- | {{ 07-tuto-peluche-nettoyer-modele-fin.png? | + | {{ fr:07-tuto-peluche-nettoyer-modele-fin.png? |
===== Step 4: Map the right texture to the model ===== | ===== Step 4: Map the right texture to the model ===== | ||
Line 96: | Line 96: | ||
- | {{ 08-tuto-peluche-texture.png? | + | {{ fr:08-tuto-peluche-texture.png? |
The ID 1 slot is used for textures of Tryker ecosystem, the second slot (ID 2) for the Fyros ecosystem. The third slot (ID 3) for Zoraï ecosystem and the fourth one (ID 4) for the Primes Root ecosystem. Do not look for Matis slot. As good aesthetes, they understood that beauty lay in the Zorai nature and therefore use Zoraï textures for all their animals. Note that here the Gubani is being only present in jungle and primes root. Only slots 3 and 4 are used | The ID 1 slot is used for textures of Tryker ecosystem, the second slot (ID 2) for the Fyros ecosystem. The third slot (ID 3) for Zoraï ecosystem and the fourth one (ID 4) for the Primes Root ecosystem. Do not look for Matis slot. As good aesthetes, they understood that beauty lay in the Zorai nature and therefore use Zoraï textures for all their animals. Note that here the Gubani is being only present in jungle and primes root. Only slots 3 and 4 are used | ||
Line 102: | Line 102: | ||
The same system is also used for other IG objects, such as buildings. In this case, the 4 slots correspond to the four seasons. Thus we can note the presence of snow on some Zoraï buildings in winter. | The same system is also used for other IG objects, such as buildings. In this case, the 4 slots correspond to the four seasons. Thus we can note the presence of snow on some Zoraï buildings in winter. | ||
- | {{ 09-tuto-peluche-multi-texture.png |}} | + | {{ fr:09-tuto-peluche-multi-texture.png |}} |
We will not use this mechanism. We will therefore delete the "NEL Multi Bitmap" | We will not use this mechanism. We will therefore delete the "NEL Multi Bitmap" | ||
- | {{ 10-tuto-peluche-bitmap.png? | + | {{ fr:10-tuto-peluche-bitmap.png? |
Then select our texture " | Then select our texture " | ||
- | {{ 11-tuto-peluche-bitmap.png? | + | {{ fr:11-tuto-peluche-bitmap.png? |
Repeat the operation on the other "Nel Multi Bitmap" | Repeat the operation on the other "Nel Multi Bitmap" | ||
+ | ===== 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. | ||
+ | |||
+ | So we will temporarily put in our scene a reference to another 3d model via the File menu (1) => References (2) => Xref Scene (3) and then clicking on the Add button (4) : | ||
+ | |||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | Select the Homin model " | ||
+ | |||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | Scale the Gubani model and move it via tools " | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | Once at the right scale, remove the reference to the homin model through the File menu => References => Xref Scene. | ||
+ | |||
+ | |||
+ | Reposition the Gubani model at the scene origin | ||
+ | |||
+ | |||
+ | ===== Step 6: Adapt the texture for a fluffy look ===== | ||
+ | |||
+ | In terms of texture, to give a " | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | I edited the " | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | |||
+ | Once the image saved, I re-generated the dds texture with the command: | ||
+ | |||
+ | |||
+ | tga2dds ge_acc_teddy-gubani_01.tga | ||
+ | |||
+ | Here is the result on the 3d model in 3dsmax: | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | ===== Step 7: Shape export | ||
+ | |||
+ | |||
+ | It's time to test the teddybear IG. For this you have to export the model to the " | ||
+ | |||
+ | If this is not already done, add the '' | ||
+ | |||
+ | {{ fr: | ||
+ | |||
+ | Then select the Gubani mesh with the mouse and click on the " | ||
+ | |||
+ | |||
+ | {{ 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> |