Logo Khaganat
Traductions de cette page?:

Attention : les informations qui concernent le client OpenNeL sont anciennes car nous avons abandonné son développement. Nous travaillons désormais à un client Godot qui se connectera au serveur OpenNeL. Retrouvez les informations sur ce nouveau client sur https://khaganat.net/wikhan/fr:godot:start.

Génération d'une nouvelle zone

Le tutoriel ci-dessous est basé sur le recours à un logiciel privateur car il s'agit du seul outil actuellement capable de réaliser toutes les opérations, grâce à un plugin dédié compilé spécialement pour lui. Nous espérons qu'un jour un outil libre pourra le remplacer dans la chaîne.

Ryzom Forge (Ulukyn) ont réussis à ajouter une nouvelle zone, il semble. (Je n'ai pas tout à fait compris si c'est en partie basé sur des zones Nevrax ou complètement nouveau, en tout cas c'est plus que jusqu'à maintenant!) Alors si quelqu'un veut étudier les zones, faudrait essayer d'en discuter avec Ulukyn (et Kaetemi + sfb/esseffbee qui sont réapparus sur le canal #ryzom récemment)

Tutoriel en cours de conception et de rédaction. Hautement instable et à valider.
Penser à indiquer la façon pour importer une seule zone dans peinture

Mise en forme de la zone

Texturage de la zone

Création de la tilebank

Nous vous renvoyons sur la page détaillant ce processus : Conception et préparation des textures environnementales

Application des textures

Dans 3DSMax, une fois que le Quadpatch de 160x160m a été créé et est prêt à recevoir ses textures, il faut lui appliquer le Modificateur “NelConvert” puis “NelEdit” et enfin, 'Nel Painter'
Aller dans l'Onglet Outils, choisir “Nel Tile Bank” et choisir la tilebank qu'on souhaite. \\Revenir au menu des modificateurs, Choisir la vue 'top' dans viewport et cliquer sur 'Paint'. Les commandes pour gérer l'application des textures sont les suivantes :

Export de la zone

Construction de la zone avec les scripts de build_gamedata

Mise à disposition des données pour le client et le serveur

Notes depuis la ML OpenNeL

Explications par le lead 3D de Nevrax Hulud

Ceci est un copier/coller issu de la ML Opennel du 19 octobre 2001, par Cyril 'Hulud' Corvazier

Il faut mettre en forme/traduire/adapter

The landscape is done in 2 steps:

First step : artist creation of landscape data (textures and geometry) Second step : offline processing of final data

1) —– Creation process <SNIP>

c) Build the zones geometry

Ok, now we have to build some geometry for our landscape.

As you probably know, NeL landscape is based on Bezier quad patches. Bezier patches are more flexable than height field. you can make creases, concave elevations, holes etc.. Bezier patches are edited in 3dsmax using editpatch. The landscape is divided in zones. A zone is an area of 160×160 meters. Each zone is a patch mesh of 3dsmax. The vertices at the boundary of the zone must be snapped. They will be welded in the post process.

The zone name is like: 3_aa.zone The name is composed of a numeric coordiante (NUM = 3) and a alpha one (ALPHA = aa = 0) The upper left corner of the zone coordinate is : X = 160 * ALPHA Y = 160 * - NUM

For examples, a snowball zone is called 4_ac.zone, it means its upper left coordinates are ( 320, -480 )

d) Paint the zone with tiles

A patch is composed 16×16 tiles. Tiles are our 128×128 textures. A 256×256 textures is 2×2 tiles.

Once you have modeled your zones, you will have to paint it with textures and colors.

Before painting, you must set the bank you want to use it in 3dsmax. To do so, use the utility plugin called “NeL Tile Bank”. Choose your bank on your hard disk. (Don't forget to set the absolute path of the bank in tile_edit). No need to “Setup material”. If you do this, the plugin will generate a material per tile and try to map patches with it. When your bank become big, this take a lot of resources.

Now convert your patch mesh using the “NeL convert” modifer. Now your object is a NeL patch mesh and not a patch mesh. Now add a painter modifier. You can paint.

You can paint over several patch meshes by adding a paint modifier over several NeL patch meshes.

Now you should see the patch painter in a NeL window. Main commands are:

F1: Tile mode, paint textures F2: Color mode, paint vertex color F3: Displace mode, paint displace textures A: automatic lighting on / off.(to see the displacement, a little slow) SPACE: choose your texture, colors or displace to paint.

etc…

See cvs\code\nel\tools\3d\plugin_max\nel_patch_paint\user_guide.txt for other commands. You can configure it by editing the keys.cfg file.

Check some snowballs zones max project: http://www.nevrax.org/download/examples/snowballs_zones.zip (1 Mo)

Note that to do that kind of work, you need a modifier you don't have : edit patch for NeL patch meshes. The reason is it is based on Discreet source code. With nomal edit patch you can subdivide patches, extrude, bievel etc.. You can't for example, change the number of tiles on a patch.

e) Performance issues

Some notes about performances:

- You can make a lot of zone. I can't tell you the zone count for our project, but it is high :) - 700 128×128 textures is a good count. (Use DXTC5 !) - 50 patches of 16×16 tiles per zone is the max peek you should use. Equivalent to 200 patches of 8×8 tiles. - A tile should be 2×2 meters on the ground. It give you 1.5 centimeter pixel ratio. Double than quake 3 walls but on a landscape ! So with the given patch count, you have twice the surface of the zone to model it.

Now your zones are modeled, painted, colored and displaced. Time for processing.

1) —– Offline process–

The offline processing project is in cvs in

cvs/code/nel/tools/3d/landscape_builder

How to build the NeL landscape.

a) What does mean 'Build the NeL lanscape' ?

Once you have created your tile bank and your landscape zones, you will need to preprocess your zone in order to:

- Weld the boundary vertices of the zones - Light the zones with shadows casted by the landscape and the static objects (like trees, buildings..)

b) Requirement

Before building the landscape you must have:

- Installed Cygwin tools and set the PATH properly. (Under windows) - Compilated some binaries and putted them in the “bin/” folder. (zone_dependencies.exe, zone_welder.exe, zone_lighter.exe. zone_smoother.exe is not use anymore)

c) Data exportation

You have to export those data:

- The .zone files in the “zone_exported/” folder. (NeL landscape zone files exported from 3dsmax) - The .bank file in the “bank/” folder. (NeL bank edited with tileedit) - The .ig files (named like the zone) in the folder “ig/”. (NeL instance group file exported from max) - The .shape files (for trees, building or every things that cast shadows on the landscape) in the folder “shaped/” - The .tga files (for the shapes used for alpha blending and for displace tiles) in the folder “maps/”

d) Configure

Configure the cfg/properties.cfg file.

e) Computing

* 0_clean_all.bat - clean all the directories.

* 1_build_dependencies.bat - build dependencies files. Each zone will have a dependency file in which is listed the zone that cast shadow on it. → generate the .depend file in the folder zone_depend/

* 2_weld.bat - Weld the zones. → generates the .zonew files in the folder zone_welded/

* 3_light.bat - Light the zones. → generates the .zonel files in the folder zone_lighted/

All the building process in incremental, ie, if you modify only ONE .zone file, the weld pass will modify the zonew file and each neighbors of this zone. The light pass will relight only the .zonew modified files.

The .zonel files are the final zone files. They are loaded by the engine. (see snowballs 2 source code for detail).

f) farbank building

You will need to compute a farbank. The farbank is the bank used to map the patches when they are far. This bank is computed with the .bank file and the tiles texture. see the project: cvs/code/nel/tools/3d/build_far_bank

Procédure par un utilisateur

Ceci est un copier/coller issu de la ML Opennel du 28 février 2002, par Robert Bjarnason, qui explique une procédure qu'il a testée

Il faut mettre en forme/traduire/adapter

Hi Neuser,

njp> Is somebody can tell me the how to begin ? i just want to make a very little landscape ( a plane is sufficient ! )

There is an outline for generating the Landscape at http://www.nevrax.org/pipermail/nel/2001-October/000654.html

I'll give you my perspective that you can check out in addition to the above mailing-list post. (This is a more hand on approach compared to Ligo, I'm not sure my self how to use Ligo):

You have to install the plugins in Plugin_MAX: nel_export, nel_patch_converter, nel_patch_paint, and tile_utility.

You need to install and compile zone_dependencies, zone_welder, zone_lighter and zone_ig_lighter. And set up you tools/3d/build_game_data correctly (it is good to use the Cygwin tools when dealing with the command-line interface of the build_game_data tools. Set the build_game_data config to only process zone and rbank if you are not processing something else. Also you have to install the PACS collision processing tools for the rbank process.

  1. Open an empty MAX project.
  2. Set the MAX units to Generic Units.
  3. Create a Quad-Patch with 4-5 segments
  4. Set the size of the Patch to 160×160
  5. Find out the positions the Patches need to be, positions are fixed based on the name you give the Patch. for example if you have a Patch that you decide to call 8_AN the position if that patch would be 2160(x), 1200(y) in the Max world space.
  6. Name the patch the Zonename you decide to start with for example you could start with 8_AN at above position.
  7. Clone the Patch you just created.
  8. Set the name and position correctly by using a new zone name and corresponding absolute world position. If you set the name to 8_AO then the position will be 2320(x), -1200(y) it seems to me that the x position changes with the letter counting in the end of the Zonename and the y position changes with the numbers in the front of the name.
  9. Now clone as many patches as you like to create a plane that is the Landscape. Make sure to use the right Patch/Zone names and their position are correct.
  10. Now you got a Plane with x many Patches.
  11. Deform the Patches as you like using the Edit Patch modifier, a standard tool in Max. You can also use a Displacement map at this point, just use the appropriate modifier in MAX.
  12. Now you have shaped the Landscape as you want.
  13. Find the NelConvert modifier in the MAX menu, apply it to all the patches.
  14. Now select Tools and find the tool called Nel Tile Bank, use this tool to select the Tile Bank you have created. The Tile Banks hold all textures, transition maps, displacement maps (for making geometric noise) and info about what vegetations set is connected to tiles.
  15. Select the first Patch you want to paint and make that selected Patch fill up your Perspective View.
  16. Find and select the NeL Patch Painter and apply that modifier to the Patch.
  17. Press the Paint button in the NeL Patch Painter, Geometry roll-out.
  18. Now you can Paint you patch with the tool that pops up. The key definition is included in the src archive of the nel_patch_paint plugin.
  19. Quit the paint tool and select the next Patch to paint.
  20. Finish painting all your Patches.
  21. Run the build_game_data ./0_setup.bat.
  22. Select all your Patches/Zones and use the Export Model function in the NeL Export tool. Save them into your build_game_data/processes/zone/zone_exported folder manually using ./3_build.bat or use build_game_data to automatically export the Patches from Max using the scripting interface, then use ./2_export.bat.
  23. Copy your shapes into processes/shapes/shapes, your .smallbank tile file into processes/smallbank/smallbank and you instance_groups into processes/ig/ig_land.
  24. Change all the config files in build_game_data to reflect the names you decided on for the Patches/Zones.
  25. If you are exporting the Patches/Zones manually then use: ./3_build.bat if you are exporting the Patches/Zones automatically use ./2.export.bat.
  26. Now Landscape will be welded and lit and the final result appear in zone_lighted in the process/zone tree. And the lit instance groups will appear in process/zone/ig_land_lighted.
  27. Your collision files will be in processes/rbank/output

This was from the top of my head… It's not very complete especially tile creation and build_game_data parts. Feel free to ask if you have specific questions.

Warm regards, Róbert Bjarnason

CC Attribution-Share Alike 4.0 International Driven by DokuWiki
fr/generation_de_zone.txt · Dernière modification : 2021/12/03 19:19 de 127.0.0.1

Licences Mentions légales Accueil du site Contact