How do you get specular maps to work?

RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
Hey guys, had a read through of all topics relating to spec maps on textures but still can't get them to work with out being stupidly shiney.

I'm saving out as .dds with the spec map loaded into the alpha channel and with the levels knocked way down but they texture still shows as really shiney no matter what I do. If I load in complete white or complete black into the alpha it doesn't make any difference so I think I must be doing something wrong.


Any ideas? (I have the .dds files if anyone wants to take a look).

Comments

  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    edited May 2010
    Put your specular map into the diffuses alpha channel, make sure the alpha box is ticked in the save options and save as a DXT5 DDS file.

    You only need map type="texture" in your material file if you just using diffuse and spec. You only need to specify specular when you are using a seperate file, for full colour spec.

    If that dosen't work, post the .DDS and your material file and i'll have a look.
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    Thanks for the reply, that's what I've been doing but still can't get the spec to function correctly =(

    If you could take a look at the files that would be great, can get them from <a href="http://www.mediafire.com/?tzozmggmo0d" target="_blank">http://www.mediafire.com/?tzozmggmo0d</a> (I've zipped them with the material file).
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited May 2010
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><material>
           <maps>
                 <map type="texture" value="materials/Custom/Rhodri_Lab/Floor_Tile01.dds" />
                 <map type="bump" value="materials/Custom/Rhodri_Lab/Floor_Tile01_Normal.dds" />
           </maps>
       </material>
    <properties>
                   <property type="surface" value="rock" />
           </properties><!--c2--></div><!--ec2-->

    should be

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><material>
           <maps>
                 <map type="texture" value="materials/Custom/Rhodri_Lab/Floor_Tile01.dds" />
                 <map type="bump" value="materials/Custom/Rhodri_Lab/Floor_Tile01_Normal.dds" />
           </maps>
           <properties>
                   <property type="surface" value="rock" />
           </properties>
    </material><!--c2--></div><!--ec2-->


    Other than that, I am not sure
  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    The files in the .zip are working fine for me.

    If you load up the editor with the texture applied to something and change the alpha channels brightness and then save, you can see it update in the editor.
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    edited May 2010
    Yeh now that I've tested it a bit you're right I can see it changing, however the levels consistantly feel too high - for example in the model viewer this is what I get when i bring the material in:

    <a href="http://img338.imageshack.us/i/72118327.jpg/" target="_blank"><img src="http://img338.imageshack.us/img338/8253/72118327.jpg" border="0" class="linked-image" /></a>

    Uploaded with <a href="http://imageshack.us" target="_blank">ImageShack.us</a>

    In the viewer shouldn't my spec map be displaying as a greyscale image? Do I need to add an alpha to ny normal map as well?
  • ArkArk Join Date: 2009-08-15 Member: 68489Members
    It may look different in the viewer than is does in the editor because of the different positions and intensites of the lights.
    I dont think you need a alpha in the normalmap, most do have them, but only because DXT5 stores an alpha channel.
  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    Your diffuse map is way too bright. Specular map too just a bit. (Works best in around 20-30 / 255 white level)
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    Cheers for all the help guys getting there now - next step is transferring models in!
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    edited May 2010
    Annnd unsuprisingly I'm having trouble with getting models in as well. I can't seem to get the builder to convert textures with the model at all. I've tried leaving them with the model as various file formats (tif, png, psd and even dds) but the builder always skips them. So I've tried simply saving the textures out as dds myself but that doesn't work either.

    Again I've run through the tutorials on builder, but can't seem to work out what I'm doing wrong. Also getting slightly worried as I need these models in Engine for a project due by the end of next week.

    <a href="http://img695.imageshack.us/i/25503396.jpg/" target="_blank"><img src="http://img695.imageshack.us/img695/4963/25503396.jpg" border="0" class="linked-image" /></a> Uploaded with <a href="http://imageshack.us" target="_blank">ImageShack.us</a>

    Edit: Do I need to use the ColladaMax.dll that came with NS2 when exporting from Max2010 64bit?
  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    Yes, you have to use their Collada exporter.

    As for model exporting, you'll want to make sure that inside 3dsmax, you have assigned a material to your model pointing to at least the diffuse map (PSD inside your source folder). Then, you'll have to create the proper material file with the exact same name.

    You should have an option in photoshop to maximize compatibility when saving your PSD, in order for the builder to convert them. The builder is going to skip any other file formats in the source folder. If you want to save your textures in DDS, you should save them directly into your output folder.

    Hope that helps.
  • fsfodfsfod uk Join Date: 2004-04-09 Member: 27810Members, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited May 2010
    the paths in your .material file look wrong it shouldn't have modelsrc in them, unless you doing something really weird like having the name of your output model directory as modelsrc
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    Cheers I'll have another bash at it when I'm less tired, yeh I think I changed them to that after many fruitless attempts.

    Ok so I need to do:

    1) Install collada exporter (does this just get dropped into the max directory?)
    2) Place my material files in the modelsrc folder, and point max to them.
    3) Export as collada.
    4) Edit .DAE to remove filepaths but leave names.
    5) Save a .modile_compile file (does this need any mention of the textures?)
    6) Make .material file. (Where should the directory point to? Think this may be where I was going so wrong).
    7) Run builder.
    8) And it should be all working?

    Have I missed anything here that you can see or got the worng idea anywhere?
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited May 2010
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><material>
        <maps>
            <map type="texture" value="models/custom/Rhodri_Lab/TSA_Crate.dds" />
            <map type="bump" value="models/custom/Rhodri_Lab/TSA_Crate_normal.dds" />
            <map type="emissive" value="models/custom/Rhodri_Lab/TSA_Crate_Illum.dds" />
        </maps>
        <properties>
            <property type="surface" value="metal" />
        </properties>
    </material><!--c2--></div><!--ec2-->
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    edited May 2010
    Big thanks for all the help guys fnally got it up and running! I'm actually still using the Autodesk collada exporter, as I use Max2010 64bit and ColladaMax doesn't work with it, I tried the ColladaMaxNextGen but that just resulted in the builder crashing.

    One odd thing I've noticed though is that my immumination maps work in the editor but not the viewer? Isn't that the wrong way round?
  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    <!--quoteo(post=1771170:date=May 14 2010, 10:27 AM:name=Rhodri)--><div class='quotetop'>QUOTE (Rhodri @ May 14 2010, 10:27 AM) <a href="index.php?act=findpost&pid=1771170"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->One odd thing I've noticed though is that my illumination maps work in the editor but not the viewer? Isn't that the wrong way round?<!--QuoteEnd--></div><!--QuoteEEnd-->

    It's still a bug, the emissive map doesn't work in the editor but does in the viewer on my side, it's not a big matter but will be fixed eventually I guess.
  • GenomaxterGenomaxter Join Date: 2003-10-11 Member: 21597Members
    well you got it working! show us a screen of it working! :P
    I love seeing what people have made.
  • RhodriRhodri Join Date: 2003-06-21 Member: 17575Members
    Haha will do Gen, just getting stuff ready for final year hand in tomorrow, so not had time to do much atm: can see a couple of quick screen grabs of the marine start on my blog <a href="http://rhodrimatthews.blogspot.com/" target="_blank">http://rhodrimatthews.blogspot.com/</a> (this was early on, it's looking less crappy now... or so I hope! ;)
Sign In or Register to comment.