Teraz jest Cz 28 mar, 2024 11:52


Normal Maps - tutoriale

Archiwum działów sekcji Armed Assault
  • Autor
  • Wiadomość

topas

Normal Maps - tutoriale

PostWt 12 cze, 2007 10:00

Wskazowki dla tworcow textur; uzyskane na BiForums od Panow 's8n' i 'skaven' (dziekuje) dotyczace aplikacji Normal Maps na nasze cudne addony. Pierwsza metoda to sposob 's8n'a. Efekty jej uzycia mozna podziwiac w jego jednostkach CSLA.

NORMAL MAPS by s8n

1. download Nvidia Phtoshop plugin

2. I always reedit the BIS textures, from what i have read on biki game will notice the type of texture due the _nohq _smdi prefix, so i dont change it.

3. to create normal map convert your soldiers texture to grayscale (i know this is not the elegant and right way to do it but hey nobody pays me for this and i wont spend 1000 hours on painting whole new grayscale texture from) - run Nvidia filter (play with settings to achieve good bumps similiar to BIS ones) copy that normal map to the default BIS normal (_nohq) texture you can erase the unchanged parts and then merge it to one layer.

4. switch to chanels tab in photoshop - click on rgb chanel copy whole texture, switch to alpha chanel and paste it over it here you can add some height to texture using burn/dodge tools.

save and try it ingame

Hope this helps a bit

btw. here is a nice link about normals etc.
http://www.doom3world.org/phpbb2/viewtopic.php?t=483


A tutaj dotyczaca texturowania broni porada od Skavena (autora RACS Mercenaries)

NORMAL MAPS by SKAVEN

I do my normal maps in photoshop but you may do it inside your 3d software, however I'm not a modeler so I will use only the Photoshop tutorial here and to be honest so far and in my opinion the quality seems to be exactely the same.

First thing to do as I told you is to download my Racs addon and to check how I did the config.cpp (Weapons config.cpp), it's really easy you just have to open two classes as you can see from my file and add the correct name for your mapping class/material as well as the correct names for the texture files, being the first ones the

normal textures:
*****.paa

than the Nvidia mapped textures
*****_nohq.paa

and last the file that gives the amount of colour to the normal map (don't recall the real name of this one but it's not relevant here).
****_smdi.paa the

What I worte above covers everything you need to start on the cpp file and it's pretty easy to do, just be careful while wrighting the config a small mistake on a coma will be enough to won't make it work and you'll take a long time to understand where you made a mistake.

Now the textures themselfes.

The first thing you will need to do is to download the Nvidia PlugIn and install it inside photoshop than open all the texture files you want to normal map inside photoshop.

Once in Photoshop you have the filters above, inside of it you will have a new one called Nvidia... press it and you will see a new window, inside of which all I do is to change the percentage of normal mapping. Perssonaly I use values between 3 and 10 but you will have to try this one for each weapon (maybe texture) since it does have a lot to do with the type of colours the textures have as well as to how detailed the models are.

It's really try and error here but I would use a value like 5 for my first try. Press enter or apply and you will see your old texture with the normal mapped filter applied now you save it as *****._nohq.paa (just like you did inside the config.cpp file) and you place where you described.

Perssonaly I use a new folder for my normal mapps but this is actually a matter of organization you may not feel the need for it.

Once you applied and saved the normal mapped textures (Nvidia Plugin) you want to make the pink textures (the ones I don't recall the name in English).

So to achieve that you will take one of mine and you will copy the pink colour from one of my them since that's exactely the pink you will need.

Once you did this, now you will again, open the textures as you did at first (or you may just go to history and go a step backwards so you have your textures like they where initially withouht the Nvidia PlugIn).

With this done you will now open a new layer for each texture and paint the layer with the pink you got from my addon (paint the entire layer) once you did this for all the textures you will now give it instead of the usual 100% opacity/transperency you will give it something between 85% and 95%, too much will give less power/colour to the normal map too less will make it shine too much and make it ugly, again you will have to try and error but I say go for 95% on your first try.

Once you did this for all the textures you have to save them*****_smdi.paa (again put this files where you declared on your config). Now open the model INSIDE O2 (not gatebuilder) and normalize (F5) all the lods.


Hopefully if you understood my tutorial (I'm Portuguese and English is my third Language) than it should be working, go try it in game

PS1: At the beggining this may seem complex but in reality it's extremely easy the problem is that a small mistake in the config file or while naming the normal mapped textures won't allow it to work and it will be very hard to spot the problem.

PS2: The values declared inside the config like the power are values that indicate the power/type/light and ammount of normal maps, perssonaly I didn't use them much but I may give you further assistance on this if you need me to.

[/b]
Ostatnio edytowano Śr 25 lip, 2007 22:53 przez topas, łącznie edytowano 1 raz
Offline
Avatar użytkownika

Marcin_BM

Porucznik

Porucznik

  • Posty: 330
  • Dołączył(a): N 25 lip, 2004 20:49

PostŚr 13 cze, 2007 06:21

Moje 3 grosze :p :
1. Texe smdi latwiej stworzyc wypelniajac kolorem bialym kanaly czerowony i niebieski
- im kanal zielony jasniejszy tym wiecej swieci
2. Solus mi mówił że do army lepiej robic nohq z height map bo jak sie zrobi ze zwyklej texy to toroche sie gubi HDR zreszta takim sposobem wychodza bardziej podobne do tych z bis

Przykladowy config
czesc pierwsza :
Kod: Zaznacz cały
class CfgTextureToMaterial
{
   class PSF_Metal1
   {
      textures[] = {
         "PSF_GROM\b\ak7m_co.paa"
      };
      material = "#PSF_Metal1";
   };
};

część druga :
Kod: Zaznacz cały
class CfgMaterials
{
   class PSF_Metal1
   {
      ambient[] = {1.0, 1.0, 1.0, 1.0};
      diffuse[] = {1.0, 1.0, 1.0, 1.0};
      forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};
      emmisive[] = {0.0, 0.0, 0.0, 1.0};
      specular[] = {0.746, 0.746, 0.746, 1.0};
      specularPower = 14.4;
      PixelShaderID = "NormalMapDetailSpecularDIMap";
      VertexShaderID = "NormalMap";
      class Stage1 {
         texture = "PSF_GROM\b\nohq\ak7m_co_nohq.paa";
         uvSource = "tex";

         class uvTransform {
         aside[] = {1, 0, 0};
         up[] = {0, 1, 0};
         dir[] = {0, 0, 0};
         pos[] = {0, 0, 0};
         };
      };
      class Stage2 {
         texture = "PSF_GROM\b\empty.paa";
         uvSource = "tex";
         
         class uvTransform {
            aside[] = {3.0, 0.0, 0.0};
            up[] = {0.0, 3.0, 0.0};
            dir[] = {0.0, 0.0, 0.0};
            pos[] = {0.0, 0.0, 0.0};
         };
      };
      class Stage3
      {
         texture = "PSF_GROM\b\smdi\ak7m_co_SMDI.paa";
         uvSource = "tex";

         class uvTransform {
         aside[] = {1, 0, 0};
         up[] = {0, 1, 0};
         dir[] = {0, 0, 0};
         pos[] = {0, 0, 0};
         };
      };
   };

czesc trzecia - płomień :
Kod: Zaznacz cały
class PSF_Muzzle_Flash_Material
   {
      ambient[] = {0.0, 0.0, 0.0, 5.0};
      diffuse[] = {0.0, 0.0, 0.0, 1.0};
      forcedDiffuse[] = {0.005, 0.005, 0.005, 0.0};
      emmisive[] = {0.5, 0.5, 0.5, 1.0};
      specular[] = {0.0, 0.0, 0.0, 0.0};
      specularPower = 0.0;
      renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"};
      PixelShaderID = "Normal";
      VertexShaderID = "Basic";
   };
   
   
};

Ofc moge sie mylic wiec jak ktos wie to niech mnie poprawi
Ten który rzucił na mnie się niewiele szczęścia miał,Bo wypadł prosto mi na kły i krew trysnęła z rany
Offline
Avatar użytkownika

Marcin_BM

Porucznik

Porucznik

  • Posty: 330
  • Dołączył(a): N 25 lip, 2004 20:49

PostSo 29 wrz, 2007 14:36

Mały tut na prośbę Jaca :D

Podczas robienia normali ważne zwrócenie uwagi na kilka podstawowych zasad :
Odnośnie tekstur nohq
1. Są 2 sposoby ich robienia, pierwszy łatwy polegajaąćcy na wygenerowaniu z istniejącej tekstury i drugi bardziej skomplikowany ale dający dużo lepsze wyniki polegający na stworzeniu modelu o bardzo dużej ilości poli i uzyskaniu z niego tekstury nohq.
2. W przypadku sposobu pierwszego trzeba pamiętać że najlepiej robić tekstury specjalnie pod nohq czyli przykładowo najlepiej jak tekstura ma białe lub jednolite tło z zaznaczonymi wyłącznie wszystkimi elementami które mają być wypukłe lub wklęsłe. Można to łatwo osiągnąć, trzeba tylko pamiętać podczas tworzenia tekstury podstawowej
3. Jeżeli dysponujemy wyłącznie teksturą bazową to w tym przypadku przypadku pomocny jest filtr blur -> surface blur (CS3) który powinien rozmyć piksele.
4. Pod żadnym pozorem nie wolno używać tekstur po kompresji do paa\pac i robionych z nich tga . Take tekstury dają barzo mizerny efekt
5. Błędem moim zdaniem jest to co zrobili ludzie z BIS z bronią, tj uważam że tekstura nohq powinna głównie uzupełniać teksturę główną a nie dodawać wypukłości itp sama.
Odnośnie smdi
1. Moim zdaniem ich tworzenie jest dużo bardziej skomplikowane niż nohq. Ja tworze je poprzez wypełnienie kanału czerwonego i niebieskiego kolorem białym i odpowiednie przyciemnienie kanału zielonego a następnie użycie filtru w Texview2
2. Podstawowym błędem w tworzeniu jest małorealistyczne oddanie połysku powierzchni. Należy najpierw obejrzeć dany obiekt który przenosimy do gry w naturalnym środowisku i patrzeć co na nim odbija światło bardziej a co mniej.

Tworzenie i dodawanie normal maps do modelu
1. NOHQ
Do stworzenia nohq potrzebny będzie nam filtr do Adobe Photoshop który można ściągnąć z tej strony . Następnie bierzemy teksturę z której robimy nohq i traktujemy ja filtrem na ustawieniach :

http://i16.photobucket.com/albums/b35/Martin_BM/przykad.jpg

Ja stosuje przedział skali od 7-15.
Po tym mamy już gotową nohq która możemy obrabiać poprzez zamalowywanie kolorem tła (jasnoniebieski pobrany pipetą z płaskiego miejsca) miejsc które chcemy by były płaskie a wyszły inne.
Podczas konwersji do paa dodajemy do nazwy "_nohq" np sh_nohq.paa .
2. SMDI
Otwieramy teksturę z której mamy robić smdi, wypełniamy kolorem białym kanały czerwony i niebieski, przyciemniamy bądź rozjaśniamy elementy uwzględniając oryginalne własności powierzchni w kanale zielonym. Następnie otwieramy teksturę w formacie tga programem Texview2, dajemy edit -> filter -> load -> katalog texview2 -> filters -> specularMapFinish.bitfilt . Gdy zaaplikujemy filtr teksturę należy zapisać z dodaniem końcówki _smdi np sh_smdi.paa.
3.RVMAT
Rvmat tworzymy programem MatEditor z katalogu o2. Z ustawieniami trzeba pokombinować by uzyskać dobry efekt. Więcej na temat tego formatu jest na bis wiki. Gotowy rvmat dodajemy do modelu w okienku material po naciśnięciu "E" w o2.

Miłego tworzenia normali ;)
Ostatnio edytowano So 29 wrz, 2007 14:52 przez Marcin_BM, łącznie edytowano 1 raz
Ten który rzucił na mnie się niewiele szczęścia miał,Bo wypadł prosto mi na kły i krew trysnęła z rany

Powrót do Armed Assault

Kto przegląda forum

Użytkownicy przeglądający ten dział: Brak zidentyfikowanych użytkowników i 14 gości

cron