collapse

Author Topic: Bump and specular maps in VBT  (Read 3227 times)

Offline [archive] Beerdude26

  • Fledgling
  • *
  • Posts: 17
Re: Bump and specular maps in VBT
« on: December 12, 2006, 09:43:00 AM »
  • Best Answer
  •                 Reading up on this thread ( http://www.forumplanet.com/planetvampire/topic.asp?fid=9644&tid=1935042  ) ,
     
     I noticed that no one had attempted to incorporate bumpmapping and specular mapping into Bloodlines, although it would greatly increase the level of detail without massive FPS strain (well, for specular mapping that is, bumpmapping on very large surfaces will give FPS lag).
     
     Has anyone actually tried to add bumpmaps or specular maps to Bloodlines? Because it is not an incredibly hard job to do, just a lot of it.                        

     

                                                      

    Offline [archive] St.Malk

    • Fledgling
    • *
    • Posts: 11
    Re: Bump and specular maps in VBT
    « Reply #1 on: December 12, 2006, 11:49:00 AM »
  • Best Answer
  •                 I tried to do something like this. Sectacular maps - it's to easy, just write necessary value in vtf-file.
     
     <gray>
     $envmapmask models\character\pc\female\ravnos\armor1\VV_bodyspec1
        $envmap    env_cubemap
     </gray>
     Don't forget about inverted comas.
     
     With bump mapping everything is much more difficultly. I tried to add bump mapping to one of my new clan models, in Russian Clan-mod and there was no effect. But if to use bump+spectacular maps, everything works but looks like... plastic bottle.
     I don't know but it's everything what I've achieved. Maybe somebody knows something new and useful in this direction, it would be nice.                        

     

                                                      

    Offline [archive] Greywaste

    • Fledgling
    • *
    • Posts: 30
    Re: Bump and specular maps in VBT
    « Reply #2 on: December 12, 2006, 04:17:00 PM »
  • Best Answer
  •                 In Reply To #2
     
    St.Malk posted:

     I tried to do something like this. Sectacular maps - it's to easy, just write necessary value in vtf-file.
     
     <gray>
     $envmapmask models\character\pc\female\ravnos\armor1\VV_bodyspec1
        $envmap    env_cubemap
     </gray>
     Don't forget about inverted comas.
     
     With bump mapping everything is much more difficultly. I tried to add bump mapping to one of my new clan models, in Russian Clan-mod and there was no effect. But if to use bump+spectacular maps, everything works but looks like... plastic bottle.
     I don't know but it's everything what I've achieved. Maybe somebody knows something new and useful in this direction, it would be nice.

     
     If it looked like a bottle it's because your map was too strong, you need to put an alpha channel on the bump map and make it partially transparent                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Re: Bump and specular maps in VBT
    « Reply #3 on: December 13, 2006, 11:09:00 AM »
  • Best Answer
  •                 Having dabbled around a bit and knowing my way around textures for the most part, I've made a few normal maps for a few textures. But I'm wondering, do you have to recode the VTF normal maps to TTZ files for them to work, or will this version of the Source engine still be flexible enough?
     
     Does anyone know of a bumpmapped texture in VTMB that I may use as a reference?
     
     EDIT: Nevermind, I found an example file myself. You do need to change it to a TTZ.
     
     By the way, is there a way that I can make my own TTH files?
     
     EDIT2: Crap, you can't use Source Engine textures to convert them tongue  Right, redoing all of that.                        

     

                                                      

    Offline [archive] St.Malk

    • Fledgling
    • *
    • Posts: 11
    Re: Bump and specular maps in VBT
    « Reply #4 on: December 14, 2006, 07:12:00 AM »
  • Best Answer
  •                 In Reply To #3
     
    Greywaste posted:

      you need to put an alpha channel on the bump map and make it partially transparent

     
     To make transparent alpha-channel or layer with bump map?                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Re: Bump and specular maps in VBT
    « Reply #5 on: December 14, 2006, 08:46:00 AM »
  • Best Answer
  •                 I'm using normal maps (VTMB supports this, I have checked in actual game files). They are the successor of bump maps, but do essentially the same. No alpha channel is needed for normal maps, you just have to make the parts you don't want bumpmapped a certain colour of blue.                        

     

                                                      

    Offline [archive] Greywaste

    • Fledgling
    • *
    • Posts: 30
    Re: Bump and specular maps in VBT
    « Reply #6 on: December 14, 2006, 01:28:00 PM »
  • Best Answer
  •                 yeah, sorry, I was referring to the specular map.
     
     and yes, pretty sure the normal maps will need to be .TTZ's too and they will probably need ot be referenced in the .VMT file.
     
     VV has a bump map as far as I remember, it's been a while, perhaps check her out.                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Re: Bump and specular maps in VBT
    « Reply #7 on: December 14, 2006, 02:17:00 PM »
  • Best Answer
  •                 In Reply To #7
     
     Right, I've managed to get everything correct (VMTs, TTZ, etc) and tried them out ingame. I've also changed the VMT from VertexLitGeneric to LightmappedGeneric so they use the normal maps. However, when ingame, the model that is supposed to use bumpmaps simply isn't there! (It's invisible)
     
     I have managed to get envmaps and envmapmasks on it, and it looks way better than default tongue
     
     Still, bumpmapping in VTMB is possible, because I've seen files that had bumpmapping with them. I think I'm doing it wrong. Looking in the files, it seems like no model uses LightmappedGeneric, so I guess you can't use bumpmaps on models, only flat textures.
     
     But I could just be compressing the file wrongly. I'm using Photoshop CS to convert the bumpmapped TGA files (who are of the same pixel size as the actual texture/model) to DDS files (DXT1 RGB No Alpha, 10 mipmaps) and then copy the TTH file from the original texture, rename it to Texture_normal.tth and use VPKTool to convert it back to TTZ. Then I open the VMT and put in the correct code for bumpmaps and direct to the correct location (same as file, just with _normal behind it).
     
     I put the sentence in bold where I think I'm doing it wrong. Although VPKTool says the TTH file has been edited, it could still be incorrect.
     
     Before envmap - After envmap
     <img>http://img72.imageshack.us/img72/8011/sptutorial10004gv7. th.jpg</img> <img>http://img324.imageshack.us/img324/1108/sptutorial10002s j3.th.jpg</img>
     
     <img>http://img173.imageshack.us/img173/9564/sptutorial10005z g1.th.jpg</img> <img>http://img173.imageshack.us/img173/7966/sptutorial10003l m7.th.jpg</img>
                           

     

                                                      

    Offline [archive] St.Malk

    • Fledgling
    • *
    • Posts: 11
    Re: Bump and specular maps in VBT
    « Reply #8 on: December 15, 2006, 01:43:00 PM »
  • Best Answer
  •                 In Reply To #6
     
    Beerdude26 posted:

      No alpha channel is needed for normal maps, you just have to make the parts you don't want bumpmapped a certain colour of blue.

     I have. I used nVidia plug-in.
     But there were no changes after adding. ( Textures looked like simple textures.
     Differences were only after adding a spectacular map, but with plastic effect.                        

     

                                                      

    Offline [archive] jeff_god_of_jam

    • Fledgling
    • *
    • Posts: 1
    Re: Bump and specular maps in VBT
    « Reply #9 on: December 16, 2006, 01:51:00 PM »
  • Best Answer
  •                 In Reply To #10
     
     Wow.  Are you planning on releasing this as a mod?                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Re: Bump and specular maps in VBT
    « Reply #10 on: December 15, 2006, 01:56:00 PM »
  • Best Answer
  •                 In Reply To #9
     
     There are several options that can make the effect less strong.
     
     http://developer.valvesoftware.com/wiki/Reflective_Materials
     
     This is a handy page if you want to mess around with reflective materials wink
     
     Anyway, I'm going to start making reflection maps for a few metal models so the textures don't seem pasted on.
     
     EDIT: Here is a comparison picture for the keycard:
     
     Before - After:
     <img>http://img255.imageshack.us/img255/5308/sptutorial10012g g6.jpg</img> <img>http://img352.imageshack.us/img352/977/sptutorial10013si 1.jpg</img>
     
     Oh and by the way, models WILL disappear if you change them to LightmappedGeneric. So bumpmaps for those are a no-go, I guess sad
     
     EDIT2: Does anyone know what stuff needs to be in the Header File for bumpmaps? Currently, all I get is a completely black texture when I put in the modified files.
     
     [added Dec 16 2006  7:33AM]
     
     Right, I've managed to get bumpmaps into the game, but they're acting pretty weird.
     
     First, here are some pictures of the bumpmapping in action:
     (Everything ABOVE the red line is bumpmapped, everything BELOW the red line is not.)
     
     <img>http://img166.imageshack.us/img166/2473/sptutorial10015b b1.th.jpg</img> <img>http://img166.imageshack.us/img166/1476/sptutorial10027z z7.th.jpg</img>
     
     Here is an example of how weapon flashes are reflected on the walls:
     
     LEFT: No bumpmapping - RIGHT: Bumpmapping
     
     <img>http://img147.imageshack.us/img147/1205/sptutorial10025k i6.th.jpg</img> <img>http://img147.imageshack.us/img147/9458/sptutorial10020f z4.th.jpg</img>
     
     As you can see on the pictures, there are odd blotches of black on the bumpmapped textures; shooting on or near the viscinity of them makes them go away. Originally, the textures were completely black, and I once shot them out of frustration, which resulted in this discovery. So, the textures ARE bumpmapped, but they need light to be made visible. Would anyone know how this could be resolved?
     
     A possible help might be the skullwall.ttz/tth and skullwall_normal.ttz/tth file in materials/objects. This is a bumpmapped texture made by Troika themselves, and it might hold the solution.
     
     [added Dec 16 2006  7:57AM]
     
     Right, I've been thinking: Could it be the cubemaps? Because the cubemaps haven't been rebuilt for those textures, maybe they won't show until light is shed upon them? The problem I'm having now, is that I can't build the cubemaps (console command: buildcubemaps) because it can't load the vtex.dll. I've tried a few vtex.dll's from various Source games, but none of them will work (still says "can't load vtex.dll"). Does anyone know if it is possible to build the cubemaps in another way, or does anyone have an old build of the vtex.dll somewhere?                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Re: Bump and specular maps in VBT
    « Reply #11 on: December 16, 2006, 02:00:00 PM »
  • Best Answer
  •                 In Reply To #11
     
     You bet. The size will probably be pretty large, as bumpmaps take about the same size ( minus 20 or 50 KBs) as their textures. But currently, I really need help with these bumpmaps. I could use a really ugly hack that might work, like implementing a weapon that has such a large flash that it lights up the entire map, and have that weapon fire once whenever you load or start a new game and level, but I have no idea on how to do this.
     
     I'll probably also release a mod with reflection maps only. These are far smaller in size (up to 10 times smaller than the original texture), and will be easier for people who don't have a lot of video RAM.                        

     

                                                      

    Offline [archive] HaveHudson

    • Fledgling
    • *
    • Posts: 2
    Re: Bump and specular maps in VBT
    « Reply #12 on: January 22, 2007, 11:40:00 AM »
  • Best Answer
  •                 Just curious, any new info on this?                        

     

                                                      

    Offline [archive] Beerdude26

    • Fledgling
    • *
    • Posts: 17
    Bump and specular maps in VBT
    « Reply #13 on: January 22, 2007, 05:08:00 PM »
                    In Reply To #13
     
     I work on it sometimes (mainly reflection maps), and I'm trying to get cubemaps to build, but currently I've been unsuccesful. I'll release it when I'm done.