JeGX HackLAB


Archive for July, 2008

PhysX Control Panel

without comments

I don’t know how but I can no longer start .cpl files. CPL files are also called control panel applet and can be started directly in command line. You can find more information about cpl file here.

What I wanted to do is to start PhysX.cpl to display PhysX Properties. After some searches, I found the solution. Just enter control followed by the cpl file in the run box of Windows:

control PhysX.cpl

and you should get this:

Written by JeGX

July 19th, 2008 at 3:01 pm

[English]Depth of Field[/English][French]Depth of Field[/French]

without comments

[English]
I played with Depth Of Field (DoF) these last days in the upcoming Demoniak3D but I’m not very satisfied because I still have some problem to control the focus (the non blurred part of the field of view). Depth of field is done in a post processing step and uses the scene color and depth maps as only inputs (no multiple render targets). Here is a first preview:


I will continue my experimentations up to get a functional DoF and will add the support of MRT (multiple render targets) in the post processing effects (MRT will allow me to explore another cool effect: SSAO…).
[/English]
[French]
Ces derniers jours j’ai fait quelques tests de Depth Of Field (DoF ou Profondeur de Champ) avec le nouveau Demoniak3D mais je ne suis pas satisfait du resultat car j’ai encore quelques petits soucis pour controler le focus (la zone du champ de vision qui est nette). Le Depth of field est fait dans une étape de post processing et utilise comme seules entrées la texture de couleur de la scene (scene map) et celle de la profondeur (depth map). Cet algo n’utilise pas les MRT (multiple render targets). Voilà un petit aperçu:


Je vais continuer mes expérimentations jusqu’à obtenir un DoF opérationnel et ajouter la gestion des MRT (les MRT me permettront d’explorer un autre effet bien sympa: le SSAO…).
[/French]

Written by JeGX

July 17th, 2008 at 8:09 am

[English]Gamma Correction[/English][French]Correction Gamma[/French]

with 2 comments

[English]
I’ve coded today a small gamma correction filter in Smode. I’ll talk about gamma correction a little bit more very soon with a Demoniak3D demo. Here is the result on a simple scene: a teapot lit with a Phong shader.

The following image shows the rendering of the scene done in the usual manner, I mean without gamma correction:

and now the same scene gamma-corrected (factor 2.2):


[/English]
[French]
Je suis amusé aujourd’hui à coder un petit filtre de correction gamma dans Smode. Je parlerai de la correction gamma un peu plus en détail très prochainement avec une petite demo Demoniak3D. Mais en attendant voilà le résultat sur une scène simple: une teapot éclairée avec un shader de Phong.

L’image suivante montre le rendu de la scène faite de manière classique c’est à dire sans correction gamma:

et voici le rendu avec la correction gamma (facteur gamma de 2.2):


[/French]

Written by JeGX

July 11th, 2008 at 3:43 pm

[English]Multithreaded Build with Visual Studio 2005[/English][French]Build Multithreadé avec Visual Studio 2005[/French]

with 3 comments

[English]
Under Visual Studio 2005 (VC8), you can enable the multithreaded build of projects. This great feature makes it possible to use several CPUs to build your projects. This is a per-project setting and it’s done in command line: /MPx where x is the number of cores you want to use. Example: /MP2 to use 2 CPUs if you have (like me) a core2duo.

I’ve done some tests with Demoniak3D:
- Demoniak3D (default): Build Time 0:33
- Demoniak3D (/MP2): Build Time 0:15

Great boost in productivity of large projects!
[/English]

[French]
Sous Visual Studio 2005 (VC8) vous pouvez activer le build multithreadé des projets. Cette super fonctionnalité permet d’utiliser plusieurs CPUs pour builder vos projets. C’est un régalge par projet en ligne de commande: /MPx où x est le nombres de cores que vous voulez utiliser. Exemple: /MP2 pour utiliser 2 CPUs si vous avez (comme moi) un core2duo.

J’ai fait quelques tests avec Demoniak3D:
- Demoniak3D (default): Build Time 0:33
- Demoniak3D (/MP2): Build Time 0:15

Gros boost de productivité surtout pour les gros projets!
[/French]
[-source-]

Written by JeGX

July 10th, 2008 at 1:49 pm

Alarmes de Kaspersky avec FurMark

without comments

Certains utilisateurs ont rapporté que FurMark 1.4.0 est infecté par le cheval de troie Trojan-Downloader.Win32.Agent.vpx. J’ai fait ce matin (car c’est vrai que j’ai rien d’autre à faire de mes journée – merci kaspersky…) le scan avec la dernière version de Kaspersky et la toute dernière mise à jour de leur base de données. Kaspersky n’a trouvé aucune menace ou cheval de troie dans l’installer de FurMark ni dans son répertoire d’installation. FurMark est sain. MajorGeeks et Softpedia sont de bonnes preuves de la bonne santé de FurMark.

J’ai fait quelques recherches sur le Net et j’ai trouvé d’autres utilisateurs de Kaspersky qui ont le même problème. Je pense que le problème vient d’InnoSetup (le programme d’installation utilisé pour créer FurMark_Setup.exe) et dépend de la version de la base de données de Kaspersky. Donc si vous avez l’antivirus Kaspersky, soyez sur d’être à jour.

J’ai envoyé le FurMark_Setup.exe au Kaspersky Lab et je viens de recevoir la réponse du Virus Analyst: “I suppose it WAS a false alarm, and it has been already fixed.”
Donc tout est ok.


Some users have reported that FurMark 1.4.0 has the Trojan-Downloader.Win32.Agent.vpx. I did this morning the scan with the latest version of Kaspersky and the very latest version of their database. Kaspersky hasn’t found any threat or trojan in FurMark setup installer nor in FurMark root directory. FurMark is clean. MajorGeeks and Softpedia are very good proofs of FurMark’s cleanness.

I did some searches over the Net and I found that others users have some false alarms. I guess the problem comes from the InnoSetup (the utility used to create FurMark_Setup.exe) and depends of the version of Kaspersky’s database. So if you have Kaspersky antivirus, be sure to update it with the latest database.

I sent FurMark_Setup.exe to Kaspersky Lab and I just receive the reply from the Virus Analyst:
“I suppose it WAS a false alarm, and it has been already fixed.”
This time everything is ok!

Written by JeGX

July 10th, 2008 at 12:15 pm

Saturate function in GLSL

with 6 comments

During the conversion of shaders written in Cg/HLSL, we often find the saturate() function. This function is not valid in GLSL even though on NVIDIA, the GLSL compiler accepts it (do not forget that NVIDIA’s GLSL compiler is based on Cg compiler). But ATI’s GLSL compiler will reject saturate() with a nice error. This function allows to limit the value of a variable to the range [0.0 - 1.0]. In GLSL, there is a simple manner to do the same thing: clamp().

Cg code:

float3 result = saturate(texCol0.rgb - Density*(texCol1.rgb));

GLSL equivalent:

vec3 result = clamp(texCol0.rgb - Density*(texCol1.rgb), 0.0, 1.0);

BTW, don’t forget all float4, float3 and float2 which correct syntax in GLSL is vec4, vec3 and vec2.

Lors de la conversion de shaders écrits en Cg/HLSL, on trouve souvent la fonction saturate(). Cette fonction n’est pas valide en GLSL bien que sur les NVIDIA le compilateur l’accepte (n’oublions pas que le compilateur GLSL de NVIDIA repose sur le compilateur Cg). Mais le compilateur GLSL d’ATI générera une belle erreur à la vue de saturate(). Cette fonction sert à limité la valeur d’une variable entre 0.0 et 1.0. En GLSL il y un moyen tout simple de faire la même chose: clamp().

Code Cg:

float3 result = saturate(texCol0.rgb - Density*(texCol1.rgb));

Equivalent GLSL:

vec3 result = clamp(texCol0.rgb - Density*(texCol1.rgb), 0.0, 1.0);

Au passage lors des conversions, n’oubliez pas les float4, float3 et float2 qui s’écrivent en GLSL en vec4, vec3 et vec2.

Written by JeGX

July 9th, 2008 at 7:15 pm

Velvet Shader Preview

with 2 comments

[French]
Un petit shader GLSL de velour (velvet en anglais) ça vous dit? Et bien en voilà un, tout du moins un aperçu de celui que je viens de coder pour les besoins d’une démo avec le logiciel Smode. Smode… Un pur soft pour produire de la démo. Et le truc cool c’est les démos que je fais avec Smode seront aussi disponible pour Demoniak3D. Ne cherchez pas Smode, il n’est pas disponible au public. Seules quelques rares personnes, très sévèrement sélectionnées ont la chance de s’amuser avec. Mais vous pouvez toujours m’envoyer un mail, on ne sait jamais…

Dès que la prochaine release de Demoniak3D, la 1.24.0 (le numéro de version sera peut être le 1.30.0 vu le nombre de modifs), je releaserai la démo du velour avec son beau shader GLSL. Et si je tarde un peu, n’hésitez pas à me poster un petit message pour me rappeler à l’ordre.
[/French]

[English]
Are you ready for a small velvet GLSL shader? Here’s one, at least a preview of the one I’ve just coded for a demo with Smode. Smode… a software dedicated to create… demos! And the cool thing, is that Smode demos will be also available for Demoniak3D. Don’t look for Smode, it’s not available for you, public… Only few people on this planet are enough lucky to play with. But if you really want to touch it, just drop me an email…

As soon as the next release of Demoniak3D, the 1.24.0 (or better the 1.30.0 because of the huge amount of changes), will be ok, I’ll put online the velvet demo with its nice GLSL shader. And if I’m late, don’t hesitate to post a small message to wake me up!
[/English]

Written by JeGX

July 8th, 2008 at 11:47 am