## The role that Materials and Textures play in CGI

I once had a friend, who had asked me what the difference was, between a Texture, and a Material, in CGI. And as it was then, it’s difficult to provide a definitive answer which is true in all cases, because each graphics application framework, has a slightly different definition of what a material is.

What I had told my friend, was that in general, a material is a kind of node, which we can attach texture-images to, but that usually, the material allows the content-designer, additionally, to specify certain parameters, with which the textures are to be rendered. My friend next wanted to know what then, the difference was, between a material and a shader. And basically, when we use material nodes, we usually don’t code any shaders. But, if we did code a shader, then the logical place to tell our graphics application to load it, is as another parameter of the material. In fact, the subtle details of what a material does, are often defined by a shader of some sort, which the content designer doesn’t see.

But, materials will sometimes have a more-powerful GUI, which allows the content-designer to connect apparent nodes, which are shown in front of him visually, in order to decide how his texture images are to be combined, into the final appearance of a 3D model, and this GUI can go so far as to display Nodes, visible to the content-designer, that make this work easier.

My friend was not happy with this answer, because I had not defined what a material is, in a way that applies to ALL Graphics Applications. And the reason I did not, was the fact that each graphics application is slightly different in this regard.

Dirk

## Wings 3D Has a GUI Problem on my builds of Linux.

In keeping with my recent theme, of testing various 3D editing applications available under Linux, I next tried out “Wings3D”, which is available in the Debian repositories / package manager.

And one detail which I found frustrating, was that some of the dialog boxes – if not all of them – have problems displaying correctly on the current build of Linux.

I get the impression that Wings3D is actually quite powerful. But unless the Right-Mouse-Button (‘RMB’) clicks reveal their full Context Menus, it can be hard to get started with this application.

There was just a specific exercise which I undertook this evening, which was to try assigning a custom material – and therefore an arbitrary texture image – to an arbitrary 3D model, even in a situation where the texture image made no sense, just to get a feel for how it’s done. While getting started with this, I learned that objects must be U,V-mapped first – which is actually nothing new. And, advanced 3D editors such as Wings3D, do have a semi-automatic U,V-mapping option. The trick is for a person who has never used Wings3D before – actually to find it!

We can select a model to work on, and then we’re supposed to RMB, and from the context-menu, pick the ‘UV-Editor’. The problem with my build of Linux is, that the last entry of the context-menu is actually this option, and it doesn’t display correctly! Instead, in its place, all we get to see is a dot. When I’m looking for a UV-Editor option in a context-menu, to UV-Edit a specific model, I don’t usually think, that the entry which is actually displaying As A Dot – Is It.

Once I discovered this detail, I was able to make progress by trial-and-error.

There is a way for users in general to make out the entries in the Wings3D context menus, that are not being displayed correctly, and that is to hover over those entries, and to observe what the bottom, green bar tells us. It will update, and display information about how to use the menu-entry being hovered over – including what that entry is called !

Dirk

(Edit 08/24/2017 : )

For Debian / Jessie, the package manager only offers version 1.5.3 . But we can actually install version 2.1.5 quite well, from the Web-site.

## CSEditing

In This Posting, I wrote that I had completed my testing of ‘Crystal Space 2.1‘ on the laptop I name ‘Klystron’ – for now, by installing the ‘Blender‘ add-on script, that would actually allow a user to create content.

But there was yet another facet of this open-source game engine, which I have not yet tested. This is the ‘CSEditing‘ extension. On the surface, this plug-in is supposed to permit in-game editing of content.

Digging a bit deeper reveals a flaw, in what my expectations were.

Crystal Space is not a game, but a set of libraries with an API, that allows its users to create games, but which also allows its users to create any type of application, which will then benefit from complex 3D-graphic output. If such a game or application has in-game editing, it will be because individual users gave their creations this ability. It is not as if any of the CS demos actually show off this ability, and thus, there are few or no 3D applications yet written, that use this additional API.

When we compile the libraries that comprise CSEditing, we also compile an executable – a run-time program, which is meant just to prove that the API exists and can be used from an application. This actual run-time is not in itself a comprehensive editor.

In fact, the loading of the shared libraries, which make this feature work, still needs to be taken care of by the user, who wants to use Crystal Space in C++ to create his application. AFAIK, CSEditing does not depend on the Crystal Entity Layer.

The actual CSEditing API only has sparse documentation, which would be very valuable in the future, seeing as users will be trying to integrate such an advanced feature into their indie creations. But this also seems to suggest, that this is very much a work in progress.

What the demo application does show, is the stated capability of subdividing the window into panels, each of which either display a 3D view, or which display certain types of information panels, and which can be used to select elements of the 3D scene. Based on this last capability, a C++ program should also be able to grab more properties from each of the selected nodes, than this scant run-time does in practice.

But then, this run-time only display certain information about ‘the scene graph’ as it were, without allowing its user to edit anything. It would be up to the user himself, to design a better application that uses this API.

And so, users like me are more likely just to appreciate such full-featured applications as Blender, to do actual editing. Without targeting an audience ourselves, with a transferred ability to edit content.