So, about those custom textures
Draco_2k
Evil Genius Join Date: 2009-12-09 Member: 69546Members
<div class="IPBDescription">Thermonuclear donkeys and more explained</div>Anyone else figure out anything yet? I'll post what little I figured so far to start off..
The general process seems simple enough: create a .psd file in your materialsrc folder, accompany it with a .material file, hit build (as per <a href="http://../flash/launchpad_builder_tutorial.swf" target="_blank">video tutorial</a>). But that'll net you only the diffuse map, a very shiny one, too: the texture won't be transparent or glowing or whatever you want it to be. If you want to add additional detail (you probably do), you'll have to delve into the material file:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> <material>
<maps>
<map type="texture" value="materials/MyMaterial.dds" />
</maps>
</material><!--c2--></div><!--ec2-->
Generally, for every new map type you'll have to copy the "map type" line over with new paths and parameters. The trick is to know the keywords, and which part of your .psd these maps sample.
<!--QuoteBegin-References+--><div class='quotetop'>QUOTE (References)</div><div class='quotemain'><!--QuoteEBegin--><b>Name - "keyword" - Source - Details</b><i>
</i>
Diffuse map - "texture" - RGB
Normal map - "bump" - RGB
Specular map - "specular" - Alpha - White areas reflect light, black areas don't
Illumination map - "emissive" - RGB - Colour areas glow, black areas don't
Transparency map - "opacity" - Alpha - White areas are opaque, black areas are see-through<!--QuoteEnd--></div><!--QuoteEEnd-->
So, to set where shiny bits of your material are you'll want to create an Alpha channel for your .psd and have something like this to go with it:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> <material>
<maps>
<map type="texture" value="materials/MyMaterial.dds" />
<map type="specular" value="materials/MyMaterial.dds" />
</maps>
</material><!--c2--></div><!--ec2-->
All of this is, of course, a shot in the dark. Anyone know any better?
<u>Notes:</u>
-You'll generally always want your texture to have an Alpha channel (otherwise it'll render shiny by default); specular maps seems to be sourced mainly from the "texture" document's Alpha.
-Illumination maps currently don't seem to display in the editor (model viewer works fine).
-Builder crashes if you try to process a document with more than one Alpha channel.
-Builder currently ships without certain necessary files and may crash on build attempt. To fix that, download <a href="http://developer.nvidia.com/object/texture_tools.html" target="_blank">nVidia Texture Tools</a> and copy all .dll's and nvcompress.exe from the resulting "bin" directory into "utils" one in the NS2 folder.
The general process seems simple enough: create a .psd file in your materialsrc folder, accompany it with a .material file, hit build (as per <a href="http://../flash/launchpad_builder_tutorial.swf" target="_blank">video tutorial</a>). But that'll net you only the diffuse map, a very shiny one, too: the texture won't be transparent or glowing or whatever you want it to be. If you want to add additional detail (you probably do), you'll have to delve into the material file:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> <material>
<maps>
<map type="texture" value="materials/MyMaterial.dds" />
</maps>
</material><!--c2--></div><!--ec2-->
Generally, for every new map type you'll have to copy the "map type" line over with new paths and parameters. The trick is to know the keywords, and which part of your .psd these maps sample.
<!--QuoteBegin-References+--><div class='quotetop'>QUOTE (References)</div><div class='quotemain'><!--QuoteEBegin--><b>Name - "keyword" - Source - Details</b><i>
</i>
Diffuse map - "texture" - RGB
Normal map - "bump" - RGB
Specular map - "specular" - Alpha - White areas reflect light, black areas don't
Illumination map - "emissive" - RGB - Colour areas glow, black areas don't
Transparency map - "opacity" - Alpha - White areas are opaque, black areas are see-through<!--QuoteEnd--></div><!--QuoteEEnd-->
So, to set where shiny bits of your material are you'll want to create an Alpha channel for your .psd and have something like this to go with it:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> <material>
<maps>
<map type="texture" value="materials/MyMaterial.dds" />
<map type="specular" value="materials/MyMaterial.dds" />
</maps>
</material><!--c2--></div><!--ec2-->
All of this is, of course, a shot in the dark. Anyone know any better?
<u>Notes:</u>
-You'll generally always want your texture to have an Alpha channel (otherwise it'll render shiny by default); specular maps seems to be sourced mainly from the "texture" document's Alpha.
-Illumination maps currently don't seem to display in the editor (model viewer works fine).
-Builder crashes if you try to process a document with more than one Alpha channel.
-Builder currently ships without certain necessary files and may crash on build attempt. To fix that, download <a href="http://developer.nvidia.com/object/texture_tools.html" target="_blank">nVidia Texture Tools</a> and copy all .dll's and nvcompress.exe from the resulting "bin" directory into "utils" one in the NS2 folder.
Comments
So if you just load a full diffuse in the editor, you can see it gets 100% spec, so you need to add an alpha channel and bring its colour to black to remove the spec.
In the case of gloss maps and/or full coloured spec, thats when you need to use a seperate image. Look at the mining_cart.material and its related .dds files under the refinery props to see an example.
So if you just load a full diffuse in the editor, you can see it gets 100% spec, so you need to add an alpha channel and bring its colour to black to remove the spec.
In the case of gloss maps and/or full coloured spec, thats when you need to use a seperate image. Look at the mining_cart.material and its related .dds files under the refinery props to see an example.<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks for that, amended OP accordingly. Gloss mapping sounds pretty tricky...
That's deep. Hope I can figure out a way to test it.
Funny light effects though... :|
Yeah im thick and though opacity was gonna be on a gradients as opposed to on off... oh well. :)
I accidentaly made a texture from NS1 though so...
(the one that was like weeds?)
Like a camoflauge pattern where 1 of the colours is invisible.
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>1> 'C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.</div>
I made the texture with gimp with a psd type first is 512 x 512 pixels the second 128 x 256.
It accepts my material file so it has to be my texture file any suggestions?
Ok never mind I copied all the files in the nvidia bin into the utility and It compiled and works now.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><material>
<maps>
<map type="texture" value="materials/custom/light3a.dds" />
<map type="bump" value="materials/custom/light3a_normal.dds" />
<map type="emissive" value="materials/custom/light3a_illum.dds" />
</maps>
</material><!--c2--></div><!--ec2-->
made them trough photoshop before the build program was released, it is indeed quite shiny and loses the bumpmap when too close or to far away. Also the emissive render type doesn't work. I'll have a look at the builder to tomorrow, I'm doing it wrong for the emissive type...
[edit]
light3a (have a look in the halflife.wad :P)
also transparant alpha maps are quite easy using photoshop
Based on my numbers above, the editor seems to run textures at 8dpi. Has anyone else run into this?
Does the builder not care about the DPI of the source file and just look at raw pixels? Or is some conversion taking place here?