Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tipsandtricks [2019/10/03 13:58] – [Polygon count] admintipsandtricks [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Useful tips and tricks ====== 
-===== Models ===== 
-==== Skinned mesh ==== 
  
-You should use only a single skinned mesh for each character. The rendering time for a model could roughly double as a result of using two skinned meshes in place of a single mesh and there is seldom any practical advantage in using multiple meshes. 
- 
-==== Materials ==== 
- 
-Use as few materials as possible 
-You should also keep the number of Materials 
- on each mesh as low as possible. The only reason why you might want to have more than one Material on a character is that you need to use different shaders 
- for different parts. However, two or three materials per character should be sufficient in almost all cases. 
- 
-==== Bones ==== 
- 
-Use as few bones as possible. 
-A bone hierarchy in a typical desktop game uses somewhere between 15 and 60 bones. The fewer bones you use, the better the performance will be. You can achieve very good quality on desktop platforms and fairly good quality on mobile platforms with about 16 bones. Ideally, keep the number below 30 for mobile devices, and don’t go too far above 30 for desktop games. 
- 
-==== Polygon count ==== 
- 
-The number of polygons you should use depends on the quality you require and the platform you are targeting. For mobile devices, somewhere between 300 and 1500 polygons per mesh will give good results, whereas for desktop platforms the ideal range is about 1500 to 4000. You may need to reduce the polygon count per mesh if the game has lots of characters on screen at any given time. 
- 
-==== Changing Position, RotationAngle or Scale ==== 
- 
-Changing one of the transformation settings of a 3D scene object initializes rendering each time. 
-So, when you're manipulating more than one object or property this could lead to very bad performance. 
-Due to that, GorillaViewport provides the BeginUpdate and EndUpdate methods. 
-Encapsulate your transformations to increase performance. 
- 
-<file pascal> 
-procedure TForm1.Timer1Timer(Sender: TObject); 
-begin 
-  GorillaViewport1.BeginUpdate(); 
-  try 
-    GorillaCube1.RotationAngle.Y := GorillaCube1.RotationAngle.Y + 5; 
-    GorillaSphere1.Scale.Point := GorillaSphere1.Scale.Point + Point3D(0.1, 0.1, 0.1); 
-  finally 
-    GorillaViewport1.EndUpdate(); 
-  end; 
-end; 
-</file>