Difference between revisions of "Modelling"

From UFO:AI
(Modelformat)
 
(One intermediate revision by the same user not shown)
Line 73: Line 73:
  
 
* see [[/Skins]] article for more information
 
* see [[/Skins]] article for more information
 +
 +
== Testing in game ==
 +
After the model is exported, you can edit the file {{path|base/ufos/seq_modelview.ufo}} (see [[pk3]]) and change the included examples to load your model. Once you changed it you can open the game [[console]] and type {{command|seq_start view}}.
  
 
==Characters==
 
==Characters==
Line 78: Line 81:
  
 
==Links==
 
==Links==
* [http://www.blendswap.com BlendSwap]
+
* {{http|www.blendswap.com|BlendSwap}}
* [http://cgcookie.com Blender Cookie]
+
* {{http|cgcookie.com|Blender Cookie}}
* [https://svn.worldforge.org:886/svn/media/trunk/3d_objects Worldforge Media Repository (gpled)]
+
* {{https|svn.worldforge.org:886/svn/media/trunk/3d_objects|Worldforge Media Repository (gpled)}}
* [http://www.jitspoe.com/tutorials/q2vwep.html Tutorial about quake2 model editor]
+
* {{http|www.jitspoe.com/tutorials/q2vwep.html|Tutorial about quake2 model editor}}
* [http://en.wikipedia.org/wiki/3D_computer_graphics_software wikipedia]
+
* {{http|en.wikipedia.org/wiki/3D_computer_graphics_software|wikipedia}}
* [http://www.cgtutorials.com/ Tutorials]
+
* {{http|www.cgtutorials.com|Tutorials}}
* [http://www.max-realms.com Max Realms]
+
* {{http|www.max-realms.com|Max Realms}}
* [http://www.simplymax.com/ Free and commercial tutorials]
+
* {{http|www.simplymax.com|Free and commercial tutorials}}
* [http://www.psionic3d.co.uk/page.php?3 Tutorials for Milkscape and Cinema4D]
+
* {{http|www.psionic3d.co.uk/page.php?3|Tutorials for Milkscape and Cinema4D}}
* [http://w3studi.informatik.uni-stuttgart.de/~bischowg/CreateMD3Tut/CreateMD3Tut.html Create MD3 Tutorial with 3DSMax]]
+
* {{http|w3studi.informatik.uni-stuttgart.de/~bischowg/CreateMD3Tut/CreateMD3Tut.html|Create MD3 Tutorial with 3DSMax}}
* [http://tfc.duke.free.fr/old/models/md2.htm MD2 Information]
+
* {{http|tfc.duke.free.fr/old/models/md2.htm|MD2 Information}}
* [http://wiki.polycount.net/3D_Tutorials/Modeling_High-Low_Poly_Models_for_Next_Gen_Games Modeling High/Low Poly Models for Next Gen Games]
+
* {{http|wiki.polycount.net/3D_Tutorials/Modeling_High-Low_Poly_Models_for_Next_Gen_Games|Modeling High/Low Poly Models for Next Gen Games}}
* [http://wiki.polycount.net/Normal_Map Normal mapping]
+
* {{http|wiki.polycount.net/Normal_Map|Normal mapping}}
* [http://www.bencloward.com/resources_tutorials.shtml Normal mapping]
+
* {{http|www.bencloward.com/resources_tutorials.shtml|Normal mapping}}
  
 
==Other programs==
 
==Other programs==
* [http://www.uvmapper.com/ UV-Mapping tool]
+
* {{http|www.uvmapper.com/|UV-Mapping tool}}
* [http://sharp3d.sourceforge.net 3D modeling program] that paint depths on to polygon models in real-time
+
* {{http|sharp3d.sourceforge.net|3D modeling program}} that paint depths on to polygon models in real-time
* [http://www.sketchup.com Sketchup.com]
+
* {{http|www.sketchup.com|Sketchup.com}}
* [http://web.axelero.hu/karpo/ 3D Object Konverter] ~440 model formats are supported
+
* {{http|web.axelero.hu/karpo/|3D Object Konverter}} ~440 model formats are supported
* [http://www.softlookup.com/display.asp?id=5003 ProgMesh] Mesh redrucer for 3ds files
+
* {{http|www.softlookup.com/display.asp?id=5003|ProgMesh}} Mesh redrucer for 3ds files
* [http://ngplant.sourceforge.net/ ngPlant] Open Source plant modeling package
+
* {{http|ngplant.sourceforge.net/|ngPlant}} Open Source plant modeling package
* [http://meshlab.sourceforge.net/ meshlab]
+
* {{http|meshlab.sourceforge.net/|meshlab}}
  
 
== Patterns & Blueprints ==
 
== Patterns & Blueprints ==
* [http://papertoys.com/ PaperToys]
+
* {{http|papertoys.com/|PaperToys}}
* [http://www.the-blueprints.com/ BluePrint.com]
+
* {{http|www.the-blueprints.com/|BluePrint.com}}
* [http://www.suurland.com/ Blueprints]
+
* {{http|www.suurland.com/|Blueprints}}
  
 
[[Category:Modelling]]
 
[[Category:Modelling]]
 
[[Category:Contribute]]
 
[[Category:Contribute]]

Latest revision as of 17:37, 1 May 2014

Introduction

3D models are used for many things in UFOAI: the soldiers, aliens and their weapons and equipment; some items on maps (trees, cars, furniture, small UFOs); and some of the icons on the geoscape.

This document will introduce you to modelling for UFOAI, but the docs are still sparse on how to get your content into the game. Feel free to share your work in the forums and ask for help getting it evaluated and implemented.

We use the MD2 format, but there are many different programs you can use to create these.

You can see a list of models that are still needed in the TODO/General#Models. We can also use appropriate additions to the available soldier models. In particular, we need lots of new heads for our soldiers, and these can be an easy way to get into modelling for UFOAI.

Style

In this game we're doing fairly hard sci-fi that has to obey at least some of the laws of physics. We want to see much more 2001: A Space Odyssey and Space: Above & Beyond style than Star Trek or Star Wars.

Dimensions

  • a player is 56 units tall
  • 8 units equals 1 foot
  • therefore, player is 7 feet tall

Creating new models

Programs

There are many programs you can use to make models. Blender seems to be used by some in the forums, so if you've never modeled you're likely to be able to get help with that program in our forums. It has the added benefit of being free.

Needed models

See the Models/Maps section in the TODO/General page or any of the other TODO pages for upcoming versions for a list of needed models.

Modelformat

We use the normal Quake2 md2 format for our models. See the md2 entry for a longer description of the format and tools that you might find useful. We even support the obj and md3 basic features.

For those who are familiar with the md3 format and the tags used to identify geometry - we even support tags for md2.

The following numbers are rough guidelines for the various upper limits. They are already a bit dated now and by no means fixed rules. You can always ask a team member if your stuff will be ok.

Level of Details

We have support for LOD models for md2 and md3. md3 has built in support for several meshes and for md2 we support loading LOD models from different files from the same directory. The md2 filenames must be like this: Normal md2 file name: model.md2 => resulting LOD model name is model-lod01.md2, model->lod02.md2, model-lod03.md2. Thus we support up to four different level of details. It's also possible to only provide model-lod01.md2 and skip the others. For md3 we are doing the same but with the built in meshes.

The LOD models are using the same textures that are already uploaded and used from the main model. You also have to ensure that the frame count matches between all provided LOD models.

In 3DSMax you can use the MultiRes modifier to generate different LOD stages for your model.

Texture sizes

  • Weapons/cars/big trees 512x512px
  • small plants/ammo: 256x256px
  • creating higher resolution textures would be the best. The preferred size for all textures is 1024x1024. If we then need them smaller, we can scale them down, but still have the high resolution version for changes and stuff like that.

Polygons

  • cars: ~700tris
  • big weapons: 200-500tris
  • ammo: ~100tris
  • characters: ~1000tris for body and ~300tris for head
  • it would also be cool if you could provide different level of details for a model (different files for each lod - filenames encoded like this: filename_lod1.md2 (high res), filename_lod2.md2 (lower res), ....)

Sizes

  • read about the levelflags UFO:AI uses, we should be able to hide some parts of a model if it is higher than one level in UFO:AI. This is why we have split some of the existing models into several smaller ones. This way we are able to set different levelflags for each modelpart in order to hide or display them as needed. For example streetlamps should be split into two parts. As an example see models/objects/construct/crane.

Skins

  • see /Skins article for more information

Testing in game

After the model is exported, you can edit the file base/ufos/seq_modelview.ufo (see pk3) and change the included examples to load your model. Once you changed it you can open the game console and type seq_start view.

Characters

See Character Animation.

Links

Other programs

Patterns & Blueprints