Category Archives: News

All the news relative to the world of computer programming and informatics in general.

One year without posts but still alive. Update and news

I just realized that I didn't post anything in this website for more than one year. Anyway, this is not actually the mirror of my activity so far. As always, I was very busy with my actual job but I found anyway some time to continue my private projects, in particular the TextureMind Framework. I really need to write some post here in the future for updating the situation. I perfected the serialization and the graphics context, making an implementation with the cairo library and the first example test.
Now the context is able to draw complex structure of primitive 2D shapes along materials and textures. I'm writing also an Engine that will be part of the framework and it will have great features. I implemented most of the architecture for 2D and 3D scenes, like textures, materials, shaders, assets, scripts, animations. I refactored my old material format for covering modern features, I got inspired by Unreal Engine 4, with some improvements.

Textures can be created starting from images, but also with fixed shaders and program shaders. A fixed shader texture depends on the context implementation and it's not programmable, but it should produce consistently the same output between different implementations, while a program shader texture can be programmed in GLSL or HLSL languages.

As you can see in the picture, the rounded box with holes is drawn with cairo libraries using a linear pattern, that in my framework is considered a 2D texture with a fixed shader. The same texture can be drawn also with OpenGL, DirectX or Vulkan implementation of the context. In this case, the fixed shader is translated into GLSL or HLSL code and executed by the graphics library.

This abstraction has been introduced to support basic functionality when advanced graphics libraries are not available. With Cairo we don't have program shaders and linear or radial shader textures can be translated into linear and radial patterns to make the rendering possible. On the contrary, program shader textures cannot be rendered because Cairo don't have program shader functionality at all. This abstraction is useful if you want to reuse the same context API for basic functionality, like software rendering of the GUI for the application.

Materials are more complex but they use similar concepts for being extremely scalable. First of all, I decided to abandon the old format similar to 3D Studio Max or Maxon Cinema 4D to adopt another format more similar to UE4 that is based on Visual Expression Nodes, where one node in this case is called "material component". A material is composed by different stages: displacement, fragment, blend and radiance. Every stage has parameters and a single component in input, that can be a texture with texture coords, diffusion with lights and normals or the combination of more components with "add" or "multiply" nodes.

If program shaders are supported by the context implementation, the material is translated into a program shader, otherwise it will be rendered as best as possible, with the component types supported by the graphics library. In the case of cairo, program shaders are not available and only texture components are supported. In this case, a single texture component is passed to fragment stage as input, like in the following diagram:

To draw a simple image with Cairo like the background in the example test, a material can be created with just a texture image attached to the fragment stage. If a feature is not available in the context implementation, the rendering won't be produced but no error will be generated. You can try to render a 3D scene with Cairo (and not OpenGL): in this case only 2D shapes will be rendered and not meshes with polygons,  complex materials and program shaders, that are not supported. On the contrary, advanced graphics libraries like OpenGL are always able to render scenes with lower features. An OpenGL context should be always able to render a simple 2D scene, like the one showed in the example. In the same way, the GUI can be rendered via software with Cairo libraries or via GPU with OpenGL libraries. However, advanced functionality are not mandatory for the graphics engine to work. In this way, the engine can be scaled from the pac-man clone to the latest 3D games with ray tracing functionality.

Now I'm proceeding with the implementation of the graphics engine and I'm pretty excited. The next step is to write an implementation of the graphics context with OpenGL, Direct3D and Vulkan, improving the 3D engine. Most of the 2D engine will be used to implement the GUI. I will implement a converter for importing assets with assimp library. I want to write also a series of posts about the missing progresses that I made during development of the framework in the last year.

TextureMind progress #1 – Serialization and log

I continued to program the TextureMind Framework and I'm pretty happy with the result. I wish that this framework will give me the chance to increment the production of my software and to save most of the time (because I don't have it). People told me many times to use already existing frameworks to produce my works, and I tried. Most of them are not suitable for what I want to do, or maybe they have issues with the licenses or simply I don't like them. I want to make something new and innovative, and I feel like I'm about to do it.

- Serialization

Let me say that the serialization is a master piece. You can program directly in C++ new classes with a very easy pattern, save and load all the data into four formats: raw (*.raw), interchangable binary (*.tmd), human readable xml (*.xml) and json (*.json).

Continue reading

I’m an Amazon inventor now

After only 6 months since I became an Amazon employee, I received this piece of puzzle where it says that I'm an Amazon inventor. I always had ideas in my mind since the early age, so it doesn't surprise me: sooner or later it had to happen.

img_1856

The piece looks solid, well-made, glittering on my desk. Very nice!

Do you want to work for NICE/Amazon? We are hiring!

Hi. Since NICE was acquired by Amazon I became part of the Amazon EC2 and its team in the world. Me and my collegues are working hard to improve our High Performance Computing and remote visualization technologies, which basically require advanced C/C++ programming skills and a deep knowledge of the OpenGL libraries. If you meet the requirements and want to be part of our world-class team, check our current offers here:

https://www.amazon.jobs/it/locations/asti-italy

In addition to the skills listed in the announcements, the candidate must make a moderate use of modern C++ features and third-party dependencies (e.g. the use of high-level frameworks like QT or boost is justified only if it brings real benefits to the project and not to skip programming). know how to manage device contexts, choose / set pixel formats / fbconfigs, destroy / create rendering contexts, set the default frame buffer or FBO as rendering target, use graphics commands to render frames with multiple contexts running on multiple threads, without performance issues. A good knowledge of Desktop OpenGL specifications (from 1.0 to 4.5), deprecation and compatibility mode is required (e.g. the candidate must know that some OpenGL functions can be taken with wgl / glXGetProcAddress instead of using blindly a loading library like glew). If you have concerns or questions, do not hesitate to contact me. Regards.

Develop in C# for mobile with Xamarin, now it’s free!

Recently Microsoft decided to include Xamarin into Visual Studio, also into the free version. This means that from now you can use the C# language with .NET / Monodevelop framework to develop crossplatform applications with the support not only for Windows, Linux and MacOSX, but also for Android and iOS!

Before this news, you had to pay for Xamarin, but now it's free (with certain conditions, visit xamarin.com). If you didn't want to pay for it, the only way you had to support mobile devices was to rely on existing frameworks, like Qt, Unity and Oxygine, or produce extra code with Android SDK and xCode. The problem is that all these solutions use different kind of languages. Qt and Oxigine are C++, Unity is a 3D engine that uses C# scripts,  Android SDK and xCode for iOS are mostly Java oriented. If you wanted to support multiple platforms before, you had to change your habits to adopt a solution (even if you didn't like it) to cover an high range of machines. Now you can continue to develop your project with Visual Studio in C# and then decide to convert part of your project to make a mobile app using the same framework, with a little bit of effort for the platform specific features. If you want to develop an app in short time and share it to the world, Xamarin will make your life easier.

Nice acquired by Amazon Web Services

nice_amazon

It's a while that I don't post anything on this website, mainly because the society where I work (NICE s.r.l.) was acquired by Amazon.com and I was very busy with my job. Now I can say that I'm part of the AWS team: this is great because in this way I have the opportunity to work with great people, improving my programming skills. This doesn't mean that I will not work on my own projects too, in my spare time. I'm still working on my cjs framework project that is going on very well, I almost finished the serialization part getting great performances. So stay tuned, that the best is yet to come. Thanks for your attention.

Version 5 of GemFinder is work in progress

After thinking for a long time, I decided to produce the 5th edition of GemFinder using the brand new CJS framework. It's still a project in its infacy but I'm pretty sure about the new features that this program will have (if you like the genre, this is going to be amazing). The huge news is that the software will be crossplatform and totally programmable in it's main components: screen capture -> image analysis -> decision maker -> input repeater.

It works exactly in this way:

- Each component implements a default algorithm to make the program work. If you use the default component, you have to do nothing at all.

- If you are a software developer, you can change the internal code with a JIT language and save the source code in the configuration file. Like a shader, you don't need to build the source code.

- The JIT language is basically C and allow you to dynamically link an external library, so you can implement your own algoritm in another existing language (using directx, opengl, opencl...).

- You are not forced to reprogram all the components by scratch, so you can change only the components you want to.

Continue reading

CryEngine 3!

The version 3 of CryEngine is the porting of the version 2 for the world of consoles, supporting both Playstation 3 and Xbox360 (but still compatible with the PC). Check the following video to figure out the new features.

HD Web: Tv internet ad Alta Definizione

Basta connettersi al sito www.thehdweb.com per entrare nel mondo della tv via internet ad alta definizione. Per il momento è solo un progetto sperimentale, ma sembra promettere molto bene, soprattutto se date un'occhiata ai video di presentazione del sito. Se avete una connessione ADSL, un buon computer ed un televisiore hd, vi consiglio vivamente di acquistare un bel connettore VGA, connettere il pc al televisore HD e spararvi i filmati di questo sito a tutto schermo: il risultato è davvero impressionante. La miglior televisione da gustare connettendo un pc al televisore, grazie a siti e iniziative come questa, devo dire che dopo tanto tempo sono riuscito a trovare un sito internet in grado di sbalordirmi.

Requisiti per lo streaming HD

E' possibile guardare alcune piccole preview direttamente sul browser, mentre i filmati veri e propri sono disponibili in due risoluzione diverse: 720p (1280x720) e 1080p (1920x1080). Data l'enorme mole di dati trasmessi, per godere dello streaming video High Definition si deve possedere una connessione internet in grado di supportare una velocità di download pari a 7,5 Mbps, eventualmente sono richiesti 13,5 Mbps per la risoluzione più alta ma per una TV Hd a 32'' i filmati a 780p sono più che sufficienti.