zone_create - ryzom/ryzomcore GitHub Wiki


title: How to create a NeL zone description: published: true date: 2023-03-01T05:20:52.020Z tags: editor: markdown dateCreated: 2022-03-13T01:55:40.821Z

This piece of documentation is quite old. Please help review it! {.is-warning}

The developers have not yet create a standalone editor, so at the moment there is no easy and fast way like e.g. the Quake editor to build a map and directly import it into client. At the time of initial development, the developer had chosen to take advantage of the powerful 3ds Max usually used for 3D game modeling.

Landscapes in NeL are divided into zones. A zone is an area of 160x160 meters. Each zone is a patch mesh in 3dsmax.

The vertices at the boundary of the zones must be snapped to the bordering zone. They will be welded in the post process.

Zone naming is important. In NeL it's an automatic way for the landscape system to find the file with the zone data but it also determines the in-game location of the patch.

The zone name is formatted like: ''3_aa.zone'' The name is composed of a numeric coordinate (NUM = 3) and a alphabetical one (ALPHA = aa = 0). These translate into the coordinates of the zone in-game. The upper left corner of the zone coordinate is:

X = 160 * ALPHA Y = 160 * - NUM

For examples, in snowball there is a zone called ''4_ac.zone'', this means that its upper left coordinates are ''320, -480''

How to build, install and configure tools

First we have to configure some tools. In this document we assume you have built Snowballs, and it's running, because you need to be able to build Snowballs to continue here.

Almost tools are distributed under source format. There are no tools binaries available at the moment, and you will have to build all of them.

Tools not provided by the developer:

  • You need to install 3ds Max

NeL's Tools are in the /code/nel/tools directory, and in its subdirectories, and there are 3 kind of tools.

Plugins and tools for 3ds Max

Plugins and tools have to be compiled as all others tools. Compilation of tools is well documented and I recommand you to read these documents.

  • /code/nel/tools/3d/plugin_max/compilation_notes.txt
  • /code/nel/tools/3d/plugin_max/compilation_notes_vc7.txt

You can find documentation about how to paint zone under these folders as well.

How to build a simple landscape

In this document i explain how to build a simple landscape under 3DS max , how do you paint, export, build and import data into snowball client. This is not a full documentation, step like paint , export and build will be more documented further. But you will have a preview of each step to make a simple land for snowball 2 client.

Before read this document, you must have built 3DS MAX plugins and tools.

In this document there are some screenshoots take under 3D studio 3 release 3. There are some Gui difference between 3D studio version but dont be worry.

Landscape generation pipeling

It appears five step to buid data. Let s go take a look to them.

Build zones landscape

  1. Launch 3DSMAX.

  2. Open a new MAX file.

  3. Set the MAX units to Generic Units: Customize -> Units Setup

  4. Creation of a Quad-Patch of 160*160 with 4-5 segments. Follow number on screenshot after having read zone organisation:

    Zone organisation: Landscape is made of zone and each zone is a Quad patch object in 3DSMAX.

    missing image http://perso.club-internet.fr/neuser.jp/projets/Nevrax/inc/img/zoneorg.GIF {.is-danger}

    • Quad patch size must be 160*160.
    • Quad patch must have a unique name ( 0_AA to ??? )
    • Quad patch position must correspond to his name.

    Correlation between name and position: The name is composed of a numeric ( NUM ) coordiante and a alpha one ( ALPHA ).

    example 1: The upper left of zone named 3_aa.zone must be at **( 0 ; -480 ) **(NUM = 3) and (ALPHA = aa = 0 ; ab = 1 ; ac = 2 ; ad = 2 ; ... ) The upper left corner of the zone coordinate is : X = 160 * ALPHA = 160 * 0 = 0 Y = 160 * - NUM = 160 * 3 = -480

    example 2: The upper left zone named 2_ae.zone must be at ( 640; -320 ) (NUM = 2) and (ALPHA = ae = 4... ) The upper left corner of the zone coordinate is : X = 160 * ALPHA = 160 * 4 = 640 Y = 160 * - NUM = 160 * 2 = -320

    Now we will build 4 zone named: 7_AN : AN = 13 ( 13 * 160 , -7 * 160 ) -> ( 2080, -1120 ) 7_AO : AN = 14 ( 14 * 160 , -7 * 160 ) -> ( 2240, -1120 ) 8_AN : AN = 13 ( 13 * 160 , -8 * 160 ) -> ( 2080, -1280 ) 8_AO : AN = 14 ( 14 * 160 , -8 * 160 ) -> ( 2240, -1280 )

    Usual mistake: **The entered position ( X,Y,Z ) under 3DSMAX are the middle of quad patch not upper left corner. So we have to make an easy transformation ( X + 80 , Y - 80, Z ). Under 3DSMAX middle position of our zones are: 7_AN : ( 2080, -1120 ) -> ( 2160 ;-1200) 7_AO : ( 2240, -1120 ) -> ( 2320 ;-1200) 8_AN : ( 2080, -1280 ) -> ( 2160 ;-1360) 8_AO : ( 2240, -1280 ) -> ( 2320 ;-1360)

    3dmaxzone.jpg

    4.1Select Object Menu. 4.2 Select Quad patch. 4.3 Select Create 4.4 Enter X,Y,Z position, size 4.5 Enter lenght segs and width seg then click on top view and click Create button. 4.6 Now you can enter name of zone.

  5. Repeat operation 4 for all four zone and make sure to use the right Patch/Zone names and their position are correct.

  6. Deform the Patches as you like using the Edit Patch modifier, a standard tool in Max.

  7. Save your max file because you cannot modify zone after convert !!!!

  8. Find the NelConvert modifier in the MAX menu, apply it to all the patches.

    3dmaxzone2.jpg

    8.1 Select the zone you want to convert. 8.2 Select modify. 8.3 Select More , then a list appear , select Nel Convert.

  9. Apply Nel Convert to all 4 zone.

Paint zones lanscape

You must have created your own tile bank or downloaded snowball tile bank. Don't forget to set absolute path of bank with the tools tile_edit before select it under 3D studio.

  1. Now select your tile bank you have. The Tile Banks hold all textures, transition maps, displacement maps (for making geometric noise) and info about what vegetations set is connected to tiles. Follow number on screenshot

    3dsmaxtilebank.jpg

    1.1 Select utilities. 1.2 Select More, a list appears, select Nel Tile Bank. 1.2 Click on button named "click to choose a bank" and find your "file.bank". Button is renamed "Bank".

  2. Select the first Patch you want to paint and make that selected patch fill up your Perspective View.

  3. Find and select the NeL Patch Painter ( as Nel Convert tool ) and apply that modifier to the Patch.

  4. Press the Paint button in the NeL Patch Painter, Geometry roll-out.

  5. Now you can Paint you patch with the tool that pops up.

  6. Read** /code/nel/tools/3D/plugin_max/nel_patch_paint/user_guide.txt** to know key and read paint tool documentation.

  7. Paint zone 7.1 Press F1 to go in TILE MODE. 7.2 Press Space Bar and select a snow texture. 7.3 While pressing F5 and fill the zone. 7.4 Quit tools with ECHAP key.

  8. Finish painting all your Patches.

Export zones landscape

Make sure you have installed cygwin.

This piece of documentation is quite old. Please help review it! {.is-danger}

  1. Run build_gamedata/0_setup.bat , this batch create some subdirectories and files build_gamedata.
  2. Select all zones.
  3. As you select Nel Tile bank tools, select Nel export tools: Utilities->More->Nel Export.
  4. Select all your Patches/Zones and use the Export Model function in the NeL Export tool. Save them into your build_gamedata/processes/zone/zone_exported
  5. You can close 3D studio.

Build zones

This piece of documentation is quite old. Please help review it! {.is-danger}

  1. Open build_gamedata/cfg/site.cfg and change directory name to reflect yours directories.
  2. Open build_gamadata/cfg/properties.cfg and change path of bank_name and farbank_name.
  3. Copy your .smallbank tile file into build_gamedata/processes/smallbank/smallbank. ( generate by Tile_edit from "file.bank" ).
  4. Run build_gamedata/processes/2_clean.bat. This batch clean all previous tempories files.
  5. Run build_gamedata/processes/zone/3_build.bat. This will build all *.depend and all *.welded.
  6. Run build_gamedata/processes/zone_light/3_build.bat. this will build finaly *.lzone.
  7. Run build_gamadata/processes/rbank/3_build.bat. This will build collision file ryzom.rbank and ryzom.gr.

Import into snowball

  1. Make sure snowball 2 run well !
  2. Save snowball2/data/zone directory.
  3. Copy build_gamedata/processes/zone_light/zone_lighted/*.lzone into snowball2/data/zone/.
  4. Copy **build_gamedata/processes/rbank/output/name.rbank and name.gr **into snowball2/data/pacs.
  5. Open snowball2/client.cfg.
  6. Replace StartPoint line by StartPoint = { 2240.0, -1280.0, 0.0 } ; ( Middle of our 4 zone we built)
  7. Replace RetrieverBankName = "snowballs.rbank"; by RetrieverBankName = "ryzom.rbank" ;
  8. Replace GlobalRetrieverName = "snowballs.gr"; by GlobalRetrieverName = "ryzom.gr";
  9. Replace InstanceGroups = { ... all ig file }; by InstanceGroups = { } ;
  10. Save client.cfg
  11. Run snowball.exe and enjoy !!!

Credits

  • Jean Philippe Neuser
⚠️ **GitHub.com Fallback** ⚠️