HOME ARCHIVES LINKS MAIL BANNERS MAP
francais anglais
MUSIC - MAO
2D/3D CREATION
COMPUTER SCIENCES
DOWNLOADS




PC-INFOGAME.COM: Making-of: Modelling

Some paper in the 3D

The modelling of environment intervened long afterwards the coding of game. It is indeed essential to have an engine of robust and stable game rather than an unusable splendid decor. A simple test environment was created to test the quality of the engine.

The first stage was to define objectives apparently, that is to say to list all elements to be modelled to have an idea of largeness and of feasibility of job. It is unthinkable to launch without reflexion in 3DS Max, the majority of the objects to be modelled must be drawn on paper to define the approach of modelling. Many photographs were used as model.

Modelling was made at several time:
  • Creation of the central place of the observatory
  • Creation of the warehouse
  • Creation of the telescope, of the dome and of the observatory
  • Modelling of all objects of the decor
Some rules were defined:
  • To a model a.max file. Corresponds in other words every object is modelled in a separated file.
  • Models will be exported of 3DS Max thanks to the plugin PandaExporter.
Let us see some photographs and used plans:

Observatory

Telescope

Bench

Fountain




The modelling of the decor with 3DS Max

It was not a matter to model objects in high resolution, the number of polygons being of a primary importance in a game. It is therefore a question of establishing a compromise between graphic quality and complexity of the model. Modelling method low-polygon was used, objective being to create models with the minimal number of faces to speed up the return.

In 3DS Max, every object was modelled by using the metre as reference unit. This allows to create consistent objects in term of dimensions. Every model (warehouse, observatory) was at origin a simple cube. In low-polygon modelling, the same tools are often used. It is notably of: extrude, slice, bevel, chamfer, tesselate that is to say the majority of the orders available in mode Edit_Poly. On the whole, from a simple primitive, objective consists in drawing at first, the outlines of walls, doors (=un type of plan) by using mainly the tool slice polygon. Every serrated portion is then extrudée to show a volume. When the total form of the object is got, it is possible to refine the details of the decor.

Once ended modelling, it is necessary to think very early of the application of textures. Materials of type " Multi / Sub-Object " were created and applied to the model. It is then necessary to define groups of polygons is linked to which material identifying (Material - Jeu IDEM) a. Every material must then be defined with modifier UVW Map.

Some examples of modelling:

Warehouse

Observatory




The modelling of objects with 3DS Max

Once created environment it is possible to make it more realistic by adding different objects. As these elements are intended to be added in the physical engine (the player will be able therefore to intéragir with), every object must be modelled séparemment. They cannot be included of a définive way in the decor.

Every decorative element (barrel, bench) was modelled séparemment (in a.max file). As these objects are intended to be moved, it is primordial to define correctly their spindle point. During the export of a model, 3DS Max considers the origin of the grid (the point of co-ordinates (0, 0, 0) as the point of spindle of the object. Every object is therefore centered on this point.

The objective, as for the decor, is to model a maximum of objects not very fond of good food in term of polygons.

Chair Office Doors
Cases Support Reservoir
Palette Lamp Garage




The assemblage of final level and constitution of a database

Every element of the decor was therefore entirely modelled in a file separated then exported, it is possible from now on to put the whole together to form game environment. This stage consists in fact in positioning every element in the decor to recover its co-ordinates (=position). By using order "Queue / Merge", all elements are one after another added and positioned in the decor. This gives a total outline of environment.
To position every object in a graphic engine, it is necessary to have two types of information:
  • Co-ordinates: position of the model in the space (X, Y, Z)
  • Rotation angles: direction of the model (X, Y, Z)
A database was envisaged to stock this information which will be used during the load of level. Only, how feed this database when environment includes several hundred of objects? Not having solution at disposition, I encoded my own script under 3DS Max. His functioning is the following: they choose all the models from which they want to get co-ordinates and the plugin generates a text file with délimiteur including the name of the model, its group, its co-ordinates, its angles... It is even possible to export objects at the same time (by positioning the model automatically at the origin of the grid, by abolishing any rotation). The generated file can therefore be very easily imported under Access to fill a table.

To test script, click here:

In Singularity, it is possible to count about 25 doors, 115 physical objects with which can intéragir the player. In game, the decor represents about 45 000 polygons and objects / entities, 15 000.


Final level

Final level




The lightmapping with Gile [s]

When modelling is ended, it is interesting to bring a key of realism in environment by adding effects of light. This stage of lightmapping was accomplished with Gile [s] for several reasons. With Dark Basic Pro, there are two solutions to show a decor with lightmapping:
  • Load two models in the format.X which is stacked. The one represents the modelled decor and other one is a precise retort with only textures corresponding to the effects of light (=lightmap). An effect of transparency must be applied to the second model. Disadvantage is major since the use of the model in duplicate double numbers it of polygons.
  • Dark Basic Pro has his own format (.dbo: dark object BASIC) who, him, supports an additional layer for a lightmap. In other words, for the same model, the file includes original textures and lightmapping.
Gile [s] supporting favourable.dbo format, the lightmapping was therefore accomplished under this software.

The use of this editor am rather easy. It is enough to position and to define different sources of light then to throw a return to generate the lightmap. The choice of the number and of the resolution of lightmaps must be a compromise between visual quality and requested memory. So, it is necessary to know that it is recommended to use two of resolution lightmaps 512*512px rather than the only one of 1024*1024px.
The lightmapping of environment required 70 sources of light (40 for the warehouse and 30 for the observatory). Some modifications at the hand were necessary to correct some shadows and defects of the return.

Warehouse


Observatory




Some shaders

Shaders is today inevitable, he adds interesting effects which are directly calculated at the level of the processor of the graphic card. There are two types of shaders:
  • Pixels Shaders: they act at the level of the colour of a pixel. It is about a visual effect (cartoon shader...)
  • Vertex Shaders: they change the form of the model by playing on summits (vertex): water for example.
Dark Shaders is a practical tool to use shaders very easily in a project Dark Basic Pro. Singularity notably includes the shader Bloom which consists in applying an effect of luminous fuzziness to environment. Effect of bloom is very used in current games and notably in game Oblivion. Let us see some uses of this shader:


Shader: Bloom

Shader: Bloom


- COPYRIGHT 2008/2009 - ALL RIGHTS RESERVED - WEBMASTER : UDUN (GIRARD CYRIL) - DESIGN PAR : ANTYOZ