Latest Posts

Topic: Tools for Testing Game Graphics and Quality Assurance

chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-12-31, 15:35

This forum topic is intended for the discussion of tips, tools, techniques, etc. that a graphician can use in the development of graphic objects for use in the game.
Areas of discussion can include but not be limited to graphics standards and "How To's" for:

  • gauging/controlling object size
  • factors that can limit object design
  • color palettes
  • material libraries
  • animation
  • map elements

Well, you get the picture. face-smile-big.png


I see little people.

Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-12-31, 16:32

To start off, I'd like to create a reference tool that one could use when designing buildings and other immovable objects for use on the game board.
There are rigid size restrictions for immovables owing to the potential paths that roads may take to and around them.
To test whether a newly designed building will "fit" well, currently I have needed to actually start up a test version of the game after placing the new building's file(s) into it. Then, I have to "build" the building and construct the roads around it to get an idea of the building's impact. This time-consuming process must be repeated every time a test is desired.

While the empty_building Blender template contains a very handy reference object for constructing the 3D model, it does not allow testing of the final rendered size and map placement.

The tool I would like to create for use would be a png file which contains a 2D grid of triangles that mirrors the one used on the game board (i.e. the maps) and from which the roads are derived. That grid is described in the AboutGeometry document. The test grid would have the same physical scale and edge angles as found in the game.

This tool would then provide a handy gauge that could circumvent the need to fire up an actual game as it would require only a 2D graphics editor like GIMP.

Conceivably, one could create a square grid in the Blender template to get the angles needed, but the final rendered size would still be guess work. On second thought, a "square" grid would not produce "triangles" would it? face-smile.png

So, can someone tell me or lead me to the data I'll need to construct the gauge? Certainly, if another reference method is available, I'd love to learn about it.

EDIT: added "second thought" about the square grid

Edited: 2010-12-31, 16:38

I see little people.

Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-12-31, 17:29

After giving this idea of the gauge a little more thought and reading the AboutGeometry document closer ;), I am creating the gauge image as follows:

The document states the sides of the triangles are equal to one another and have a value of 1 which is then multiplied by a factor of 64 pixels.
It goes on to say that the "viewing angle" is such that the resulting view depicts the triangles as half as high as they are long.
So, I will create a png with grid size of 32 pixels and run my sides at 45 degrees with bases 64 pixels in length. This should give me the result I desire which is the ability to plot a hexagon the size of the plot of land on which the immovable (building) will sit.

Now the question is how are the roads plotted in reference to this triangular map grid?

Does anyone see any holes in this logic?


I see little people.

Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2010-12-31, 22:52

Here is the result, to scale, of the approach I outlined above:
map gauge
The yellow point represents the hotspot of the construction site. The red hexagon represents the path on which the closest roads could be built for small and medium buildings. The green line indicates the closest roads for a large building.

This seems to be confirmed when I overlay a screen capture from the game.


I see little people.

Top Quote
kingcreole

Joined: 2010-12-18, 11:13
Posts: 93
Ranking
Likes to be here
Location: germany
Posted at: 2011-01-01, 22:26

hey cool ^^ so how will we use it inside blender? we could add it to a 40% transparent and 100%translucent plane infront of the camera...if we could only animate renderability in blender 2.49b xDDD (sry bout that, maybe some script could work. we could add it as a standard bg-image from camera-view... when rendering it doesn´t show up and when being in shaded mode it too doesn´t but once you switch to wireframe view you can see it...) we could add that grid as a mesh too, maybe close to the camera. we then select it and in wireframe view we can see prety clearly if the model is sized correct... (another thought would be to let it snap to the ground plane from camera view and then look from the top ^^)


live is my dancefloor as long as my lag works

Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2011-01-03, 14:53

That is a terrific idea and some excellent work, chuck! Wonder why I didn't think of it face-smile.png


Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-01-03, 16:41

kingcreole wrote:

hey cool ^^ so how will we use it inside blender?

face-smile-big.png Sorry, kingcreole, this tool is intended for use with 2D renders of buildings and other immovables. It would be ineffective inside a Blender model.

The existing blender templates (empty_building_template.blend and empty_worker_template.blend) in the media repository contain a "trim" object that gives a 3D outline representing the view of the camera. By making the trim layer visible and/or opening a 3D window with the camera view, the artist can keep his mesh within the limits of the camera's field of view while working in Blender. It is not until a 2D frame is rendered however, that a precise cropping and scaling of the image can be performed.

That is where this gauge is intended to be used, i.e. as a transparent 2D layer that can be superimposed over an image in a 2D graphics editor to determine if the object will extend over any roads when added to a map or built on the game board.

You might think of it as a land survey showing the property lines of the construction site. (We don't want to build our house so large that it ends up in the middle of the street. That could cause trouble with the local building inspector if not the traffic police!! Besides, our carriers might rebel if we make them walk into the side of buildings all the time. They may make it appear painless, but YOU try it!) face-grin.png

Hope that clears things up.


I see little people.

Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-01-31, 20:31

FYI - SirVer has been kind enough to provide a lua script that gives the ability to place a specified building(s) (populated with workers) onto a game board while running in debug mode. This will be useful for testing 2nd and 3rd-generation buildings without the need to go through constructing prerequisite buildings and ensuring availability of appropriate workers.
It is self-documented and can now be found in the graphics/tools folder of the media trunk. Again, this script can only be used in a debug build of the game.
Thanks again, SirVer!


I see little people.

Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2011-02-01, 10:10

My pleasure, chuck. Glad to be of service from time to time.


Top Quote
chuckw
Avatar
Topic Opener
Joined: 2010-03-15, 15:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2011-03-10, 15:37

New terrain palettes can now be found in the widelands media repository as of rev#150.
They reside in the ~/graphics/tools/ folder and contain samples of each of the terrains found in all of the worlds.
Using these should circumvent the need to start up a game just to gauge how an object will appear against the different terrains on the game maps.

Here is how I would use them:
1) open an image of the new object in GIMP or your preferred 2D editor
2) open one of the terrain palettes in your editor
3) copy the image to a new layer in the terrain palette
Now you can easily move the object over the various panels to see how it will compare to those terrains in the game!


I see little people.

Top Quote