TrueCombat
http://www.truecombatelite.com/forums/

TC:E on XREAL, screenshots inside!
http://www.truecombatelite.com/forums/viewtopic.php?f=34&t=2225
Page 2 of 3

Author:  sxy [ Fri Oct 22, 2010 1:32 pm ]
Post subject: 

just to let you know - I have made a simple normalmap for stock tce m4 and used m4_main_w.jpg for specularmap and changed the shader. And everything works as expected.

Author:  Damien [ Fri Oct 22, 2010 2:13 pm ]
Post subject: 

You forgot to post a screenshot. :D

Author:  Rang3r1_v2 [ Fri Oct 22, 2010 4:19 pm ]
Post subject: 

Hmm, I'm getting the vert error too, what did you have to change in the .md3? If I just apply the spec and normal map in max, will it get saved in the .md3 as well? Or can I just use the old .md3 and the shader will still work? I'm going to futz around for awhile.

Thanks a ton sxy, you have set me on the right track.

Author:  Damien [ Fri Oct 22, 2010 5:33 pm ]
Post subject: 

Are you talking about the 1025 vert limit? If yes, I separated the model into a few sections (sections within one model). Also, thanks for your help in that other thread.

To apply the different texture maps, you use their stages within the shader, here's an example from XReal (I have no idea if this particular shader works with ETXreal):
Code:
textures/dd001_metal/metal_plates02
{
   qer_editorimage      textures/dd001/metal_plates02_d.dds


   diffusemap      textures/dd001/metal_plates02_d.dds
   specularmap      textures/dd001/metal_plates02_s.dds
   bumpmap         textures/dd001/metal_plates02_n.dds
}


Hopefully sxy can give you a better idea of how ETXreal's shaders work.

Author:  Rang3r1_v2 [ Fri Oct 22, 2010 6:07 pm ]
Post subject: 

No, when sxy changed the name of the diffuse in the .md3 he messed up the format I think, but I cannot tell if the normals are working ingame, I see a slight reflection, but it isn't nearly what the spec map specifies, and I can't really notice any normals...

Author:  Damien [ Fri Oct 22, 2010 6:16 pm ]
Post subject: 

If you're testing it on default TC:E maps, there are no dynamic lights on them to affect the normal/specular maps.

Author:  Rang3r1_v2 [ Fri Oct 22, 2010 6:39 pm ]
Post subject: 

Hmm, good point. Now where is that test map sxy made....

Author:  sxy [ Sat Oct 23, 2010 5:13 pm ]
Post subject: 

(bad lighting and even worse normal map)

ImageImage
ImageImage
ImageImage
ImageImage
ImageImage
Image
ImageImage

Author:  sxy [ Sat Oct 23, 2010 5:38 pm ]
Post subject: 

http://rapidshare.com/files/426754290/test_weap.pk3

map name: test_weap

/sv_pure 0
/devmap test_weap

Author:  Rang3r1_v2 [ Sun Oct 24, 2010 4:18 am ]
Post subject: 

:'(

It still isn't showing up in map. I'm done, I don't care anymore.

Author:  sxy [ Sun Oct 24, 2010 10:43 am ]
Post subject: 

Don't give up that soon ;)
This is called debugging.
First, check your variables:
/r_normalmapping 1

Second, try getting one of the original weapons to work with normal maps:
Let's try with M4.

open your ET-XreaL\tcetest\pak2.pk3

open: pak2.pk3/scripts/models_weapons2_elite.shader

Use find function (search for m4_main keyword) to find this shader:

Code:
//////////// m4 ////////////////////
models/weapons2/m4/m4_main
{
   {
      map textures/effects/envmap_elite_90.tga
      rgbGen lightingdiffuse
      tcGen environment
   }
   {
      map models/weapons2/m4/m4_maintrans.tga
      //blendFunc GL_ONE GL_ZERO
      blendFunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
   {
      map models/weapons2/m4/m4_main.tga
      blendFunc GL_ONE GL_ONE
      rgbGen lightingdiffuse
   }
}


Modify it so that it will look like this:

Code:
//////////// m4 ////////////////////
//models/weapons2/m4/m4_main
//{
//   {
//      map textures/effects/envmap_elite_90.tga
//      rgbGen lightingdiffuse
//      tcGen environment
//   }
//   {
//      map models/weapons2/m4/m4_maintrans.tga
//      //blendFunc GL_ONE GL_ZERO
//      blendFunc GL_DST_COLOR GL_ZERO
//      rgbGen identity
//   }
//   {
//      map models/weapons2/m4/m4_main.tga
///      blendFunc GL_ONE GL_ONE
//      rgbGen lightingdiffuse
//   }
//}

models/weapons2/m4/m4_main
{
      diffusemap  models/weapons2/m4/m4_main.tga
      normalmap   models/weapons2/m4/m4_main_local.tga
      specularmap models/weapons2/m4/m4_main_w.tga

}


Don't forget to save it! (in the pak)

Then download this test normal map: http://rapidshare.com/files/426868374/pak7.pk3
It is already in pk3 file with appropriate folder structure. Put it in your ET-XreaL/tcetest folder.

Now test it again using that testmap. Note that M16, M4SOPMOD and SPR share the M4 "body" shader, so all of them will get partially normal mapped (except M4, which will be completely normal mapped).

Btw.. Can you show me some screens of that test_weap map? How does it work for you? Also, can you show me the output of the console? (when in main menu, set /logging 1)

cheers!

Author:  Rang3r1_v2 [ Tue Oct 26, 2010 4:39 pm ]
Post subject: 

sxy, do I HAVE to use the _local, _s, ending, or can I just use _diff, _norm, _spec? If I do it that way will the engine ignore it?

Author:  Damien [ Tue Oct 26, 2010 4:40 pm ]
Post subject: 

You can use whatever filename you want.

Author:  Damien [ Tue Oct 26, 2010 4:42 pm ]
Post subject: 

And one question for sxy, if you're going to use a custom pak7.pk3, doesn't it make more sense to add models_weapons2_elite.shader within it rather than modifying pak2.pk3 as well?

Author:  sxy [ Tue Oct 26, 2010 6:54 pm ]
Post subject: 

Yes it does. However, you have to do it if you are modifying original model.

Page 2 of 3 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/