Linux Top command for keeping an eye and process activity

Coming from a Windows environment to Linux one thing that I would often like to do in Windows is keep an eye on what is going on with process activity. In fact I would say that these days that is one of the major reasons why I am becoming more of a Linux user rather than a Windows user, because I am getting tired of things running in the background slamming my system none stop. In windows there are all kinds of background processes like windows telemetry that eat up way to much overhead, and interfere with me using my computer without issue. So far that seems to not be a problem with Linux, but still I like to have ways to keep an eye on things just to make sure nothing weird is going on.

I have wrote a post on the ps command a while back, and that would seem to be one tool in the Linux tool box when it comes to polling what the status of processes are. However there are a number of other options for this sort of thing, and one such options would be the Linux Top command. So then in this post I will be going over a few quick examples of using the linux top command as a way to see what is going on with Linux processes.

Read More

A dae tools module threejs example

I have been getting into loading dae files as a way to go about getting started using external files in threejs rather than just creating groups of mesh objects, and textures by way of javaScript code alone. In other words the way that I have been creating models for threejs up to this point was with the built in geometry and material constructors to create groups of mesh objects, and then having methods that mutate the position, rotation, and scale properties of these mesh objects. One of my first examples of this kind of project would be my guy one model that I started a long time ago. I do still like those kinds of models and I also think that it is a good starting point at least when it comes to creating objects to work with in a scene, however I would like to start working on some kind of stepping stone from that to a more professional kind of model.

So a more advanced kind of model might be something where I am at least creating custom geometry, complete with uvs and textures with a program like blender. However maybe still creating animation that same old way that I have done so thus far by writing some javaScript code rather than getting into animation clips, but thus is a start at least for sure. In order to get started making these kinds of models I will want to chose some kind of container format, such as the default format when exporting from blender which is dae, also known as the Collada format. The dae format is a great starting format, for one thing I would say that it is very front end developer friendly as it is a plain text rather than a binary format which is often the case with a lot of the other options.

In this post then I will be going over what I have thus far when it comes to a set of tools that have to do with loading, and processing the results that are loaded from a dae file. This will then be another one of my threejs project example type posts only this time it is more about just a single module rather than a full project of some kind.

Read More

Making a normal map in threejs

In threejs there is the normal attribute of a buffer geometry instance which will come into play when it comes to figuring out how light should effect a surface. The normal attribute is also used for things like finding out what side of triangle should be the front side so that one does not have to always render triangles on both sides thus wasting resources. So then this normals attribute is an important part of creating a custom geometry which in my view is what I typically think of next after working out the position attribute of a geometry. The position attribute as the name suggests is the actually points in space of the geometry.

So then in todays post I will be writing about a special kind of texture map that can be added to some materials that can be used to adjust lighting called a normal map. A normal map is just one of many options to work with when it comes to the various kinds of texture maps such as emissive maps, alpha maps, and just plain old color maps. I can not say that I use normal maps that often thus far, but this is still a topic of interest when it comes to threejs in general so I took a moment to work out some examples and write this post.

Read More

The normal material in threejs

One of the materials that I might use as a kind of place holder material in threejs would be the normal material, in fact I often seem to use if for that kind of task. One nice thing about it is that it is a way to quickly show some depth without having to do much of anything with textures and light sources. This is not the case when using the basic material, which is the default material for a mesh, as it is just going to show up as a solid blob of color when just the color option is used. Other options such as the standard material will require a light source in order to show some depth. However there are still a few other options for the task of having a simple place holder material such as the depth material, or doing some kind of quick trick with lines as a child object or something to that effect.

The normal material will render colors to the faces of a geometry by way of the state of the normal attribute of the buffer geometry geometry instance used with the mesh object. The normal attribute is an array of values that corresponds with the position attribute that is used to set an alternative direction independent of the state of position attribute of a geometry. The position attribute mind you is the attribute that holds the state of the actual points in space. The normal attribute is then a must have attribute when it comes to using this normal material, most built in geometry constructors will create this for you. However there are some cases in which the normal attribute might need to be mutated, or created in the first place.

The normal material can be used as a way to find out if there are problems with the normal attribute of a geometry as there is a certain look that an object should have when using it. However it might not be the best tool for the job as there are other things to work with in the core of the threejs library such as arrow helpers. In addition there are additional external files that can be used on top of threejs that will add a kind of normal helper which might be the best tool for debugging normal attributes of geometry.

Read More

Emissive maps in threejs

There are a lot of texture maps that can be used with the various materials in threejs, such as using a basic diffuse color map with the basic material, or an alpha map to set transparent areas. I am not sure if I will ever get around to writing posts on every kind of map there is to be aware of in threejs, but there are some that really stand out for me more than others, and one of these map options is an emissive map.

When I am working with a material that will respond to a light source such as the standard material, there is the color property of the material that can be used to set a base color for the material. This color property will work a little different with the standard material compared to other materials like the basic material in that the color will only show up when there is some light in effect. So then there should be some kind of color property that will work with the standard material in the same way as the color property in the basic material in that it can be used to set a color that will always show up regardless of what the situation is with lighting. This is where the emissive property comes into play to set a color that will always show up.

However there is not just thinking in terms of simple solid colors for mesh objects, there is also getting into textures. With the basic material there is using the map property as a way to set a simple color map. When it comes to the standard material, there is also a map property but as with the color property it will only work with light. So then there is also the emissive map property that can be used in place of the map property when compared to the basic material. With that said the color, map, emissive, and emissiveMap options can be used to set the base color and textures in terms of what will respond to light, and what will always show up. Of course there is a whole lot more to this when it comes to yet even more material options, as well as other related topics that have to do with geometry. However in this post the main focus will be on emissive maps.

Read More