https://wiki.beyondskyrim.org/w/api.php?action=feedcontributions&user=Gamma+Metroid&feedformat=atomBeyond Skyrim - User contributions [en]2024-03-29T08:46:10ZUser contributionsMediaWiki 1.26.4https://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Implementation&diff=4852Arcane University:Implementation2024-01-14T17:09:10Z<p>Gamma Metroid: updated ck wiki links</p>
<hr />
<div>{{Trail}}<br />
{{AUDisciplines}}<br />
'''Implementation''' is the stage where all resources come together, get married, and finally get polished until the game is "ready enough" for shipment.<br />
It is the most important and diverse task for Skyrim modding.<br />
<br />
If you have never touched the Creation Kit before, you should begin with the Creation Kit Wiki's [https://ck.uesp.net/wiki/Category:Getting_Started Getting Started] page. After that, a good entry to implementation is the [https://ck.uesp.net/wiki/Bethesda_Tutorial_Creating_an_Actor official Bethesda Quest tutorial]. It touches on many aspects of implementation, like quests, scenes, actors, packages and more. However, it is an ''entry''. Going through the tutorial will make you acquainted with the Creation Kit and its systems, and it can serve as a springboard to dive into more complex tasks. Additionally, the Creation Kit Wiki provides many more tutorials that you can take advantage of ([https://ck.uesp.net/wiki/Tutorials CK Wiki Tutorials]/[https://ck.uesp.net/wiki/Category:Community_Tutorials Community Tutorials]/[https://ck.uesp.net/wiki/Video_Tutorials Video Tutorials]).<br />
<br />
== Expectation ==<br />
Some things you may be doing as an implementer are:<br />
*Creating complex quests, sometimes with branching paths<br />
*Working with the Story manager to create radiant quests<br />
*Creating scenes, where NPCs talk with each other<br />
*Creating NPC packages or schedules<br />
*Creating magic effects or perks<br />
*Working with more complex NIFs<br />
<br />
Fundamental to many of these are the following:<br />
*Being comfortable working with the Papyrus scripting engine<br />
*Being able to troubleshoot when something does not work as intended.<br />
*As part of the former, reading through documentation such as the Creation Kit wiki or other sources.<br />
<br />
It should be noted that, in order to be an implementer, you do not need to be able to do all the aforementioned tasks. Some implementers can have more focused areas, such as creating quests or working with NIFs.<br />
<br />
== Implementation Lesson Plan ==<br />
{{ImpNav}}<br />
=== Quests/Dialogue ===<br />
<br />
* [https://ck.uesp.net/wiki/Bethesda_Tutorial_Planning_the_Quest Quest Implementation - Basic (Creation Kit Wiki)]<br />
* [[Arcane University: Implementation Scribe Assignment|Implementation Scribe Assignment]]<br />
* To be continued...<br />
Extra resources:<br />
* [https://ck.uesp.net/wiki/Bethesda_Tutorial_Packages Quest Implementation - Intermediate (Creation Kit Wiki)]<br />
* [[Arcane University:Dialogue Tips & Tricks|Dialogue Tips & Tricks]] (To come)<br />
* [[Arcane University:Voice Line Implementation|Voice Line Implementation]]<br />
* [[Arcane University:Random Encounters|Random Encounters]] (To come)<br />
* [[Arcane University:World Interactions|World Interactions]]<br />
* [[AU:Seq Guide|Seq Guide]]<br />
<br />
=== 3D/NIF Implementation ===<br />
<br />
<!-- This is just the lesson plan from https://docs.google.com/document/d/1vjiuNeBrRkmIpzNxzV6VgxBM9WgAfiHKwPwOTrmkYWw/edit and doesn't really match the Nif Implementation page --><br />
* [[Arcane University:Static/Havok Objects|Static/Havok Objects]] (To come)<br />
* [[Arcane University:Exporting animated statics using ck-cmd|Animated Objects]] (doors, gates, containers, etc.)<br />
* [[Arcane University: Animated Textures in Nif Files|Animated Textures]]<br />
* [http://skyrimmw.weebly.com/skyrim-modding/destructible-object-creation-breakable-stuff-skyrim-modding-tutorial Destructible Objects (external link)]<br />
* [[Arcane University:Grasses|Grasses]]<br />
* [[Arcane University:Tree Animations|Tree Animations]]<br />
* [[Arcane University:Nifskope Weapons Setup|Weapons]]<br />
* [[Arcane University:Armors|Armors]] (To come)<br />
* [[Arcane University:Creatures (Vanilla Skeleton)|Creatures (Vanilla Skeleton)]]<br />
* [[Arcane University:Implementation of Custom Animations|Creatures (Custom Skeleton)]]<br />
* [[Arcane University: Adding more bones for animation support with 3DS Max|Adding bones to skeletons (3DS Max)]]<br />
* [[Arcane University:Decals|Decals]] (To come)<br />
* [[AU:LOD Model Creation|LOD Model Creation]]<br />
<br />
=== Game Mechanics ===<br />
<br />
* [[Arcane University:Weathers|Weathers]] (To come)<br />
* [https://www.youtube.com/watch?v=kpg14lOGaVo Implementing a Custom Creature Race (Youtube)] <br />
* [https://morroblivion.com/forums/music-and-sound/creature-sfx-implementation-guide Custom Creature Sound Effects (External Link)]<br />
* [[Arcane University:Magic Effects & Spells|Magic Effects & Spells]] (To come)<br />
* [[Arcane University:Perks|Perks]] (To come)<br />
* [[Arcane University:Setting Up an NPC|Setting Up an NPC]] (To come)<br />
* [[Arcane University:NPC Packages|NPC Packages]] (To come—CK Wiki's "Quest Implementation - Intermediate" introduces this for now)<br />
* [[Arcane University:Procedures|Procedures]]<br />
<br />
=== Misc. Other Tutorials ===<br />
<br />
* [https://ck.uesp.net/wiki/Category:Getting_Started Getting Started with the Creation Kit (Creation Kit Wiki)]<br />
* [https://ck.uesp.net/wiki/Category:Bethesda_Scripting_Tutorial_Series Bethesda Scripting Tutorial Series (Creation Kit Wiki)]<br />
* [http://www.cipscis.com/skyrim/tutorials/beginners.aspx Papyrus for Beginners (External Link)]<br />
* [[AU:Dynamic Book Entries|Dynamic Book Entries]]<br />
* [[AU:Scripting Best Practices|Scripting Best Practices]]<br />
* [[AU:Custom Map Marker Implementation|Custom Map Marker Implementation]]<br />
* [[AU:Compatible Implementation of Hard Coded Music Types|Compatible Implementation of Hard Coded Music Types]]<br />
* [[AU:World space synchronization|World space synchronization]]<br />
* [[AU:Cross Province Travel|Cross Province Travel]]<br />
<br />
=== Merging esps === <br />
* [[AU:Masterfile Merging with MergePlugins|Masterfile Merging with MergePlugins]]<br />
* [[AU:Masterfile Merging with Perforce]]<br />
<br />
== Test Claims ==<br />
Test Claims used by the Arcane University to give students access to authentic Beyond Skyrim and Third-Party project claims.<br />
<br />
Test claims are, primarily, an exercise. If a student completes the claim and it is of a very high quality, the claim in question may become part of the project. Teachers are allowed and encouraged to use these claims as final exams for students.<br />
<br />
# Any claim can be taken by anyone, at any time by asking the corresponding teacher. <br />
# The claims are used as an exercise. Should a student complete it especially well and with required quality, then the asset may be used for the corresponding project and the student gets the chance to be accepted as a developer.<br />
# Teachers can use claims as "entrance exams" for a project, when the specific project has given consent. <br />
# All claims should be finished within 1 month. They can be dropped at any time with no penalty, and there is no penalty for failing to complete the claim within the given period. The claim can be approached again at a later date if desired.<br />
# If you find yourself hitting a wall with the claim, ask a teacher! Other students may also have useful information. And there is no shame in following #4 and dropping it to move on to something else. The brain needs distance to make sense of the issues it finds.<br />
<br />
The AU's Implementation Test Claims can be found here: [https://trello.com/b/8hMcebPq/test-claims-implementation Implementation Test Claims Trello Board].<br />
<br />
[[Category:Arcane University-Implementation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Mesh_Collisions&diff=4851Arcane University:Mesh Collisions2023-12-31T16:24:55Z<p>Gamma Metroid: /* List Shapes */ info about multiple materials</p>
<hr />
<div>{{Trail|Implementation|Nif Implementation}}<br />
'''Collision''' is an attribute of [[Arcane University:NIF Data Format|NIF files]] which makes objects solid in the Creation Engine. When an object has collision, it cannot be walked through, fall through the ground or walls, and also determines what parts of the object are interactable. It can also be used to create non-collidable "phantom collision," to detect when an object enters the collision bounds and then call an event. This article will cover the different types of collision shapes and their uses, as well as the physics settings that affect how the object moves in the world. It is by no means exhaustive—these are just the most commonly used features of collision in Skyrim.<br />
<br />
{{note|Many problems are avoidable by copying the collision from a similar vanilla nif. This will save you the hassle of setting all the values by hand. Just make sure to use NifSkope's "Reorder Blocks" spell afterwards, otherwise the nif will crash the game/CK.}}<br />
<br />
==Common Shape Types==<br />
[[File:WRjaildoor.png|350px|thumb|right|The Whiterun jail door uses a box primitive.]]<br />
There are three main types of collision meshes: '''Primitives''', '''Convex Shapes''', and '''Compressed Mesh Shapes'''. Primitives are the simplest, and compressed mesh shapes are the most complex. The CPU usage required to simulate physics, therefore, is lowest for primitives, slightly higher for convex shapes, and much higher for compressed mesh shapes. For this reason, primitives and convex shapes are preferred, and are the only viable option for moving objects (weapons, clutter that you can pick up, etc.). Compressed mesh shapes are reserved for static objects only (architecture, furniture, etc.).<br />
<br />
===Primitives===<br />
Primitives can be boxes (rectangular prisms—they do not have to be cubes), spheres, or capsules. These can be made in [[Arcane University:Nifskope for Skyrim|NifSkope]], and are commonly used for doors and chests that are roughly box-shaped, like the Whiterun jail door, seen at right. The dimensions of primitives are adjustable in the settings of the shape block. To translate the shape within the nif, use a bhkTransformShape between the bhkRigidBody and the primitive, or the translation settings in a bhkRigidBodyT.<br />
<br />
===Convex Shapes===<br />
Convex shapes are the easiest to create, and are extremely common for clutter items and simple furniture. Simply right-click the mesh in NifSkope, and select ''Havok > Create Convex Shape''. Adjust the roundoff error value if you need more or fewer vertices. The collision radius is an invisible shell around the collision shape, and may need to be adjusted later after testing. Smaller values result in a thinner shell. Generally, if the object is very small, it will likely need a smaller radius.<br />
<br />
Convex shapes necessarily can not have concave areas, or "indents." For an object that needs this, use either a compressed mesh shape (if it's a static) or a [[#List Shapes|list shape]], if it is dynamic.<br />
<br />
===Compressed Mesh Shapes===<br />
Compressed mesh shapes are created in [[AU:Software#3D|3D software]] such as Blender, 3ds Max, or Maya. They are typically much simpler (i.e. fewer vertices) than the visible mesh. This can be done either by decimating a copy of the visible mesh, or removing edge loops manually for a higher quality collision mesh. Compressed meshes can also contain multiple collision materials. They can be exported to nif format using either [[Arcane University:CK-CMD for Skyrim#Including Collision Mesh|ck-cmd]] or [[Arcane University:Niftools/Chunkmerge for Skyrim|ChunkMerge]].<br />
<br />
==Special Cases==<br />
[[File:Woodenbowl_collision.png|400px|thumb|right|The wooden bowl from vanilla Skyrim, showing a list shape collision.]]<br />
===List Shapes===<br />
List shapes are collections of convex shapes or primitives. They are often used for bowls, that need to have dynamic collision, but cannot use convex shapes, as well as many weapons. These are most easily made in NifSkope by copying a bhkCollisionObject from a similar nif and adjusting it to fit, or making the list shape by hand in NifSkope. Lists of convex shapes can also be made using [[AU:Nifskope for Skyrim#Forks|Spectral's NifSkope fork]].<br />
<br />
List shapes can use different collision materials, as long as the material is specified on the shape itself. Materials on the transform shapes or the list shape are ignored.<br />
<br />
===Constraints===<br />
{{main|[[Arcane University:Nifskope Hinge Constraints|NifSkope Hinge Constraints]]}}<br />
<br />
Some objects, like books and necklaces, or hanging shop signs, may use constraints so that they swing on a hinge when the player or another actor touches them.<br />
<br />
===Animated Collision===<br />
[[File:Animated collision settings.png|400px|thumb|right|The Riften keep door from vanilla Skyrim, showing the required settings for animated collision.]]<br />
Collision that moves with an animated nif is fairly simple to set up. Create a collision object inside the animated node, so that it moves along with the visible mesh when the animation is played in NifSkope. Then make sure the settings match those in the image.<br />
<br />
The important settings are as follows:<br />
*Collision Layer: SKYL_ANIMSTATIC<br />
**Only the animated collision object needs this. If the nif contains other collision object that don't move, they should remain in the SKYL_STATIC layer.<br />
*Motion System: MO_SYS_BOX_INERTIA<br />
*Enable Deactivation: yes<br />
*Solver Deactivation: SOLVER_DEACTIVATION_LOW<br />
*Quality Type: MO_QUAL_FIXED<br />
<br />
The animated bhkCollisionObject should also have the SET_LOCAL flag, in addition to the usual ACTIVE and SYNC_ON_UPDATE flags. Lastly, make sure the [[Arcane University:NIF Data Format#BSXFlags node|BSXFlags]] of the nif are correct.<br />
<br />
==Physics Settings==<br />
Physics settings are contained in the bhkRigidBody or bhkRigidBodyT. The only difference between these two blocks is that bhkRigidBodyT has translation enabled—the translation fields in a bhkRigidBody have no effect.<br />
<br />
*'''Layer:''' The layer the collision object belongs to. Some layers don't collide with certain other layers. The most common are Static, Animstatic, Clutter, and Weapon. There is also a copy of this field in the "Havok Filter Copy" group which must match.<br />
*'''Process Contact Callback Delay:''' Determines how often collision is calculated. Typically always 65535. There is a copy called "Process Contact Callback Delay 2" which must match.<br />
*'''Collision Response:''' Determines what to do when collision is detected. Typically always RESPONSE_SIMPLE_CONTACT, unless it is a phantom collision (sensor). There is a copy called "Collision Response 2" which must match.<br />
*'''Translation/Rotation:''' Translates and rotates the collision mesh. Only enabled in bhkRigidBodyT blocks.<br />
*'''<span id="inertia tensors"></span>Inertia Tensors:''' Determines the force necessary to rotate an object around each axis. Ideally would be calculated based on the mass and dimensions of the object, but can be copied from a similar vanilla object, or tweaked until it looks right in game. m11 corresponds to the X-axis, m22 to the y-axis, and m33 to the z-axis. Higher values make the object turn more slowly around that axis. Importantly, if a clutter object lacks inertia tensors, it will slide or float away when Havoked, carrying other nearby clutter with it. Conversely, if a static object has inertia tensors, it will move around when Havok simmed in CK, when it should not.<br />
*'''Center:''' The center of mass. May not be where the object is held when picked up, since that is determined by the origin point of the nif. If the center of mass is not <tt>0,0,0</tt> in the rigid body, the object will turn over when picked up. If the center of mass is below z=0, the object will right itself when picked up. If the center of mass is above z=0, it will flip upside down.<br />
*'''Mass:''' Mass in kg. <br />
*'''Linear Damping:''' How much the object's linear velocity is slowed over time. Typically 0.1.<br />
*'''Angular Damping:''' How much the object's angular velocity is slowed over time. Typically 0.5.<br />
*'''Friction:''' How much the object resists sliding (NifSkope's description is reversed). Typically 0.5.<br />
*'''Restitution:''' How "bouncy" the object is. Less than 1 loses velocity on each bounce, greater than 1 gains velocity. Typically 0.4.<br />
*'''Penetration Depth:''' How far collisions may protrude into the object before being stopped.<br />
*'''Motion System:''' The "category" of collision. MO_SYS_SPHERE_STABILIZED is typical for all clutter. MO_SYS_FIXED is typical for statics. MO_SYS_BOX_INERTIA is required for animated statics.<br />
*'''Enable Deactivation:''' Whether the object can have its Havok sim stopped if its velocity is low enough. Yes for moving objects, no for statics.<br />
*'''Solver Deactivation:''' How aggressively the engine tries to stop the Havok sim. SOLVER_DEACTIVATION_LOW for moving objects, SOLVER_DEACTIVATION_OFF for statics.<br />
*'''Quality Type:''' Determines the priority and quality of motion. MO_QUAL_MOVING for moving objects, MO_QUAL_FIXED or MO_QUAL_INVALID for statics.<br />
<br />
===Collision Material===<br />
Collision material is set in each shape. It determines the sound and visual effect when the player strikes it with a weapon, as well as whether arrows stick in it or bounce off, whether it bleeds, and what sound it makes when walked on. Stair materials are used to keep the player from getting stuck when walking up stairs. Compressed meshes can have multiple materials per shape.<br />
<br />
==Troubleshooting==<br />
; The nif has collision, but it doesn't seem to in game. : It is likely missing [[AU:NIF Data Format#BSXFlags node|BSXFlags]].<br />
; The object slides away when it or a nearby clutter item is touched. : It is missing [[#inertia tensors|inertia tensors]]. Copy them from a vanilla object with similar shape and size.<br />
; The nif looks fine, but it crashes the game/CK. : Make sure the blocks are in the proper order (use ''Spells > Reorder Blocks'' in NifSkope). Collision blocks must be in '''descending''' order.<br />
; The object floats slightly above the surface it is placed on. : Decrease the radius value of the shape. Default is 0.05. Try 0.01 or 0.005. Very small objects like forks, spoons, or lockpicks may need an even smaller radius.<br />
<br />
==Further Reading==<br />
*[https://cgl.ethz.ch/Downloads/Seminar_Arbeiten/2002_03/Havok_Overview.pdf Havok Game Dynamics SDK - Product Overview]<br />
* [https://youtube.com/watch?v=Ammbvh0PbKM 'Types of Collision' Arcane University Lecture on collisions by teacher Candoran]<br />
[[Category:Arcane University-3D Art]] [[Category:Arcane University-Method]] [[Category:Arcane University-Implementation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Exporting_animated_statics_using_ck-cmd&diff=4848Arcane University:Exporting animated statics using ck-cmd2023-11-29T06:07:02Z<p>Gamma Metroid: /* Collision */ MSTT also works</p>
<hr />
<div>{{trail|Animation}}<br />
[[File:anim_tut_puzcandoor_setup.png|280px|thumb|right|A keyframed animation in Blender]]<br />
This tutorial will guide you through the export of animated statics to Skyrim using [[AU:CK-CMD for Skyrim|ck-cmd]]. At this point you should already have your animation created in whatever 3D software you are most comfortable with. You should also be familiar with [[AU:Nifskope for Skyrim|NifSkope]] and be able to manipulate blocks and their properties. This tutorial is meant to help you overcome some of the bumps in the export process.<br />
<br />
==Setup and export==<br />
[[File:anim_tut_export_settings_1.png|thumb|upright=.6|right|Recommended export settings in Blender]]<br />
One of the most common uses for animated static is a door that opens and closes. This is fairly simple. For this section we will use Skywind's puzzle canal door as an example. Each object that you want to move is animated with keyframes. If there are multiple objects that move together, they can be parented to an armature bone or empty node which contains the animation.<br />
<br />
In Blender, there are a few export settings to note, in addition to the usual scale application: Under "Bake Animation," be sure to uncheck both "NLA Strips" and "All Actions." This will ensure that all objects are part of the same animation, rather than split into several. You may also need to set the axes to "Y Forward" if the animations turn on the wrong axis after export.<br />
<br />
==NifSkope adjustments==<br />
After conversion to nif using ck-cmd, delete the "animations" folder that comes out. You can also remove the BSBehaviorGraphExtraData in the nif (these are used for some things like levers and pullbars—behaviors are beyond the scope of this tutorial). If you want multiple animations, for example an "open" and "close," simply export them both separately, and copy and paste the second NiControllerSequence into your working nif file. Renaming them to "Open" and "Close" is all the you need to do for the game to use them as door animations (container animations function exactly the same, incidentally). An animation named "SpecialIdle" will play constantly on a loop.<br />
<br />
===Collision===<br />
At this point you can add [[AU:Mesh Collisions|collision]] to any nodes within the nif. It can have any combination of moving and static collision, and can be any type of shape. For moving collisions, make sure the correct flags are set: SET_LOCAL, in addition to the typical ACTIVE and SYNC_ON_UPDATE. In the bhkrigidBody of animated collision, the Layer should be SKYL_ANIMSTATIC, motion system should be BOX_INERTIA, deactivation should be OFF, and quality type should be FIXED. Also be sure the appropriate [[AU:NIF Data Format#BSXFlags|BSXFlags]] are enabled.<br />
<br />
{{note|If you want a static with a SpecialIdle animation to have moving collision, be sure to make it an Activator or Moveable Static in CK. Otherwise the collision will not move, although the visible mesh will.}}<br />
<br />
===Sound===<br />
[[File:anim_tut_sound.png|thumb|right|An example of a sound text key]]<br />
To give the animation an associated sound, add a text key to the controller sequence with the name of the Sound Descriptor form in CK. This overrides any sounds applied in CK.<br />
<br style="clear:both" /><br />
==Translations==<br />
[[File:anim_tut_export_settings_2.png|thumb|right|Set "Simplify" to zero to disable it if using translations]]<br />
While rotations export fairly easily, translations do not. They require some extra wrangling, otherwise they do not work. In this case, change "simplify" in the fbx export settings to 0 to disable it. This will leave some excess data in the nif that needs to be cleaned up, otherwise it can crash the game/CK, or make the object appear in the wrong place entirely in game (and probably still not work). Unchecking "Key All Bones" and "Force Start/End Keying" has no effect.<br />
<br />
In the NiMultiTargetTransformController, remove all extra targets except those that you want to be animated. In the NiControllerSequence, remove all controlled blocks except those you want to be animated. In the NiDefaultAVObjectPalette, remove all Objs except those you want to be animated '''and the root node'''.<br />
[[File:anim_tut_cleanup.png|800px|center]]<br />
<br />
Then delete all remaining loose blocks from the nif and apply the reorder blocks spell.<br />
<br />
==See Also==<br />
* [https://www.youtube.com/watch?v=4DrN_AS28qk Animating Crash Course - Basic Static Animations in Blender (Youtube)]: creating a basic animated static in Blender, using an armature<br />
<br />
[[Category:Asset Tutorial]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Main_Page&diff=4837Main Page2023-11-12T21:47:32Z<p>Gamma Metroid: Undo revision 4836 by 118.208.11.43 (talk) rv vandalism</p>
<hr />
<div>{| style="width:100%; background-color: transparent; border: 1px solid #464646;"<br />
| colspan=3 style="padding: 1em;" |<br />
'''Welcome to the [[Project:About|Beyond Skyrim Wiki]]''', the official wiki for the [[Beyond Skyrim]] mod project! Beyond Skyrim is a massive multi-team endeavor that opens the borders of Skyrim to bring the neighboring provinces to life. No longer will you be turned back at the borders of Skyrim, but you can travel onwards to the lands beyond. The Beyond Skyrim project is divided into eight separate Projects which are shown below, as well as five pre-release areas that allow you to journey to small sections of their respective provinces before the whole project is released.<br />
<br />
If you would like to help us build our content by adding details on the lore and background of the Elder Scrolls universe as portrayed by Beyond Skyrim, we would very much appreciate it. You can learn how to get started as an editor by reading over the help files of the <span class="plainlinks">[http://en.uesp.net/wiki/Help:Contents UESPWiki]</span>.<br />
<br />
==Projects==<br />
|- style="vertical-align:top;"<br />
| style="padding: 0 1em 0 1em;" |<br />
:<big>[[Argonia:Main Page|Argonia: The Roots of the World]]</big><br />
:<big>[[Cyrodiil:Main Page|Cyrodiil: The Seat of Sundered Kings]]</big><br />
:<big>[[Elsweyr:Main Page|Elsweyr: Sugar and Blood]]</big><br />
:<big>[[Iliac Bay:Main Page|Iliac Bay: Tower of Dawn]]</big><br />
| style="padding: 0 1em 0 1em;" |<br />
:<big>[[Morrowind:Main Page|Morrowind: The Star-Wounded East]]</big><br />
:<big>[[Roscrea:Main Page|Roscrea: Voices of the Deep]]</big><br />
:<big>[[Atmora:Main Page|Atmora: Expedition to the North]]</big><br />
:<big>[[Valenwood:Main Page|Valenwood: Lure of the Wilds]]</big><br />
| rowspan=2 style="padding: 0 1em 0 0;" | [[File:Tamriel Full Map.jpg|thumb|right|Map of Tamriel]]<br />
|-<br />
| colspan=2 style="padding: 1em 1em 0 1em;" |<br />
===See Also===<br />
* '''[[Beyond Skyrim]]''' — More information about the Beyond Skyrim project, including details of the different teams, current releases, and the project charter.<br />
* '''[[Arcane University]]''' — Learn about the skills and tools needed for working on a Beyond Skyrim project with these tutorials created by our modders.<br />
* '''{{UESP|Beyond Skyrim:Main Page|Beyond Skyrim at UESP}}''' — Find gameplay details of released projects, such as quests, people, places, and more.<br />
|-<br />
| colspan=3 style="padding: 1em 1em 0 1em;" |<br />
----<br />
<div class="plainlinks" style="padding: 1em;" >[https://beyondskyrim.org Main Website] • [https://discord.gg/ShV6PDqtxE Discord] • [https://wiki-dev.beyondskyrim.org/wiki/ Dev Wiki]</div><br />
|}</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Hiding_Texture_Seams_with_Blended_Decals&diff=4791Arcane University:Hiding Texture Seams with Blended Decals2023-10-18T06:18:59Z<p>Gamma Metroid: typo</p>
<hr />
<div>{{Trail|3D Art}}<br />
[[File:Blended decals beamtutorial.jpg|thumb|right|Tutorial for the specific case of texturing end caps of wooden beams. The recommendation to set the threshold to 64 can be disregarded.]]<br />
<br />
3D models are UV unwrapped into two dimensions in order for textures to be applied to them. At the seams where these models are unwrapped, there will also be seams in the texture that are plainly visible in-game. There is, however, a way to mask these seams by creating a blended transition between the two surrounding textures. This tutorial will show how to do this using decals.<br />
<br />
Once your mesh is UV unwrapped and textured, select the faces comprising the area where a blended transition should happen. Often this will be a "skirt", i.e. a strip of faces running along the seam. The skirt mesh might cover only one of the materials on one side of the seam, or it can cover the seam and thus parts of both materials. In other cases where one of the textures is only on a small amount of geometry (like the end cap of a wooden beam), the blending zone may cover all of this texture's faces.<br />
<br />
Duplicate these faces (shift+D in blender) and break into a new mesh (P, selection). If the mesh covers only one of the materials (either as a skirt mesh or as fully duplicated geometry), UV it so it is a continuation of the ''other'' material. If it's a skirt mesh that overlaps both materials, then the UV doesn't matter.<br />
<br />
Add a vertex color attribute the new mesh, if it doesn't already have one. In the alpha channel, paint all the outer vertices black. These will become the more transparent vertices. The vertices with high alpha values (i.e. more white) will be more opaque.<br />
<br />
On a skirt mesh that straddles two materials, this will be the vertices on both outer edges straddling the strip of faces. In this case, be sure there are intermediate vertices that are white, or the whole thing will be invisible. If the mesh covers all the geometry of one of the textures, then only the edge going over the seam needs to be painted black.<br />
<br />
Add the following flags to the shader property, in addition to the usual shader flags.<br />
* Decal<br />
* Dynamic_Decal<br />
* Vertex_Alpha<br />
* Vertex_Colors<br />
<br />
In Nifskope, add a NiAlphaProperty to the Trishape with vertex alpha. Turn "Enable Blending" on and "Enable Testing" off.<br />
<br />
{{note|Trishapes with alpha properties can not receive Material Shaders (Directional Shaders).}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:Blended decals skirt demonstration.png|Demonstration of a skirt mesh covering only the blue material, UVed with red, and the edge that must be painted black.<br />
File:Blended decals skirt demonstration overlapping.png|Demonstration of a skirt mesh (green) covering the seam (red line) and parts of both materials, and the two edges to be painted black.<br />
File:Blended decals demonstration patch.png|Demonstration of an object continuously textured with blue, with a red texture overlaid on part of it (overlapping area in green), and a skirt mesh used for blending.<br />
File:Blended decals chest.jpg|Example of using a longer object and its textures (left) to create a shorter variant (center) with blended decals to hide the seams (right)<br />
File:Blended decals skirt.png|Example of a skirt mesh between two different materials<br />
File:Blended decals destroyed.png|Destroyed variant of an asset with a blended decal between the intact and debris textures<br />
File:Blended decals patched geometry.png|Example of a continuously textured asset with another texture patched on top, also fully acting as the blended decal<br />
File:Blended decals patched skirt.png|Example of a continuously textured asset with another texture patched on top, with skirt meshes for blending<br />
</gallery></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4790Arcane University:NIF Data Format2023-10-18T06:08:02Z<p>Gamma Metroid: /* Texture Slots */ widen table</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShapeData into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, LE nifs work fine in Special Edition, and do not need to be converted. In fact, SSE nifs use less precise values, so LE nifs are recommended regardless of which version of the game you are modding.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SSE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:90%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use BC1 if transparency is not needed, or if only full transparency is needed.<br />
** Use BC3 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use BC3 or BC7 because of the importance of the alpha layer in this file. Bethesda uses BC3 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: BC1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: BC1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: BC1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: BC1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: BC1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: BC1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Hiding_Texture_Seams_with_Blended_Decals&diff=4783Arcane University:Hiding Texture Seams with Blended Decals2023-09-19T22:25:45Z<p>Gamma Metroid: note about MATO</p>
<hr />
<div>{{Trail|3D Art}}<br />
[[File:Blended decals beamtutorial.jpg|thumb|right|Tutorial for the specific case of texturing end caps of wooden beams. The recommendation to set the threshold to 64 can be disregarded.]]<br />
<br />
3D models are UV unwrapped into two dimensions in order for textures to be applied to them. At the seams where these models are unwrapped, there will also be seams in the texture that are plainly visible in-game. There is, however, a way to mask these seams by creating a blended transition between the two surrounding textures. This tutorial will show how to do this using decals.<br />
<br />
One your mesh is UV unwrapped and textured, select the faces comprising the area where a blended transition should happen. Often this will be a "skirt", i.e. a strip of faces running along the seam. The skirt mesh might cover only one of the materials on one side of the seam, or it can cover the seam and thus parts of both materials. In other cases where one of the textures is only on a small amount of geometry (like the end cap of a wooden beam), the blending zone may cover all of this texture's faces.<br />
<br />
Duplicate these faces (shift+D in blender) and break into a new mesh (P, selection). If the mesh covers only one of the materials (either as a skirt mesh or as fully duplicated geometry), UV it so it is a continuation of the ''other'' material. If it's a skirt mesh that overlaps both materials, then the UV doesn't matter.<br />
<br />
Add a vertex color attribute the new mesh, if it doesn't already have one. In the alpha channel, paint all the outer vertices black. These will become the more transparent vertices. The vertices with high alpha values (i.e. more white) will be more opaque.<br />
<br />
On a skirt mesh that straddles two materials, this will be the vertices on both outer edges straddling the strip of faces. In this case, be sure there are intermediate vertices that are white, or the whole thing will be invisible. If the mesh covers all the geometry of one of the textures, then only the edge going over the seam needs to be painted black.<br />
<br />
Add the following flags to the shader property, in addition to the usual shader flags.<br />
* Decal<br />
* Dynamic_Decal<br />
* Vertex_Alpha<br />
* Vertex_Colors<br />
<br />
In Nifskope, add a NiAlphaProperty to the Trishape with vertex alpha. Turn "Enable Blending" on and "Enable Testing" off.<br />
<br />
{{note|Trishapes with alpha properties can not receive Material Shaders (Directional Shaders).}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:Blended decals skirt demonstration.png|Demonstration of a skirt mesh covering only the blue material, UVed with red, and the edge that must be painted black.<br />
File:Blended decals skirt demonstration overlapping.png|Demonstration of a skirt mesh (green) covering the seam (red line) and parts of both materials, and the two edges to be painted black.<br />
File:Blended decals demonstration patch.png|Demonstration of an object continuously textured with blue, with a red texture overlaid on part of it (overlapping area in green), and a skirt mesh used for blending.<br />
File:Blended decals chest.jpg|Example of using a longer object and its textures (left) to create a shorter variant (center) with blended decals to hide the seams (right)<br />
File:Blended decals skirt.png|Example of a skirt mesh between two different materials<br />
File:Blended decals destroyed.png|Destroyed variant of an asset with a blended decal between the intact and debris textures<br />
File:Blended decals patched geometry.png|Example of a continuously textured asset with another texture patched on top, also fully acting as the blended decal<br />
File:Blended decals patched skirt.png|Example of a continuously textured asset with another texture patched on top, with skirt meshes for blending<br />
</gallery></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Hiding_Texture_Seams_with_Blended_Decals&diff=4782Arcane University:Hiding Texture Seams with Blended Decals2023-09-18T19:22:18Z<p>Gamma Metroid: update</p>
<hr />
<div>{{Trail|3D Art}}<br />
[[File:Blended decals beamtutorial.jpg|thumb|right|Tutorial for the specific case of texturing end caps of wooden beams. The recommendation to set the threshold to 64 can be disregarded.]]<br />
<br />
3D models are UV unwrapped into two dimensions in order for textures to be applied to them. At the seams where these models are unwrapped, there will also be seams in the texture that are plainly visible in-game. There is, however, a way to mask these seams by creating a blended transition between the two surrounding textures. This tutorial will show how to do this using decals.<br />
<br />
One your mesh is UV unwrapped and textured, select the faces comprising the area where a blended transition should happen. Often this will be a "skirt", i.e. a strip of faces running along the seam. The skirt mesh might cover only one of the materials on one side of the seam, or it can cover the seam and thus parts of both materials. In other cases where one of the textures is only on a small amount of geometry (like the end cap of a wooden beam), the blending zone may cover all of this texture's faces.<br />
<br />
Duplicate these faces (shift+D in blender) and break into a new mesh (P, selection). If the mesh covers only one of the materials (either as a skirt mesh or as fully duplicated geometry), UV it so it is a continuation of the ''other'' material. If it's a skirt mesh that overlaps both materials, then the UV doesn't matter.<br />
<br />
Add a vertex color attribute the new mesh, if it doesn't already have one. In the alpha channel, paint all the outer vertices black. These will become the more transparent vertices. The vertices with high alpha values (i.e. more white) will be more opaque.<br />
<br />
On a skirt mesh that straddles two materials, this will be the vertices on both outer edges straddling the strip of faces. In this case, be sure there are intermediate vertices that are white, or the whole thing will be invisible. If the mesh covers all the geometry of one of the textures, then only the edge going over the seam needs to be painted black.<br />
<br />
Add the following flags to the shader property, in addition to the usual shader flags.<br />
* Decal<br />
* Dynamic_Decal<br />
* Vertex_Alpha<br />
* Vertex_Colors<br />
<br />
In Nifskope, add a NiAlphaProperty to the Trishape with vertex alpha. Turn "Enable Blending" on and "Enable Testing" off.<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:Blended decals skirt demonstration.png|Demonstration of a skirt mesh covering only the blue material, UVed with red, and the edge that must be painted black.<br />
File:Blended decals skirt demonstration overlapping.png|Demonstration of a skirt mesh (green) covering the seam (red line) and parts of both materials, and the two edges to be painted black.<br />
File:Blended decals demonstration patch.png|Demonstration of an object continuously textured with blue, with a red texture overlaid on part of it (overlapping area in green), and a skirt mesh used for blending.<br />
File:Blended decals chest.jpg|Example of using a longer object and its textures (left) to create a shorter variant (center) with blended decals to hide the seams (right)<br />
File:Blended decals skirt.png|Example of a skirt mesh between two different materials<br />
File:Blended decals destroyed.png|Destroyed variant of an asset with a blended decal between the intact and debris textures<br />
File:Blended decals patched geometry.png|Example of a continuously textured asset with another texture patched on top, also fully acting as the blended decal<br />
File:Blended decals patched skirt.png|Example of a continuously textured asset with another texture patched on top, with skirt meshes for blending<br />
</gallery></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:DDS_Data_Format&diff=4751Arcane University:DDS Data Format2023-09-08T23:44:16Z<p>Gamma Metroid: dxt -> bc</p>
<hr />
<div>Almost all textures used by Skyrim are DDS (Direct Draw Surface) files. This article contains information and advice on the different types of DDS files, and how to use them.<br />
<br />
== Texture Types and the DXT/BC format ==<br />
<br />
===What is the DDS file format?===<br />
*Block Compression (BC), formerly known as DXT, is a set of compression algorithms or codecs applied to raster/bitmap images. The set is also known as S3 Texture Compression (S3TC). They all convert 4×4 blocks of pixels to either 64-bits or 128-bits depending on the codec. All are lossy algorithms. The original codecs were created by S3 Graphics, but many non-encumbered alternatives exist now. There are many different codecs: BC1, BC2, BC3, etc. I’ll talk more about them in a moment. DDS (Direct Draw Surface) is an image file format, rather like a container for storing image data compressed using one of the DXT codecs. It was developed by Microsoft and introduced with DirectX 7. Together, a DDS file containing data organized using Block Compression creates an image file that can be used in most graphical applications, at least those that support DDS natively or via a plug-in. DDS files are very common in the game industry, where advantages in loading speed and video memory savings outweigh disadvantages. <br />
<br />
===How does it work?===<br />
*Block Compression sees images as collections of 4×4 blocks of pixels called "texels". For every texel, the codec selects two colors from the texel, each determining one end of a color range of 4 colors. The middle two colors are interpolated. The sixteen pixels of the texel are then assigned a 2-bit index (0-3) that maps them to the color range. The two representative colors are stored as 16-bit RGB values (5:6:5). So each texel requires 2×16 bits for the colors, plus 16×2 bits for the indices, giving a total of 64 bits for each texel, which equates to 4 bits per pixel. So for any set of images having the same dimensions, compressed size will always be the same. <br />
<br />
===What if the image has an alpha channel?===<br />
* This depends on the codec used. In BC3, the alpha channel is encoded using a second set of 64 bits for each texel. BC3 stores alpha information in a way that is almost the same as color information. Two alpha values are selected and used as the extremes for a range of transparency values. The alpha values are represented by 8 bits each, and the range indices by 3 bits each, allowing for gradients of up to 8 shades. BC2 handles the alpha channel a little differently. Each pixel gets 4 bits to represent its alpha, for a total of 16 unique values of transparency. This allows the alpha channel to be represented more accurately than BC3, but with less subtle transitions. So, for an image with no alpha using DXT1, compression results in an image using 4 bpp (bits per pixel). For an image using BC2 or BC3 incorporating an alpha channel, the requirements will be 8 bpp. Note that the actual image size will likely be larger, as it will frequently include mipmap data.<br />
<br />
===What are the advantages of DDS files and Block Compression?===<br />
*Fast load times. DDS files are ready to be used by the graphics system and can be read straight into graphics memory with little overhead. In situations where many files are being constantly swapped in/out of the graphics unit, this can be a substantial savings and can reduce "lag", especially with big texture files. Mipmaps can be pre-generated and included in the DDS files. This is another savings in load times and gives the graphic designer control over mipmap construction. More on mipmaps in a moment. Data remains compressed in video memory. All image formats except DDS are loaded into graphics memory in flat, uncompressed state. (And uncompressing them takes time and resources.) DDS files remain in their compressed state in video RAM, using special algorithms on the video card to retrieve data on demand. Compression ratio is 6:1 if no alpha channel is used, or 4:1 if an alpha channel is used. This can result in huge video memory savings.<br />
<br />
===What are the disadvantages?===<br />
*Block Compression codecs are lossy. What is stored as compressed data is not the same as the original image, and on a fine level it may not even be close. Images with high contrast regions such as print or cartoon-like colors and borders will likely generate visible artifacts, particularly with smaller resolutions. For this reason DDS can be problematic when used with normal maps, though there are work-arounds. I’ll come back to this issue. Never use DDS files for editing and archiving. The compression degrades the original colors. It is not a good format where retention of the true color is critical, particularly in those situations where fine differences may have a large impact. Block Compression generates images using a 16 bit color depth. Where formats like JPG or PNG use 8 bits per channel per pixel (RGB 8:8:8) for a 24-bit color depth (32 bits with PNGs having an alpha channel), Block Compression reduces the spectrum down to 5:6:5 bits using an interpolation algorithm to arrive at the new color values. In short, you lose much of the original color range. But many graphic applications in games and sims don't require tight control over the colors, and a good choice of the color palette can eliminate any visible results of this effect. File size on disk can be large for DDS. For example, a 1024×1024 image with an alpha channel and mipmaps will result in a 1.37MB file. But file size is a relatively small consideration these days. Game/simulation performance matters far more.<br />
<br />
===Are there any image dimension limitations?===<br />
*DDS images can be of any dimension expressed in powers of two up to the limits of your application or hardware, but no dimension can be less than 4. So 1024×512 is fine, but 2048×2 is not. Since Block Compression works with texels and each texel is a 4×4 block of pixels, it follows that it can’t work with an image with a dimension smaller than 4.<br />
<br />
==Mipmaps==<br />
An object seen up close needs a relatively high-resolution texture so that it doesn’t look pixelated. But an object seen in the distance needs much less resolution to look reasonable, and smaller resolutions require less resources. Mipmaps are lower resolution versions of the same image, progressively decreasing in size. These low-res images can then be used for objects that are far away. DDS files can have pre-generated mipmaps included, so that the renderer doesn't have to create them on the fly. The downside is the additional file size: this process increases data size by 33%, both size on disk and in video memory.<br />
<br />
A texture without mipmaps will not crash the game, but may cause significant drops in framerate, and will look "grainy" at a distance. All Skyrim textures should have mipmaps, except for facegen textures and UI art.<br />
<br />
==There are tons of compression codecs! Which should I use?==<br />
Block Compression (BC) comes in a lot of flavors. Fortunately most are specialty applications. For common situations you’ll probably need to consider only two: BC1 and BC3 (for Skyrim LE), or BC1 and BC7 (for SSE).<br />
===BC1===<br />
Formerly known as DXT1, BC1 provides the smallest file size, at the cost of havinga 1-bit alpha channel. This can be useful for diffuse textures with no transparency, or that use alpha testing but no blending (this is sometimes called "cutout alpha").<br />
* RGB, 4 bits per pixel, no alpha or 1 bit (black or white) alpha<br />
* BC1 is a fixed 8:1 compression ratio<br />
===BC3===<br />
Formerly known as DXT5, BC3 was the go-to codec for most images that include an alpha channel in Skyrim LE (diffuse with transparency, and normal maps with specular). The cost is double the file size of a BC1 image. If compressing textures for Skyrim SE, use BC7 instead.<br />
* ARGB, 8 bits per pixel, interpolated alpha<br />
* BC3 is a fixed 4:1 compression ratio<br />
===BC4===<br />
BC4 is a single-channel compression codec. It is ideal for textures like environment masks that contain only one color channel. Does not work in Skyrim LE.<br />
* grayscale, 8 bits per pixel, no alpha<br />
* BC4 is a fixed 2:1 compression ratio<br />
===BC7===<br />
BC7 is a more recent compression algorithm that is supported by Skyrim SE, but not LE. BC7 is preferred over BC3 in nearly all cases, because it is the same size but at a higher quality. BC1 is still preferred for textures without alpha channels, or 1-bit ("cutout") alpha, since it is much smaller. When exporting as BC7, always use the slowest compression algorithm for the highest quality.<br />
* RGB or RGBA, 8 bits per pixel, interpolated alpha<br />
* BC7 is same 4:1 compression ratio as BC3 and BC5<br />
<br />
{{note|Images that are already compressed in .dds format cannot be increased in quality by reformatting them, unless you use the original ''uncompressed'' texture as a base.}}<br />
<br />
==Converting to DDS file format==<br />
In order to convert your .png/tga textures to the Skyrim friendly DDS format, you must have the [[Arcane_University:3D_Art#Convert_Maps_to_DDS|necessary software]]. <br />
<br />
Second, you must make sure your textures conform to the [[Arcane_University:NIF_Data_Format#Texture_Slots|NIF Texture Slots]]; that means you must have at the very least a diffuse map and a normal map. How you achieve this differs depending on your workflow and texturing program.<br />
<br />
===Automatically Combine and Export Maps===<br />
If you use '''Substance Painter''' you should download the [https://www.nexusmods.com/skyrimspecialedition/mods/44400 Substance Painter to Skyrim] plugin. This plugin mimics Skyrim's renderer as close as possible, and allows you to easily export the textures in the correct maps. So instead of exporting separate images for base color, height, metallic, normal and roughness textures, the plugin combines these into the PNG/TGA diffuse, normal, glow and environment maps for you.<br />
<br />
===Manually Combining Textures===<br />
If you work in '''Quixel Mixer''' or '''Blender''', a plugin such as the one for Substance Painter does not exist (yet). That means you must export specific textures and combine them in a [[AU:3D_Art#2D_texturing_program|2D software]] such as Gimp or Photoshop. It's important that the 2D software has the Layer Modes feature (such as Multiply) as we'll need that to combine our textures. <br />
<br />
[[File:Manually_Combining_Maps_for_DDS_Diffuse.png|thumb|600px|Albedo, AO and Curvature Map combined to create a diffuse.]]<br />
====Textures for the Diffuse====<br />
*Albedo/Base Color (Texturing)<br />
*Ambient Occlusion (AO) (Baking)<br />
*Curvature (Baking)<br />
<br />
In your conversion software, you place Base Color (albedo) as bottom solid layer - no layer modes needed. Then place the Ambient Occlusion image on 100% Multiply Layer Mode above the Base Color Layer. And finally, place the Curvature image on 40% Soft Light above AO and Base Colour.<br />
<br />
Tada! Your diffuse is now ready to be exported as DDS.<br />
<br />
====Textures for the Normal Map====<br />
*Normal Map (Baking)<br />
*Specular (Texturing)<br />
<br />
Your normal map is a bit different than the diffuse, as we will place the specular map in the alpha channel.<br />
<br />
<br />
'''Photoshop Instructions'''<br />
*Step 1: Open normal map<br />
*Step 2: Import specular map or inverted roughness map<br />
*Step 3: Select (ctrl+a) and copy (ctrl+c) specular map<br />
*Step 4: Create the alpha channel<br />
*Step 5: Paste specular onto alpha channel<br />
*Step 6: Delete specular map layer and enable all channels<br />
<br />
Confused? [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif Watch this video].<br />
<br />
<br />
'''GIMP Instructions'''<br />
<br />
Visit our [https://wiki.beyondskyrim.org/wiki/Arcane_University:Gimp_for_Skyrim GIMP for Skyrim] wiki page for instructions.<br />
<br />
===Converting PNG to DDS===<br />
Now that you know how to export textures and combine the maps, it's time to convert them to DDS file format. Regardless of software, this is a very straightforward process. Most meshes must always have a diffuse and a normal map, but there are additional optional maps you can generate should your asset benefit from it.<br />
<br />
<br />
<center>'''Simply open the PNG/TGA of your diffuse, normal map, environment, and/or glow map in the software, and File > Save/Export As > DDS.'''</center><br />
<br />
<center>{{note|'''Always generate mipmaps.'''}}</center><br />
<br />
<br />
For information on what BC/DXT to choose, read more above in [[Arcane_University:DDS_Data_Format#There_are_tons_of_DXT_codecs.21_Which_should_I_use.3F|What to Choose?]] or on the [[AU:NIF_Data_Format|NIF]] page. On the NIF page you'll also find information on where and how to attach the DDS textures to your NIF, and naming conventions for your maps. PS: This is the unique asset workflow. If you're using [https://www.youtube.com/watch?v=uUJShalzWy8 trim sheets] you might have to use a different workflow.<br />
<br />
Although the export process is similar for most software, each one uses a different compressor. Some result in better quality than others. These are some exporters, ordered from highest quality to lowest, with a brief summary of their advantages and disadvantages:<br />
<br />
{| class="wikitable"<br />
|+ <span id="Comparison of DDS Exporters"></span>Comparison of DDS Exporters<br />
|-<br />
| 1. [https://developer.nvidia.com/nvidia-texture-tools-exporter '''Nvidia Texture Tools (NVTT) (Standalone and/or Photoshop Plugin)''']<br />
| These first two are tied in terms of quality. NVTT does require an Nvidia graphics card, but it has a nice GUI and outputs excellent quality. It comes as either a standalone application, which supports command-line use and batch scripts, or a Photoshop plugin.<br />
|-<br />
| 1. [https://github.com/Unity-Technologies/crunch/tree/unity '''Crunch''']<br />
| Crunch is designed for more advanced compression, and is a command-line tool, but it also outputs excellent quality DDS when configured properly.<br />
|-<br />
| 2. [https://gpuopen.com/compressonator/ '''Compressonator''']<br />
| Requires an AMD graphics card, but outputs good quality and has a nice GUI. Also supports command-line use.<br />
|-<br />
| 3. [https://www.getpaint.net/ '''Paint.NET''']<br />
| Very easy to use, supports all DDS formats. Quality is middle-of-the-road, but usually fine for Skyrim's purposes. It can be used with any hardware, including integrated graphics, and does not rely on proprietary software like Photoshop.<br />
|-<br />
| 4. [https://software.intel.com/content/www/us/en/develop/articles/intel-texture-works-plugin.html '''Intel Texture Works Plugin for Photoshop''']<br />
| Has support for all DDS formats, but suffers from discoloration and blocky gradients.<br />
|-<br />
| 5. [https://www.gimp.org '''GIMP''']<br />
| Free, does not require special graphics cards or proprietary software, but has inferior results and lacks support for BC7 entirely.<br />
|}<br />
<br />
For more detailed information, see [https://w3dhub.com/forum/topic/417101-dds-files-and-dxt-compression/?tab=comments#comment-671198 this post].<br />
<br />
=== DXT and Normal Maps ===<br />
A normal map stores information that allows lighting calculations to be done at the per-pixel level rather than interpolating between vertices. This can make lighting much smoother and more graduated, or it can make significant changes how lighting affects a given point. The common use of a normal map is to tweak surface data to give the illusion of having extra detail. It’s not real detail– it doesn’t actually change the geometry, but it does change the lighting and can give very realistic results without adding polygonal complexity.<br />
Normal map data is essentially a normal vector for each pixel. The normal gives an indication of the "facing" of the pixel. Normal maps use the RGB color space to store the data needed for the effect– the 24 bits for each pixel are used to encode the pixel's vector. Given that a color in this context is really a vector, changing a color can significantly alter the scale and direction of that vector, thus altering the effects at any given location. Since DXT compression does not exactly preserve the colors, DXT images can make a real mess of normal maps.<br />
<br />
You can still use DXT compression for normal maps. In fact it’s common to do so in games and sims, where resolutions are fairly low and resources come at a premium. Just be aware that the end result is likely to be rather mangled. For low-res situations it's usually not a big problem. Using BC3 or BC7 compression mitigates this somewhat. Using uncompressed textures is not recommended.<br />
<br />
== See Also ==<br />
*[https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats Understanding BCn Texture Compression Formats] by Nathan Reed<br />
*[https://w3dhub.com/forum/topic/417101-dds-files-and-dxt-compression/?tab=comments#comment-671198 Comparison of different DDS compressors]<br />
*[[wikipedia:DirectDraw Surface|DirectDraw Surface]] on Wikipedia<br />
*[[wikipedia:S3 Texture Compression|S3 Texture Compression]] on Wikipedia<br />
*[[Arcane University:NIF Data Format]]<br />
<br />
<br />
[[Category:Arcane University-3D Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:DDS_Data_Format&diff=4750Arcane University:DDS Data Format2023-09-08T23:39:21Z<p>Gamma Metroid: /* There are tons of DXT codecs! Which should I use? */ correct some errors. also let's go with the BC naming scheme. also cutting bc2 because there isn't a reason to use it afaik</p>
<hr />
<div>Almost all textures used by Skyrim are DDS (Direct Draw Surface) files. This article contains information and advice on the different types of DDS files, and how to use them.<br />
<br />
== Texture Types and the DXT format ==<br />
<br />
===What is the DDS file format?===<br />
*DXT is a set of compression algorithms or codecs applied to raster/bitmap images. The set is also known as S3 Texture Compression (S3TC). They all convert 4×4 blocks of pixels to either 64-bits or 128-bits depending on the codec. All are lossy algorithms. The original codecs were created by S3 Graphics, but many non-encumbered alternatives exist now. There are many different codecs: DXT1, DXT3, DXT5, etc. I’ll talk more about them in a moment. DDS (Direct Draw Surface) is an image file format, rather like a container for storing image data compressed using one of the DXT codecs. It was developed by Microsoft and introduced with DirectX 7. Together, a DDS file containing data organized using a DXT code creates an image file that can be used in most graphical applications, at least those that support DDS natively or via a plug-in. DDS files are very common in the game industry, where advantages in loading speed and video memory savings outweigh disadvantages. <br />
<br />
===How does it work?===<br />
*DXT sees images as collections of 4×4 blocks of pixels called "texels". For every texel, DXT selects two colors from the texel, each determining one end of a color range of 4 colors. The middle two colors are interpolated. The sixteen pixels of the texel are then assigned a 2-bit index (0-3) that maps them to the color range. The two representative colors are stored as 16-bit RGB values (5:6:5). So each texel requires 2×16 bits for the colors, plus 16×2 bits for the indices, giving a total of 64 bits for each texel, which equates to 4 bits per pixel. So for any set of images having the same dimensions, compressed size will always be the same. <br />
<br />
===What if the image has an alpha channel?===<br />
* How DXT handles this depends on the codec used. In DXT5, the alpha channel is encoded using a second set of 64 bits for each texel. DXT5 stores alpha information in a way that is almost the same as color information. Two alpha values are selected and used as the extremes for a range of transparency values. The alpha values are represented by 8 bits each, and the range indices by 3 bits each, allowing for gradients of up to 8 shades. DXT3 handles the alpha channel a little differently. Each pixel gets 4 bits to represent its alpha, for a total of 16 unique values of transparency. This allows the alpha channel to be represented more accurately than DXT5, but with less subtle transitions. So, for an image with no alpha using DXT1, compression results in an image using 4 bpp (bits per pixel). For an image using DXT3 or DXT5 incorporating an alpha channel, the requirements will be 8 bpp. Note that the actual image size will likely be larger, as it will frequently include mipmap data.<br />
<br />
===What are the advantages of DDS files and DXT compression?===<br />
*Fast load times. DDS files are ready to be used by the graphics system and can be read straight into graphics memory with little overhead. In situations where many files are being constantly swapped in/out of the graphics unit, this can be a substantial savings and can reduce "lag", especially with big texture files. Mipmaps can be pre-generated and included in the DDS files. This is another savings in load times and gives the graphic designer control over mipmap construction. More on mipmaps in a moment. Data remains compressed in video memory. All image formats except DDS/DXT are loaded into graphics memory in flat, uncompressed state. (And uncompressing them takes time and resources.) DDS/DXT files remain in their compressed state in video RAM, using special algorithms on the video card to retrieve data on demand. Compression ratio is 6:1 if no alpha channel is used, or 4:1 if an alpha channel is used. This can result in huge video memory savings.<br />
<br />
===What are the disadvantages?===<br />
*DXT codecs are lossy. What is stored as compressed data is not the same as the original image, and on a fine level it may not even be close. Images with high contrast regions such as print or cartoon-like colors and borders will likely generate visible artifacts, particularly with smaller resolutions. For this reason DXT can be problematic when used with normal maps, though there are work-arounds. I’ll come back to this issue. Never use DDS files for editing and archiving. The compression degrades the original colors. It is not a good format where retention of the true color is critical, particularly in those situations where fine differences may have a large impact. DXT generates images using a 16 bit color depth. Where formats like JPG or PNG use 8 bits per channel per pixel (RGB 8:8:8) for a 24-bit color depth (32 bits with PNGs having an alpha channel), DXT reduces the spectrum down to 5:6:5 bits using an interpolation algorithm to arrive at the new color values. In short, you lose much of the original color range. But many graphic applications in games and sims don't require tight control over the colors, and a good choice of the color palette can eliminate any visible results of this DXT effect. File size on disk can be large for DDS. For example, a 1024×1024 image with an alpha channel and mipmaps will result in a 1.37MB file. But file size is a relatively small consideration these days. Game/simulation performance matters far more.<br />
<br />
===Are there any image dimension limitations?===<br />
*DDS/DXT images can be of any dimension expressed in powers of two up to the limits of your application or hardware, but no dimension can be less than 4. So 1024×512 is fine, but 2048×2 is not. Since DXT compression works with texels and each texel is a 4×4 block of pixels, it follows that DXT can’t work with an image with a dimension smaller than 4.<br />
<br />
==Mipmaps==<br />
An object seen up close needs a relatively high-resolution texture so that it doesn’t look pixelated. But an object seen in the distance needs much less resolution to look reasonable, and smaller resolutions require less resources. Mipmaps are lower resolution versions of the same image, progressively decreasing in size. These low-res images can then be used for objects that are far away. DDS files can have pre-generated mipmaps included, so that the renderer doesn't have to create them on the fly. The downside is the additional file size: this process increases data size by 33%, both size on disk and in video memory.<br />
<br />
A texture without mipmaps will not crash the game, but may cause significant drops in framerate, and will look "grainy" at a distance. All Skyrim textures should have mipmaps, except for facegen textures and UI art.<br />
<br />
==There are tons of compression codecs! Which should I use?==<br />
Block Compression (BC) comes in a lot of flavors. Fortunately most are specialty applications. For common situations you’ll probably need to consider only two: BC1 and BC3 (for Skyrim LE), or BC1 and BC7 (for SSE).<br />
===BC1===<br />
Formerly known as DXT1, BC1 provides the smallest file size, at the cost of havinga 1-bit alpha channel. This can be useful for diffuse textures with no transparency, or that use alpha testing but no blending (this is sometimes called "cutout alpha").<br />
* RGB, 4 bits per pixel, no alpha or 1 bit (black or white) alpha<br />
* BC1 is a fixed 8:1 compression ratio<br />
===BC3===<br />
Formerly known as DXT5, BC3 was the go-to codec for most images that include an alpha channel in Skyrim LE (diffuse with transparency, and normal maps with specular). The cost is double the file size of a BC1 image. If compressing textures for Skyrim SE, use BC7 instead.<br />
* ARGB, 8 bits per pixel, interpolated alpha<br />
* BC3 is a fixed 4:1 compression ratio<br />
===BC4===<br />
BC4 is a single-channel compression codec. It is ideal for textures like environment masks that contain only one color channel. Does not work in Skyrim LE.<br />
* grayscale, 8 bits per pixel, no alpha<br />
* BC4 is a fixed 2:1 compression ratio<br />
===BC7===<br />
BC7 is a more recent compression algorithm that is supported by Skyrim SE, but not LE. BC7 is preferred over BC3 in nearly all cases, because it is the same size but at a higher quality. BC1 is still preferred for textures without alpha channels, or 1-bit ("cutout") alpha, since it is much smaller. When exporting as BC7, always use the slowest compression algorithm for the highest quality.<br />
* RGB or RGBA, 8 bits per pixel, interpolated alpha<br />
* BC7 is same 4:1 compression ratio as BC3 and BC5<br />
<br />
{{note|Images that are already compressed in .dds format cannot be increased in quality by reformatting them, unless you use the original ''uncompressed'' texture as a base.}}<br />
<br />
==Converting to DDS file format==<br />
In order to convert your .png/tga textures to the Skyrim friendly DDS format, you must have the [[Arcane_University:3D_Art#Convert_Maps_to_DDS|necessary software]]. <br />
<br />
Second, you must make sure your textures conform to the [[Arcane_University:NIF_Data_Format#Texture_Slots|NIF Texture Slots]]; that means you must have at the very least a diffuse map and a normal map. How you achieve this differs depending on your workflow and texturing program.<br />
<br />
===Automatically Combine and Export Maps===<br />
If you use '''Substance Painter''' you should download the [https://www.nexusmods.com/skyrimspecialedition/mods/44400 Substance Painter to Skyrim] plugin. This plugin mimics Skyrim's renderer as close as possible, and allows you to easily export the textures in the correct maps. So instead of exporting separate images for base color, height, metallic, normal and roughness textures, the plugin combines these into the PNG/TGA diffuse, normal, glow and environment maps for you.<br />
<br />
===Manually Combining Textures===<br />
If you work in '''Quixel Mixer''' or '''Blender''', a plugin such as the one for Substance Painter does not exist (yet). That means you must export specific textures and combine them in a [[AU:3D_Art#2D_texturing_program|2D software]] such as Gimp or Photoshop. It's important that the 2D software has the Layer Modes feature (such as Multiply) as we'll need that to combine our textures. <br />
<br />
[[File:Manually_Combining_Maps_for_DDS_Diffuse.png|thumb|600px|Albedo, AO and Curvature Map combined to create a diffuse.]]<br />
====Textures for the Diffuse====<br />
*Albedo/Base Color (Texturing)<br />
*Ambient Occlusion (AO) (Baking)<br />
*Curvature (Baking)<br />
<br />
In your conversion software, you place Base Color (albedo) as bottom solid layer - no layer modes needed. Then place the Ambient Occlusion image on 100% Multiply Layer Mode above the Base Color Layer. And finally, place the Curvature image on 40% Soft Light above AO and Base Colour.<br />
<br />
Tada! Your diffuse is now ready to be exported as DDS.<br />
<br />
====Textures for the Normal Map====<br />
*Normal Map (Baking)<br />
*Specular (Texturing)<br />
<br />
Your normal map is a bit different than the diffuse, as we will place the specular map in the alpha channel.<br />
<br />
<br />
'''Photoshop Instructions'''<br />
*Step 1: Open normal map<br />
*Step 2: Import specular map or inverted roughness map<br />
*Step 3: Select (ctrl+a) and copy (ctrl+c) specular map<br />
*Step 4: Create the alpha channel<br />
*Step 5: Paste specular onto alpha channel<br />
*Step 6: Delete specular map layer and enable all channels<br />
<br />
Confused? [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif Watch this video].<br />
<br />
<br />
'''GIMP Instructions'''<br />
<br />
Visit our [https://wiki.beyondskyrim.org/wiki/Arcane_University:Gimp_for_Skyrim GIMP for Skyrim] wiki page for instructions.<br />
<br />
===Converting PNG to DDS===<br />
Now that you know how to export textures and combine the maps, it's time to convert them to DDS file format. Regardless of software, this is a very straightforward process. Most meshes must always have a diffuse and a normal map, but there are additional optional maps you can generate should your asset benefit from it.<br />
<br />
<br />
<center>'''Simply open the PNG/TGA of your diffuse, normal map, environment, and/or glow map in the software, and File > Save/Export As > DDS.'''</center><br />
<br />
<center>{{note|'''Always generate mipmaps.'''}}</center><br />
<br />
<br />
For information on what BC/DXT to choose, read more above in [[Arcane_University:DDS_Data_Format#There_are_tons_of_DXT_codecs.21_Which_should_I_use.3F|What to Choose?]] or on the [[AU:NIF_Data_Format|NIF]] page. On the NIF page you'll also find information on where and how to attach the DDS textures to your NIF, and naming conventions for your maps. PS: This is the unique asset workflow. If you're using [https://www.youtube.com/watch?v=uUJShalzWy8 trim sheets] you might have to use a different workflow.<br />
<br />
Although the export process is similar for most software, each one uses a different compressor. Some result in better quality than others. These are some exporters, ordered from highest quality to lowest, with a brief summary of their advantages and disadvantages:<br />
<br />
{| class="wikitable"<br />
|+ <span id="Comparison of DDS Exporters"></span>Comparison of DDS Exporters<br />
|-<br />
| 1. [https://developer.nvidia.com/nvidia-texture-tools-exporter '''Nvidia Texture Tools (NVTT) (Standalone and/or Photoshop Plugin)''']<br />
| These first two are tied in terms of quality. NVTT does require an Nvidia graphics card, but it has a nice GUI and outputs excellent quality. It comes as either a standalone application, which supports command-line use and batch scripts, or a Photoshop plugin.<br />
|-<br />
| 1. [https://github.com/Unity-Technologies/crunch/tree/unity '''Crunch''']<br />
| Crunch is designed for more advanced compression, and is a command-line tool, but it also outputs excellent quality DDS when configured properly.<br />
|-<br />
| 2. [https://gpuopen.com/compressonator/ '''Compressonator''']<br />
| Requires an AMD graphics card, but outputs good quality and has a nice GUI. Also supports command-line use.<br />
|-<br />
| 3. [https://www.getpaint.net/ '''Paint.NET''']<br />
| Very easy to use, supports all DDS formats. Quality is middle-of-the-road, but usually fine for Skyrim's purposes. It can be used with any hardware, including integrated graphics, and does not rely on proprietary software like Photoshop.<br />
|-<br />
| 4. [https://software.intel.com/content/www/us/en/develop/articles/intel-texture-works-plugin.html '''Intel Texture Works Plugin for Photoshop''']<br />
| Has support for all DDS formats, but suffers from discoloration and blocky gradients.<br />
|-<br />
| 5. [https://www.gimp.org '''GIMP''']<br />
| Free, does not require special graphics cards or proprietary software, but has inferior results and lacks support for BC7 entirely.<br />
|}<br />
<br />
For more detailed information, see [https://w3dhub.com/forum/topic/417101-dds-files-and-dxt-compression/?tab=comments#comment-671198 this post].<br />
<br />
=== DXT and Normal Maps ===<br />
A normal map stores information that allows lighting calculations to be done at the per-pixel level rather than interpolating between vertices. This can make lighting much smoother and more graduated, or it can make significant changes how lighting affects a given point. The common use of a normal map is to tweak surface data to give the illusion of having extra detail. It’s not real detail– it doesn’t actually change the geometry, but it does change the lighting and can give very realistic results without adding polygonal complexity.<br />
Normal map data is essentially a normal vector for each pixel. The normal gives an indication of the "facing" of the pixel. Normal maps use the RGB color space to store the data needed for the effect– the 24 bits for each pixel are used to encode the pixel's vector. Given that a color in this context is really a vector, changing a color can significantly alter the scale and direction of that vector, thus altering the effects at any given location. Since DXT compression does not exactly preserve the colors, DXT images can make a real mess of normal maps.<br />
<br />
You can still use DXT compression for normal maps. In fact it’s common to do so in games and sims, where resolutions are fairly low and resources come at a premium. Just be aware that the end result is likely to be rather mangled. For low-res situations it's usually not a big problem. Using BC3 or BC7 compression mitigates this somewhat. Using uncompressed textures is not recommended.<br />
<br />
== See Also ==<br />
*[https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats Understanding BCn Texture Compression Formats] by Nathan Reed<br />
*[https://w3dhub.com/forum/topic/417101-dds-files-and-dxt-compression/?tab=comments#comment-671198 Comparison of different DDS compressors]<br />
*[[wikipedia:DirectDraw Surface|DirectDraw Surface]] on Wikipedia<br />
*[[wikipedia:S3 Texture Compression|S3 Texture Compression]] on Wikipedia<br />
*[[Arcane University:NIF Data Format]]<br />
<br />
<br />
[[Category:Arcane University-3D Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Mesh_Collisions&diff=4612Arcane University:Mesh Collisions2023-02-15T06:41:56Z<p>Gamma Metroid: /* Physics Settings */ more detail about center of mass</p>
<hr />
<div>{{Trail|Implementation|Nif Implementation}}<br />
'''Collision''' is an attribute of [[Arcane University:NIF Data Format|NIF files]] which makes objects solid in the Creation Engine. When an object has collision, it cannot be walked through, fall through the ground or walls, and also determines what parts of the object are interactable. It can also be used to create non-collidable "phantom collision," to detect when an object enters the collision bounds and then call an event. This article will cover the different types of collision shapes and their uses, as well as the physics settings that affect how the object moves in the world. It is by no means exhaustive—these are just the most commonly used features of collision in Skyrim.<br />
<br />
{{note|Many problems are avoidable by copying the collision from a similar vanilla nif. This will save you the hassle of setting all the values by hand. Just make sure to use NifSkope's "Reorder Blocks" spell afterwards, otherwise the nif will crash the game/CK.}}<br />
<br />
==Common Shape Types==<br />
[[File:WRjaildoor.png|350px|thumb|right|The Whiterun jail door uses a box primitive.]]<br />
There are three main types of collision meshes: '''Primitives''', '''Convex Shapes''', and '''Compressed Mesh Shapes'''. Primitives are the simplest, and compressed mesh shapes are the most complex. The CPU usage required to simulate physics, therefore, is lowest for primitives, slightly higher for convex shapes, and much higher for compressed mesh shapes. For this reason, primitives and convex shapes are preferred, and are the only viable option for moving objects (weapons, clutter that you can pick up, etc.). Compressed mesh shapes are reserved for static objects only (architecture, furniture, etc.).<br />
<br />
===Primitives===<br />
Primitives can be boxes (rectangular prisms—they do not have to be cubes), spheres, or capsules. These can be made in [[Arcane University:Nifskope for Skyrim|NifSkope]], and are commonly used for doors and chests that are roughly box-shaped, like the Whiterun jail door, seen at right. The dimensions of primitives are adjustable in the settings of the shape block. To translate the shape within the nif, use a bhkTransformShape between the bhkRigidBody and the primitive, or the translation settings in a bhkRigidBodyT.<br />
<br />
===Convex Shapes===<br />
Convex shapes are the easiest to create, and are extremely common for clutter items and simple furniture. Simply right-click the mesh in NifSkope, and select ''Havok > Create Convex Shape''. Adjust the roundoff error value if you need more or fewer vertices. The collision radius is an invisible shell around the collision shape, and may need to be adjusted later after testing. Smaller values result in a thinner shell. Generally, if the object is very small, it will likely need a smaller radius.<br />
<br />
Convex shapes necessarily can not have concave areas, or "indents." For an object that needs this, use either a compressed mesh shape (if it's a static) or a [[#List Shapes|list shape]], if it is dynamic.<br />
<br />
===Compressed Mesh Shapes===<br />
Compressed mesh shapes are created in [[AU:Software#3D|3D software]] such as Blender, 3ds Max, or Maya. They are typically much simpler (i.e. fewer vertices) than the visible mesh. This can be done either by decimating a copy of the visible mesh, or removing edge loops manually for a higher quality collision mesh. Compressed meshes can also contain multiple collision materials. They can be exported to nif format using either [[Arcane University:CK-CMD for Skyrim#Including Collision Mesh|ck-cmd]] or [[Arcane University:Niftools/Chunkmerge for Skyrim|ChunkMerge]].<br />
<br />
==Special Cases==<br />
[[File:Woodenbowl_collision.png|400px|thumb|right|The wooden bowl from vanilla Skyrim, showing a list shape collision.]]<br />
===List Shapes===<br />
List shapes are collections of convex shapes or primitives. They are often used for bowls, that need to have dynamic collision, but cannot use convex shapes, as well as many weapons. These are most easily made in NifSkope by copying a bhkCollisionObject from a similar nif and adjusting it to fit, or making the list shape by hand in NifSkope. Lists of convex shapes can also be made using [[AU:Nifskope for Skyrim#Forks|Spectral's NifSkope fork]].<br />
<br />
===Constraints===<br />
{{main|[[Arcane University:Nifskope Hinge Constraints|NifSkope Hinge Constraints]]}}<br />
<br />
Some objects, like books and necklaces, or hanging shop signs, may use constraints so that they swing on a hinge when the player or another actor touches them.<br />
<br />
===Animated Collision===<br />
[[File:Animated collision settings.png|400px|thumb|right|The Riften keep door from vanilla Skyrim, showing the required settings for animated collision.]]<br />
Collision that moves with an animated nif is fairly simple to set up. Create a collision object inside the animated node, so that it moves along with the visible mesh when the animation is played in NifSkope. Then make sure the settings match those in the image.<br />
<br />
The important settings are as follows:<br />
*Collision Layer: SKYL_ANIMSTATIC<br />
**Only the animated collision object needs this. If the nif contains other collision object that don't move, they should remain in the SKYL_STATIC layer.<br />
*Motion System: MO_SYS_BOX_INERTIA<br />
*Enable Deactivation: yes<br />
*Solver Deactivation: SOLVER_DEACTIVATION_LOW<br />
*Quality Type: MO_QUAL_FIXED<br />
<br />
The animated bhkCollisionObject should also have the SET_LOCAL flag, in addition to the usual ACTIVE and SYNC_ON_UPDATE flags. Lastly, make sure the [[Arcane University:NIF Data Format#BSXFlags node|BSXFlags]] of the nif are correct.<br />
<br />
==Physics Settings==<br />
Physics settings are contained in the bhkRigidBody or bhkRigidBodyT. The only difference between these two blocks is that bhkRigidBodyT has translation enabled—the translation fields in a bhkRigidBody have no effect.<br />
<br />
*'''Layer:''' The layer the collision object belongs to. Some layers don't collide with certain other layers. The most common are Static, Animstatic, Clutter, and Weapon. There is also a copy of this field in the "Havok Filter Copy" group which must match.<br />
*'''Process Contact Callback Delay:''' Determines how often collision is calculated. Typically always 65535. There is a copy called "Process Contact Callback Delay 2" which must match.<br />
*'''Collision Response:''' Determines what to do when collision is detected. Typically always RESPONSE_SIMPLE_CONTACT, unless it is a phantom collision (sensor). There is a copy called "Collision Response 2" which must match.<br />
*'''Translation/Rotation:''' Translates and rotates the collision mesh. Only enabled in bhkRigidBodyT blocks.<br />
*'''<span id="inertia tensors"></span>Inertia Tensors:''' Determines the force necessary to rotate an object around each axis. Ideally would be calculated based on the mass and dimensions of the object, but can be copied from a similar vanilla object, or tweaked until it looks right in game. m11 corresponds to the X-axis, m22 to the y-axis, and m33 to the z-axis. Higher values make the object turn more slowly around that axis. Importantly, if a clutter object lacks inertia tensors, it will slide or float away when Havoked, carrying other nearby clutter with it. Conversely, if a static object has inertia tensors, it will move around when Havok simmed in CK, when it should not.<br />
*'''Center:''' The center of mass. May not be where the object is held when picked up, since that is determined by the origin point of the nif. If the center of mass is not <tt>0,0,0</tt> in the rigid body, the object will turn over when picked up. If the center of mass is below z=0, the object will right itself when picked up. If the center of mass is above z=0, it will flip upside down.<br />
*'''Mass:''' Mass in kg. <br />
*'''Linear Damping:''' How much the object's linear velocity is slowed over time. Typically 0.1.<br />
*'''Angular Damping:''' How much the object's angular velocity is slowed over time. Typically 0.5.<br />
*'''Friction:''' How much the object resists sliding (NifSkope's description is reversed). Typically 0.5.<br />
*'''Restitution:''' How "bouncy" the object is. Less than 1 loses velocity on each bounce, greater than 1 gains velocity. Typically 0.4.<br />
*'''Penetration Depth:''' How far collisions may protrude into the object before being stopped.<br />
*'''Motion System:''' The "category" of collision. MO_SYS_SPHERE_STABILIZED is typical for all clutter. MO_SYS_FIXED is typical for statics. MO_SYS_BOX_INERTIA is required for animated statics.<br />
*'''Enable Deactivation:''' Whether the object can have its Havok sim stopped if its velocity is low enough. Yes for moving objects, no for statics.<br />
*'''Solver Deactivation:''' How aggressively the engine tries to stop the Havok sim. SOLVER_DEACTIVATION_LOW for moving objects, SOLVER_DEACTIVATION_OFF for statics.<br />
*'''Quality Type:''' Determines the priority and quality of motion. MO_QUAL_MOVING for moving objects, MO_QUAL_FIXED or MO_QUAL_INVALID for statics.<br />
<br />
===Collision Material===<br />
Collision material is set in each shape. It determines the sound and visual effect when the player strikes it with a weapon, as well as whether arrows stick in it or bounce off, whether it bleeds, and what sound it makes when walked on. Stair materials are used to keep the player from getting stuck when walking up stairs. Compressed meshes can have multiple materials per shape.<br />
<br />
==Troubleshooting==<br />
; The nif has collision, but it doesn't seem to in game. : It is likely missing [[AU:NIF Data Format#BSXFlags node|BSXFlags]].<br />
; The object slides away when it or a nearby clutter item is touched. : It is missing [[#inertia tensors|inertia tensors]]. Copy them from a vanilla object with similar shape and size.<br />
; The nif looks fine, but it crashes the game/CK. : Make sure the blocks are in the proper order (use ''Spells > Reorder Blocks'' in NifSkope). Collision blocks must be in '''descending''' order.<br />
; The object floats slightly above the surface it is placed on. : Decrease the radius value of the shape. Default is 0.05. Try 0.01 or 0.005. Very small objects like forks, spoons, or lockpicks may need an even smaller radius.<br />
<br />
==Further Reading==<br />
*[https://cgl.ethz.ch/Downloads/Seminar_Arbeiten/2002_03/Havok_Overview.pdf Havok Game Dynamics SDK - Product Overview]<br />
* [https://youtube.com/watch?v=Ammbvh0PbKM 'Types of Collision' Arcane University Lecture on collisions by teacher Candoran]<br />
[[Category:Arcane University-3D Art]] [[Category:Arcane University-Method]] [[Category:Arcane University-Implementation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4585Arcane University:NIF Data Format2023-02-03T04:00:26Z<p>Gamma Metroid: /* TriShapes */ add note about imprecision</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShapeData into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, LE nifs work fine in Special Edition, and do not need to be converted. In fact, SSE nifs use less precise values, so LE nifs are recommended regardless of which version of the game you are modding.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SSE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4584Arcane University:NIF Data Format2023-02-03T03:50:18Z<p>Gamma Metroid: /* TriShapes */ typo</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShapeData into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4582Arcane University:NIF Data Format2023-01-24T07:24:09Z<p>Gamma Metroid: /* Shader Types */ section heading case</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4581Arcane University:NIF Data Format2023-01-24T07:23:32Z<p>Gamma Metroid: /* Texture Slots */ shader type link</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4580Arcane University:NIF Data Format2023-01-24T07:15:51Z<p>Gamma Metroid: /* Texture Slots */ clarity</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4579Arcane University:NIF Data Format2023-01-24T07:14:51Z<p>Gamma Metroid: /* Texture Slots */ added some notes and moved the info about nifskope's numbering to the image captioin</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<div id="Notes" style="font-size:89%; text-align:center"><br />
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. Use BC3 instead.<br />
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. Use BC1 instead.<br />
</div><br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4578Arcane University:NIF Data Format2023-01-24T06:55:57Z<p>Gamma Metroid: /* Texture Slots */ prefer cube map name?</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4577Arcane University:NIF Data Format2023-01-24T06:52:19Z<p>Gamma Metroid: /* Texture Slots */ oops backlight map goes in slot 8</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4576Arcane University:NIF Data Format2023-01-24T06:28:10Z<p>Gamma Metroid: /* Texture Slots */</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your model to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4575Arcane University:NIF Data Format2023-01-24T06:26:59Z<p>Gamma Metroid: /* Texture Slots */ table title</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your shader to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
|+ Texture Slots Overview<br />
|-<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4574Arcane University:NIF Data Format2023-01-24T06:25:16Z<p>Gamma Metroid: /* Texture Slots */ link to compression article</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your shader to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4573Arcane University:NIF Data Format2023-01-24T06:23:06Z<p>Gamma Metroid: /* Texture Slots */ typo</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your shader to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested Compression !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:NIF_Data_Format&diff=4572Arcane University:NIF Data Format2023-01-24T06:22:31Z<p>Gamma Metroid: /* Texture Slots */ rewrite texture slots</p>
<hr />
<div>{{trail|Implementation|Nif Implementation}}<br />
'''NIF''' stands for "'''NetImmerse Format'''," which is a file type that was created for the NetImmerse engine in 1997. This later morphed into the Gamebryo Engine (used for Morrowind, Oblivion, and Fallout 3), which in turn was the basis for the Creation Engine, used by games such as Skyrim, Fallout 4, and Fallout 76. Much more than simple 3D mesh files, Nifs can also contain complex shader and texturing information, as well as character rigs, animations, collison meshes, physics properties, and other information that is passed to the game engine. This article details the structure and workings of Nif files as they are used for Skyrim.<br />
<br />
== General NIF structure ==<br />
[[File:NifMeshstructure02.jpg|thumb|right|Use this option in NifSkope if the blocks are not shown in tree format.]]<br />
[[File:NifMeshstructure01.png|400px|thumb|right|An example nif block structure.]]<br />
Nifs are organized into blocks or nodes arranged in a hierarchy or "tree." Each block has various properties that define how it functions in the game.<br />
<br />
The root node always has a block ID of 0. It is most commonly a BSFadeNode (static bodies), a NiNode (skinned rigged meshes like armors), or a BSLeafAnim/tree node (plants). The root node will usually have attached [[#Metadata|metadata]] blocks that activate other nif properties like animation, Havok physics, and inventory display. 3D Meshes are represented by [[#TriShapes|TriShapes]]. The surface material is defined by a [[#Shader types|shader property]] block, either a Lighting Shader or an Effect Shader. Animations are defined in Controller blocks, or in child nodes of the shader property.<br />
<br />
== TriShapes ==<br />
A NiTriShape can have the following child properties among others:<br />
* '''NiTriShapeData:''' the actual mesh data (vertices, normals, tangents, UV map).<br />
* '''[[#Shader Types|Shader Property]]''' (BSLightingShaderProperty or BSEffectShaderProperty): holds lighting and texture information.<br />
* '''[[#Transparency|NiAlphaProperty]]:''' tells the game how to handle transparency in the mesh, if any.<br />
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.<br />
<br />
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.<br />
<br />
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).<br />
<br />
==Texture Slots==<br />
[[File:TextureSlots03.png|thumb|right|upright=2]]<br />
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSTextureSet</code> block, as shown at right.<br />
<br />
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your shader to be displayed correctly.<br />
<br />
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.<br />
<br />
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"<br />
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested Compression !! Suggested creation method<br />
|-<br />
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation<br />
|-<br />
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.<br />
|-<br />
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.<br />
|-<br />
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.<br />
|-<br />
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.<br />
|-<br />
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).<br />
|-<br />
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.<br />
|-<br />
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).<br />
|}<br />
<br />
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}<br />
<br />
===Diffuse Map (Slot 1)===<br />
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.<br />
* Compression:<br />
** Use DXT1 if transparency is not needed, or if only full transparency is needed.<br />
** Use DXT5 or BC7 if the texture needs smooth partial transparency.<br />
<br />
* Required properties:<br />
** For Alpha Transparency: Automatically enabled for outer layer if using MultiLayer Parallax shader, otherwise requires that a NiAlphaProperty be added to the NiTriShape (right-click the NiTriShape > Node > Attach Property > NiAlphaProperty)<br />
** NiTriShapeData > Has Vertex Colors<br />
** NiTriShapeData > Vertex Colors<br />
* Appearance Controller(s):<br />
** For Alpha Transparency: NiAlphaProperty > Flags (Click the flag to view settings)<br />
**BSLightingShaderProperty > Alpha, 0 is fully transparent (invisible), 1 is fully visible (opaque)<br />
** Transparency Map (Alpha Channel): Black is fully transparent (invisible) (dependent on NiAlphaProperty flag settings), White is fully visible (opaque) (dependent on NiAlphaProperty flag settings)<br />
**Transparency increases as shade approaches black (dependent on NiAlphaProperty flag settings)<br />
*Suffix: none<br />
<br />
=== Normal Map (Slot 2) ===<br />
The normal map adds the illusion of depth and detail to a mesh, while keeping the poly count low. Normal maps are [[AU:baking|baked]] from a high poly onto a low poly model, either with [[Arcane_University:3D_Art#3D_baking_programs|xNormal or a texture program]]. Learn more universal information on normal maps at [https://www.notion.so/Mesh-Maps-Explained-421c1c7b3c504020bde8a3d83f4ba4af Mesh Maps Explained] and [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details Normal Map on Polycount Wiki].<br />
<br />
<br />
'''The Alpha Channel of the Normal Map'''<br />
<br />
While the ''alpha channel'' in a .png image usually controls ''transparency'', it is not the case for DDS normal maps. The alpha channel instead decides how bright or "glossy" (specularity) that part of the mesh will be in-game. The alpha channel is a greyscale map, where black is minimum intensity with no specular highlight, white is maximum intensity, and grey is a varying degree of intensity. You can use a Specular map or an inverted Roughness map as the greyscale map in the alpha channel to enable this effect. Watch [https://wiki.beyondskyrim.org/w/images/e/ed/Specular_to_Normal_Alpha_Channel.gif how to use specular as alpha].<br />
<br />
<br />
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.<br />
* Required properties:<br />
** NiTriShapeData > BS Num UV Sets = 4097<br />
** NiTriShapeData > Has Normals = yes<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Specular<br />
* Appearance Controller(s)<br />
** BSLightingShaderProperty > Specular Strength, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity<br />
** BSLightingShaderProperty > Specular Color, The color of the specular highlight<br />
** BSLightingShaderProperty > Glossiness, Glossiness is the width of the specular highlight, 10 is a wide specular highlight, 50 is a thinner specular highlight, 100 is an even thinner specular highlight; Value ranges from 0 to 999<br />
* Suffix: _n: <br />
<br />
'''Suffix: _n: Tangent Space Normal Map'''<br />
Also called Normal Map. Required to use the alpha layer specular map. Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered “up” (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that’s the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly “up”, and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.<br />
<br />
<br />
'''Suffix: _msn: Model Space Normal Map''' <br />
Does not have a specular alpha, SLSF1_Specular must be false. Slot 8 can contain a specular map if model space normals are used. Object Space normal maps can be moved, but the vertices of the mesh cannot be deformed or the shading is wrong. Object space normals are best for things that can move, but not deform, like swords, shields, doors, etc. Also note that the Creation Kit expects the normal map to be present for the mesh and will give an error message if not present.<br />
<br />
=== Emissive (glow) Map (Slot 3) ===<br />
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color. You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.<br />
<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Type: Glow Shader<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Own_Emit<br />
** SLSF1_Environment_Mapping disabled<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map<br />
** For Soft Lighting: SLSF2_Soft_Lighting<br />
** For RIM Lighting: SLSF2_Rim_Lighting (Rim lighting overwrites soft lighting)<br />
*Appearance Controller(s):<br />
** BSLightingShaderProperty > Emissive Multiple (Glow intensity increases as emissive multiple increases)<br />
** BSLightingShaderProperty > Emissive Color<br />
** Soft Lighting Specific Lighting Effect 1:<br />
Light begins in the center and higher values wrap the light further around the sides. Between 0-1 the effect also diminishes in strength such that 0.0 is completely off.<br />
** Rim Lighting Specific Lighting Effect 2:<br />
Light begins on the edge and moves towards the center as the value increases. The lower the number, the more edges the light catches on. The higher the number, the sharper the effect appears.<br />
*Suffix: _g<br />
<br />
=== Height / Parallax Map (Slot 4) ===<br />
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:<br />
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax<br />
* Shader Type: Heightmap<br />
* Suffix: _p<br />
<br />
=== Environment / Cube Map (Slot 5) ===<br />
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.<br />
<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Environment Map<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Glow_Map disabled<br />
* Appearance Controllers:<br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, Less than 1 is lower intensity, Greater than 1 is higher intensity.<br />
* Suffix: _e<br />
<br />
=== Greyscale / metallic cube mask (Slot 6) ===<br />
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** An environment/cube map is required.<br />
** BSLightingShaderProperty > Shader Type: Environment<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Environment_Mapping<br />
* Appearance Controllers: <br />
** BSLightingShaderProperty > Environmental Map Scale, 1 is normal intensity, less than 1 is lower intensity, greater than 1 is higher intensity, <br />
** Black is minimum intensity, environment/cube map has no effect in these areas, White is maximum intensity, Intensity increases as shade approaches white<br />
* Suffix: _m or _em<br />
<br />
=== Subsurface Tint Map (Slot 7) ===<br />
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.<br />
* Compression: DXT1<br />
* Required Properties:<br />
** BSLightingShaderProperty > Shader Type: Skin Tint<br />
** BSLightingShaderProperty > Shader Flags 1: SLSF1_FaceGen_RGB_Tint<br />
* Appearance Controllers: <br />
** Brightness of the texture controls translucency while the game defines the underlying color (Set in the race menu.) Typically a very dark greyscale texture. Black is opaque, White is entirely transparent.<br />
* Suffix: _s<br />
<br />
=== Backlight Map (Slot 8) ===<br />
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.<br />
* Compression: DXT1<br />
* Required properties:<br />
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting<br />
* Appearance Controller(s): <br />
** BSLightingShaderProperty > Emissive Multiple<br />
** Glow intensity increases as emissive multiple increases<br />
** BSLightingShaderProperty > Emissive Color<br />
* Suffix: _b or _bl<br />
<br />
=== Slot 9 (Unused) ===<br />
Slot09 – Currently Unused.<br />
<br />
== Shader Types ==<br />
[[File:BSshadertypes01.png]] <br />
<br />
Here you can see the available shader types of a BSLightingShaderProperty. They also need specific shader flags to be set and specific texture maps. Some are essential, others optional. These are all the available Shader Flags for Skyrim:<br />
<br />
[[File:BSshadersFlagsExport.png]] <br />
<br />
Commonly used in Skyrim are Default shader type (“0”) and Environment Map shader type (“1”). Green shows you those who are essential for exporting a default type mesh successfully, the minimum to be set. Pink are those commonly used additional options for Lighting, environment mapping, or weighting (rigging), glow effects. There are more advanced features like multilayer parallax, but the intention of this short tutorial is, to give people a quick and solid introduction into the rendering settings for meshes used in Skyrim, which are unlike the more recent PBR Systems. You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers (properties seen below).<br />
<br />
[[File:BScontrollers01.png]]<br />
<br />
* The standard for the '''Glossiness''' value is 100. It ranged between 0 and 999.<br />
* '''Specular Strength''' ranges from 0 to 10 but 2 would already be very strong, 1 being the default.<br />
* '''Refraction Strength''' ranges from 0 to 1. 1 being absolute transparency.<br />
* '''Alpha''' also does transparency but in a different way.<br />
* '''Emissive Colour''' and '''Specular Colour''' are the RGB values that are shining or reflecting when looking straight at the mesh.<br />
* '''UV Scale''' is the scaling size of the UV map. You can right-click on your mesh in the render window and chose textures / UV map and manually edit it, rotate, and scale it.<br />
<br />
The most commonly used BSLightingShaderProperties are Default shader type (“0”) and Environment Map shader type (“1”). You set your mesh shader property type in BSLightingShaderProperties. Note that each NiTriShape can only have one shader type and a small range of optional shader flags and use specific controllers(see below). But, if needed, you can simply use multiple NiTriShapes combined on top of each other. As an example, it might make sense to split your mesh into subsections by material (metal, leather) and export each as a different NiTriShape (first sublevel) into the same mesh. Consider a leather armor for instance. I would suggest having an organic leather/cloth part (which usually absorbs light to a high degree and would use the default shader type) and the metal elements (which would reflect light stronger and profit from cube maps used in the environment map shader type).<br />
<br />
====Default Shader====<br />
<br />
* Name: Default Shader Type (0)<br />
* used for: Assets with color, height, and specularity.<br />
* common examples: rocks, clothes, furniture, stones, plants, sometimes metals if specularity is done in a way that can pretend metallic reflections.<br />
* necessary slots: Slot1) base color/diffuse map AND Slot2) normal map with specularity in alpha channel (optional)<br />
* necessary flags: those who are marked green above under shader flags, for export; and additionally what you need (vertex paint, specularity for example, if you learned how to apply these)<br />
<br />
[[File:DefaultShaderExample01.jpg]]<br />
[[File:DefaultShaderExample02.png]]<br />
<br />
A House as an example and the shader flags and lighting properties.<br />
<br />
[[File:DefaultShaderExample03.png]]<br />
[[File:DefaultShaderExample04.png]]<br />
<br />
The texture set of a default shader set, consisting of a diffuse and normal map.<br />
<br />
====Environmental Shader====<br />
<br />
* Name: Environment Map Shader Type (1)<br />
* used for: Assets with colour, height, and specularity and additional shininess or gloss.<br />
* common examples: Metals, Chitin, Ore, Armours, Glass, Mirrors, Ice (more stable and consistent with ENBs than parallax)<br />
* necessary slots: Slot 1) base color/diffuse map AND Slot 2) normal map with specularity in alpha channel (optional) AND environmental/cube map (slot 5) (DTX1, see DDS Texture files for details) AND optional: an environment mask (_m or _em), that sets which areas are reflective (Slot 6)<br />
* necessary flags: SLSF1_Environment_Mapping, SLSF2_Glow_Map disabled<br />
* controllers: Environmental Map Scale; 1 is normal intensity, less is lower intensity, greater is higher intensity.<br />
<br />
[[File:envShader1.png]]<br />
<br />
Dwemer armour only with slot 1 and slot 2 (diffuse and normal); Dwemer armour with additional m map in slot 6; Dwemer armour with additional cube map on top of that in slot 5.<br />
<br />
[[File:EnvShader2.png]]<br />
<br />
Ice: Example of BSLightingshaderproperties controller settings. The ice profits from a detailed normal map with a spec map and the resulting specularity and gloss can be set only by these. An ice cubemap is used in slot 5, but no material map in slot 6.<br />
<br />
[[File:EnvShader3.png]]<br />
<br />
A typical metal texture set for Skyrim: the rendering will make the diffuse appear much brighter. A lot of detail is being baked into the diffuse. Finally, the sword appears silver-metallic in the game engine.<br />
<br />
For how to work on the material map for the roughness and metallic shine, see https://www.youtube.com/watch?v=DWs9rDpA5tQ<br />
<br />
== Transparency ==<br />
Transparency is enabled for each NiTriShape by adding a NiAlphaProperty node.<br />
<br />
=== Blending ===<br />
If partial transparency is desired, "Enable Blending" must be checked.<br />
<br />
*For Alpha Blending:<br />
**Source Blend Mode: Src Alpha<br />
**Destination Blend Mode: Inv Src Alpha<br />
*For Additive Blending:<br />
**Source Blend Mode: One<br />
**Destination Blend Mode: One<br />
*For Multiplicative Blending:<br />
**Source Blend Mode: Zero<br />
**Destination Blend Mode: Src Color<br />
*For 2x Multiplicative Blending:<br />
**Source Blend Mode: Dst Color<br />
**Destination Blend Mode: Src Color<br />
<br />
=== Alpha Testing ===<br />
For Alpha Testing, check "Enable Testing." The Alpha Test Function sets how transparency channel grey values (0 to 255 or black to white) will be compared to the Alpha Test Threshold value to determine the threshold at which pixels with partial transparency should be rendered as completely transparent.<br />
<br />
This setting can also be modified at the CK object reference level, allowing a single nif to have variable levels of transparency. This is used most often in Skyrim to create objects with varying levels of decay, like rugs in Nordic Tombs.<br />
<br />
:Less or Equal: Lighter will be more transparent<br />
:Greater or Equal: Darker will be more transparent<br />
:Alpha Test Threshold: Value from 0 to 255 (black to white)<br />
<br />
=== Color Blending ===<br />
<br />
'''Color Blending Equation'''<br />
<br />
:(Source * SourceBlendMode) + (Destination * DestinationBlendMode)<br />
<br />
"Source" is the color of the model materials in that pixel before blending. "Destination" is the color of what is behind the model in that same pixel before blending. These two values are modified by the value of the blend mode in that same pixel, then they are added together.<br />
<br />
'''Blend Modes''' (a.k.a. Blend Factor)<br />
<br />
* One: multiply by one (no modification)<br />
* Zero: multiply by zero<br />
* Src Color: multiply by “Source”<br />
* Inv Src Color: multiply by inverse “Source”<br />
* Dst Color: multiply by “Destination”<br />
* Inv Dst Color: multiply by inverse “Destination”<br />
* Src Alpha: multiply by value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Src Alpha: multiply by inverse value of the model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Dst Alpha: multiply by value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
* Inv Dst Alpha: multiply by inverse value of the background model’s alpha channel (diffuse and vertex colors) present at that pixel<br />
<br />
== Effect Properties ==<br />
Effect Properties are set by Bethesda, and the ability to create them without the appropriate tools are limited. However, if you understand the basic structure of nif format meshes and have NifSkope installed, it is easy to copy and paste branches to tweak and reuse the effects that you encounter in the vanilla files. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with BSShaderProperties, BSEffectProperties are one level below NiTriShape Data and there can only be one of its kind in a NiTriShape, so you might want to use several NiTriShapes in your nif mesh (NiNode skinned rigs or BSFadeNode for statics) if you need several effects. The general workflow would be, similar to how you can exchange shader properties, to:<br />
* search through meshes for an effect property that supports your vision<br />
* copy the branch of the effect property<br />
* remove the branch in the new mesh that is to be replaced<br />
* paste the branch that you copied there in the NiTriShape<br />
* tweak the controller settings (numerical values) and set up textures<br />
* check if you can / have to sanitize the mesh with NifSkope spells<br />
* check placement and CK implementation, Test it in-game<br />
<br />
==== First Example: Glowing Lantern ====<br />
<br />
Hello, Travelers, today we’re going to teach you how to make lanterns glow in Skyrim. We originally encountered problems with the way lanterns glow in Skyrim, but one of our members contributed a tutorial on how to make lanterns glow in Skyrim properly.<br />
<br />
So, to begin you open the lanterns you want to make glow in NifSkope. Then, you select the paper’s NiTriShape Branch. In that branch, remove BSLightingShaderProperty as well as any other nodes in the branch (Especially anything with alpha layer data in it). Open one of the Dunmer lanterns which we know has a glow effect in another instance of NifSkope. Click on the paper and right-click on BSEffectShaderProperty, highlight Branch, and select Copy Branch.<br />
Go back to the lantern you want to change. Select and Right Click on the NiTriShape Branch you removed BSLightingShaderProperty from, and go to block=>paste Block. At this point you have successfully made lanterns glow in Skyrim, however it has the Dunmer texture, so click on the BSEffectShaderProperty we just copied and in the block details window scroll down to “SourceTexture” Double click on this line and put in the path for the texture you want. We now have to set the glow map not to override our color. In the flags change “SLF1Greyscale_to_palette_color” to “SLF1Greyscale_to_paletteAlpha” (This is why it’s important to delete any alpha layer data in step one as we are tricking the mesh in this step.) If you don’t like how bright your lanterns glow in Skyrim, you can adjust that in the settings down near the bottom of BSEffectShaderProperty. The result should look something like this, albeit on whatever mesh you choose.<br />
<br />
==== Other Examples ====<br />
<br />
* Rain Clouds (you can also emulate Thunder Storms, Animated Doors etc)<br />
[[File:nifeffects1.png]]<br />
* Volcanic Smoke (you can also emulate floating textures like water, lava ...)<br />
[[File:nifeffects2.png]]<br />
[[File:nifeffects3.png]]<br />
* Exploding Ice Chunks<br />
[[File:nifeffects4.png]]<br />
<br />
==Metadata==<br />
===<span id="BSXFlags node"></span>BSXFlags===<br />
The BSXFlags node goes inside of the root node of the nif. In most cases it will be the first one in the root's children. It contains a series of flags that activate different properties of the object in Skyrim. These properties can be accessed and selected by clicking the small flag icon, the total number is the sum of the selected flag values. The list of possible flags is as follows:<br />
{| class="wikitable"<br />
! Bit/Number !! Name !! Description<br />
|-<br />
| Bit 0 (1) || Animated || Necessary for any animation on this asset to play<br />
|-<br />
| Bit 1 (2) || Havok || Enable collision<br />
|-<br />
| Bit 2 (4) || Ragdoll || Used by skeleton nifs<br />
|-<br />
| Bit 3 (8) || Complex || Has more than one bhkCollisionObject<br />
|-<br />
| Bit 4 (16) || Addon || Necessary for any addon node (e.g. candle flame) to appear in game <br />
|-<br />
| Bit 5 (32) || Editor marker || Necessary for an editor marker on this asset to appear in the CK<br />
|-<br />
| Bit 6 (64) || Dynamic || Asset uses Havok physics (affected by gravity, can move around)<br />
|-<br />
| Bit 7 (128) || Articulated || Has a single bhkCollisionObject, or a single kinematic chain<br />
|-<br />
| Bit 8 (256) || Needs transform updates || Never used in vanilla Skyrim or DLCs<br />
|-<br />
| Bit 9 (512) || External emit || Used by assets emitting light <br />
|} <br />
<br />
{{note|Bit 7 (Articulated) is influenced by a NiSwitchNode, if one is present. Even if multiple branches of the switch node have collision, if a single collision object or kinematic chain is to be displayed at a time, this bit will be set.}}<br />
<br />
This is a cheat sheet of some common BSXFlags values used in vanilla objects:<br />
{| class="wikitable"<br />
! Number !! Use !! Description<br />
|-<br />
| 130 || Statics || The player won't be able to interact with the object aside from colliding with it, e.g. Tables, fireplaces, rocks<br />
|-<br />
| 131 || Animated Statics || The same as statics, just with animations, e.g. Chests, doors<br />
|-<br />
| 194 || Clutter || Havok is activated on these objects, meaning that they have physics applied, e.g. Clutter, weapons, armor ground items<br />
|}<br />
<br />
=== Inventory Marker ===<br />
<br />
The inventory marker (BSInvMarker) block determines the rotation and zoom of an item when viewed in the inventory. Rotation X, Y and Z specify the clockwise rotation in ''radians*1000'' around that axis, when viewed from the positive side of that axis. The standard view (no rotations) in the inventory is viewing from the positive Y axis. Increasing the zoom value makes the item appear larger in the inventory, decreasing it makes it smaller.<br />
<br />
== Collision ==<br />
{{main|[[Arcane University:Mesh Collisions]]}}<br />
<br />
Collision meshes are used to make objects solid in the Creation Engine. A nif can have a single collision mesh, or many. They can be static or moving. The collision settings are also what make the object affected by physics. They determine what parts of an object are interactable. They are typically simpler than the visible meshes, being made up of fewer vertices, since they are invisible and do not need small detail.<br />
<br />
== See Also ==<br />
* [[AU:Nif Implementation|Nif Implementation]]: Tutorials on making nifs work in Skyrim.<br />
* [[Arcane_University:DDS_Data_Format|DDS Data Format]]: Information on the DDS format, used for textures.<br />
*[https://forums.nexusmods.com/index.php?/topic/1188259-bslightingshaderproperty-basics/ BSLightingShaderProperty Basics] explains further about BSLightingShaderProperty node and it's uses. Includes image examples. <br />
<br />
[[Category:Arcane_University]][[Category:Arcane_University-3D_Art]]<br />
[[Category:Data_Format]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Custom_Map_Marker_Implementation&diff=4543Arcane University:Custom Map Marker Implementation2022-11-28T02:51:53Z<p>Gamma Metroid: /* Applying your new Marker in xEditor */ xEdit not xEditor</p>
<hr />
<div>{{Trail|Implementation}}<br />
Guide to Implement Map Markers with Flash.<br />
<br />
= Beyond Skyrim Map Marker Implementation =<br />
<br />
== Prerequisites ==<br />
* [https://github.com/jindrapetrik/jpexs-decompiler/releases JPEXS Decompiler]<br />
* svg file with your icon<br />
* Map marker index from [https://docs.google.com/spreadsheets/d/1K-eTmgJRDbMdf8bKDfGHTDfKAlbm8yyrSK-tJmBa1BQ/edit?usp=sharing here]<br />
<br />
== Process - for skyui/mapmarkerart.swf and hudmenu.swf ==<br />
* Open the file with JPEXS Decompiler<br />
* Expand shapes<br />
* Right click the shape with your marker index and select Replace - Update Bounds<br />
* Select your icon<br />
* Make sure there is no error (in the bottom right should be a green checkbox - if it is not green, click it and fix the issue)<br />
* Repeat this for the undiscovered marker<br />
* Save<br />
<br />
== Add the map markers to Skyrim ==<br />
* Open your map marker in xEdit (they are usually in the persistent worldspace cell)<br />
* Change Map Marker\TNAM to your map marker index<br />
<br />
= General Custom Map Marker Implementation =<br />
<br />
== Prerequisites ==<br />
* Source files of the following UI files:<br />
** MapMarkerArt.swf<br />
** MapMenu.swf<br />
** HudMenu.swf<br />
* Adobe Flash CS5 OR Adobe Flash CS6.<br />
* Minor ActionScript 2 knowledge.<br />
* Lots of time.<br />
* Minor understanding of Flash’s keyframe system.<br />
* Knowledge of Adobe Illustrator OR other programs which can export .ai or .SVGs.<br />
* A copy of the Skyrim UI and SkyUI source files found here and here respectively.<br />
<br />
== Introduction ==<br />
<br />
Skyrim’s map marker system is quite easy to understand, yet a pain to implement new map markers simply because of how Bethesda implemented the system. When implementing new markers, you need to implement them in both HudMenu.swf and MapMarkerArt.swf, which is a SkyUI file. If you want to edit the vanilla map markers, then you can simply look for the art in MapMenu.swf and work off it instead of the SkyUI file. The known maximum limit is 255; anything above that is not read by the game and skipped. The markers are stored in two large arrays; one for “Discovered” markers and the other for “Undiscovered” markers. The aim is to assign our marker an “index”, and then fill that slot with our marker in the UI files so they display in-game. In xEdit, you might have noticed that when selecting the type of marker, you can insert a number rather than select an already existing type of marker. This becomes extremely handy later on in the guide. <br />
<br />
== Setting up the workspace: (For Beyond Skyrim Users looking to add more) ==<br />
<br />
Once you have the two sources from GitHub, you’ll need this so you can add new map markers that will work alongside other map markers from other “Beyond Skyrim” projects. From the archive, make sure the contents of “SkyrimUI/src” are in the source folders “SkyrimUI/src”. Do the same for folder “SkyUI/src”, but instead place it in “SkyUI/src”. This should help when it comes to building.<br />
<br />
== Getting Your Vectors Ready ==<br />
<br />
To begin with, your vector can either be drawn up in Illustrator or Flash, both results can be utilized. When exporting out of illustrator, make sure you export the .ai as “CS5/CS6” format or Adobe Flash will not accept the file. For flash, make sure you can import it into the flash document when ready. The marker can either be saved as a flash document or already stored as a Movie Clip.<br />
<br />
=== Adding the Name === <br />
Even after a few years of doing this process, I am still not sure if this is used. However, the game uses the size of the array to set up the map markers later in the process. The Map source files should have another child directory named “Map”, and then an ActionScript file called “MapMarker.as”. Open this file and make yourself comfortable with the layout. The array you need to edit is called “ICON_MAP” and the naming convention is usually “MarkerName”, followed by “Marker”, for example, “MyAwesomeMarker” (See Figure 1 on the next page). It is best to keep this name saved somewhere for later. If you are using the files for “Beyond Skyrim”, there is lots of space below the current markers and starts at index 90. Once this is complete, you will need to recompile the MapMenu.swf and insert it into your “Data/interface” folder. If you do not know how to recompile a flash document, please google it. <br />
[[File:MM1.PNG]]<br />
* '''Figure 1:''' The array which stores marker names and which you need to edit.<br />
<br />
=== Adding it to MapMarkerArt.swf ===<br />
<br />
[[File:MM2.PNG]]<br />
*'''Figure 2:''' The timeline, this is where the magic happens.<br />
In the library, look for a MovieClip called “MapMarkerArt”. Open it up and look around and try and understand how it works. Each keyframe in the timeline is each “Discovered” map marker in the game, and this specific file has already been modified to store as many markers as possible, so all you must do is replace the marker at the given index. To figure out the index of your new marker, there are two ways. Either count every element in the array, starting from zero, and when you reach your marker, you have your index. Or, you just have a big fat guess and hope it’s correct. <br />
To import your marker art into flash, select File > Import to Library and then select your illustrator or SVG document. Proceed through the importing steps and hope it comes out okay. This should be basic flash stuff to insert it into the keyframe, so I will skip ahead to the next step. When this step is complete, compile “MapMarkerArt.swf” and insert it into data/interface/skyui”<br />
<br />
=== Adding it to HudMenu.swf ===<br />
This step is similar to step 2, This time in the library look for a MovieClip called “CompassMarker_mc” and try and understand the clip. This is a little different to the map marker art, this has some markers which are not in the map marker array at the beginning of the keyframe, so add four to your index, (eg: if your index is 24, do 24 + 4 and there is your new index for this file). Repeat the following, and implement your marker at the correct index, compile the file, and insert it in Data/Interface. <br />
<br />
=== Applying your new Marker in xEdit ===<br />
When you have added your marker, you can now apply it to a map marker in xEdit. Look for the map marker you would like to change, and then change the current type by typing your markers index in. For example, this should end up displaying something like “Custom 95”. Save your plugin and launch your game. If all is successful, your new marker should be in-game.<br />
<br />
== Troubleshooting ==<br />
*'''Q:''' ''My marker isn’t correct on the MapMenu/HudMenu, it’s invisible or a circle dot!''<br />
**'''A:''' This means you need to look back in flash and make sure your marker is in the correct slot. If you want to make sure your marker is working in-game, replace the dot with your new marker and relaunch your game. If your marker is working, try and play around with the keyframes surrounding your index.<br />
*'''Q:''' ''My game crashes on loading or none of the menus are loading!''<br />
**'''A:''' This usually means compiling one of the menus has resulted in tons of errors and will not work in-game. You need to fix these compilation errors before testing your marker.<br />
*'''Q:''' ''Your tutorial sucks and I could do with some assistance.''<br />
**'''A:''' I fully understand if my tutorial sucks, try and contacting me on discord: Greavesy#9357.<br />
<br />
== Adding Custom Music Stinger to Map Marker ==<br />
For custom discovery sounds, every team makes a keyword per discovery sound and adds it in BSAssets. Add each stinger to MUSDiscoverGeneric in BSAssets and condition them so they play if the player is in a cell with a location that's marked with a keyword that’s specific to the stinger. Every team can now implement custom map markers with sounds by setting the necessary location keywords, up to 1 custom map marker type per location.<br />
<br />
<br />
[[Category:Asset_Tutorial]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:CK-CMD_for_Skyrim&diff=4520Arcane University:CK-CMD for Skyrim2022-10-20T22:08:38Z<p>Gamma Metroid: reorganized, removing rig exporting since it has its own page</p>
<hr />
<div>'''CK-CMD''' is a command prompt application that can convert between fbx and [[Arcane_University:NIF_Data_Format|NIF]] files, and generate behavior files for animations. This makes it software-agnostic, unlike most nif conversion methods, and thus not as affected by changes in the modeling software. CK-CMD makes it possible to export a finished asset as an fbx from nearly any modeling software, and create a nif file that is 95% ready for game import with only one command.<br />
<br />
It properly transfers vertex coloring to nif files from an fbx, and materials settings and paths are translated from modeling software to BSLightingShaderProperty nodes. It also applies all necessary strings, flags, and values in the resulting nif. Visual adjustments may be desired through [[AU:Nifskope for Skyrim|NifSkope]], but if properly prepared, the resulting nif is game-ready.<br />
<br />
==Download==<br />
* [https://github.com/aerisarn/ck-cmd ck-cmd on GitHub]: Download the latest ck-cmd.zip from the releases (ck-gui is a related but different program).<br />
<br />
==System Preparations==<br />
No special considerations need to be made for where ck-cmd is located on your computer, but commands include file paths, so it may be advisable to place it somewhere with a short and simple path. It is convenient to create a common folder for fbx input and nif output, as in the example:<br />
D:\CK-CMD<br />
> Input<br />
> Output\<br />
<br />
==Model Preparations==<br />
Ensure all faces have the intended materials applied, as ck-cmd will create BSLightingShaderProperty nodes with any applicable materials in the FBX. Note that some material shaders do not translate correctly to BSLightingShaderProperty nodes, so check this first if the generated BSLightingShaderProperty nodes have issues. Standard blinn materials are recommended. The application will also use the same file paths as your 3D software’s material shaders, meaning that if you set up materials with the textures already in their proper end-user location in \Data\Textures, you may not need to change the paths in the nif later.<br />
<br />
Contrary to the documentation on github, assets should '''not''' be combined into a single object, as ck-cmd currently has a bug that creates many duplicate vertices in this function. Instead, separate the object by material. The name of your mesh or submeshes in your software’s outliner (or specific term for object heirarchy) will be used to create strings in the nif. The other usual pre-export checks apply (freeze any transformations, check pivot/origin, apply any modifiers, etc). The application will properly transfer any vertex coloring to the resulting nif. (Note however that in some modeling software, using vertex colors on some nodes but not otherwise leads to strange results when converted. Consequently, you may need to flood your model with the default white color before vertex painting shadow areas.) If your nif is to include a [[AU:Mesh Collisions|collision mesh]], the same pre-export checks apply (see [[#Collision|below]] for further details).<br />
<br />
===Scale===<br />
Different modeling software will have different default settings for the meaning of one measurement unit. When your asset is correctly scaled for its intended in-game size in comparison to the grid or even other exported Skyrim assets, it may import into Nifskope with a different per-unit measurement, and the engine reading the nif could interpret an intended scale of five meters as five centimeters, or vice versa. This problem is almost always a matter of centimeters versus meters, so check this first if your asset looks about 100 times larger or smaller than intended.<br />
<br />
In Blender, setting "Apply Scaling" in the fbx export to "FBX All" is usually the safest. The units in Blender will be equivalent to Skyrim units. For example, an object 128 "meters" tall in Blender will be 128 Skyrim units after converting, which is equal to 6 feet in game.<br />
<br />
In Maya, it is necessary to set the scale of the grid to meters, instead of the default centimeters, then export the fbx with the Units dropdown changed to no automatic scaling, and file units converted to centimeters. This is a matter of Maya to game engine workflow, not specific to ck-cmd.<br />
<br />
===Collision===<br />
[[File:ck-cmd collision hierarchy.png|thumb|right|An example collision hierarchy in Blender]]<br />
To include a [[AU:Mesh Collisions|collision mesh]], arrange your outliner/hierarchy as shown in the figure at right before exporting it all as a single FBX.<br />
<br />
In this example using Blender, 'Scene_rb_mopp_mesh' is the collision object, contained within a hierarchy of empty objects. Note that the name of the material is 'SKY_HAV_MAT_STONE', which will be interpreted as the collision material. Multiple materials on the collision mesh will be interpreted as multiple collision materials (stone, wood, stairs, etc).<br />
<br />
===Animated statics===<br />
{{main|[[AU:Exporting animated statics using ck-cmd|Exporting animated statics using ck-cmd]]}}<br />
<br />
It is usually not necessary to flip or change export settings to compensate for Z-up vs Y-up modeling software. However, animations that use rotation may require proper export settings. Skyrim usually uses Y-forward, Z-up. Additionally, if you are including translations, be sure animation simplification is disabled in the fbx export settings. If it is enabled, the animation may be lost upon export. This will leave some extraneous transform controllers in the controller sequence, but they can be removed manually without too much trouble.<br />
<br />
==Converting FBX to NIF==<br />
Open the command prompt.<br />
Navigate to CK-Cmd’s location.<br />
Use the command:<br />
ck-cmd.exe importfbx (full input path\Example.fbx) -e (full output path)<br />
Wait for the process to finish.<br />
Open the resulting nif in [[AU:Nifskope for Skyrim|NifSkope]] for inspection. It is generated in the output location with the same name as the fbx file originally used for input.<br />
<br />
Video tutorial: [https://www.youtube.com/watch?v=3f_9evNUiGU CK-CMD FBX to NIF] by Thog<br />
<br />
==Adjustments in NifSkope==<br />
Ck-cmd should have created a nif file with all basic setup complete, such as strings, [[AU:NIF Data Format#BSXFlags node|BSX flags]], collision meshes, etc. It should have also approximated your material shader settings in the resulting BSLightingShaderProperty nodes. If your asset appears untextured (bright magenta in color), you will need to direct NifSkope to the proper texture paths. You will still need to adjust visuals via BSLightingShaderProperty settings that are not present in your default modeling software’s materials, such as the global glossiness value, switching [[AU:NIF Data Format#Shader Types|shader types]], adding shader flags such as emission or environment mapping, etc, as well as other arbitrary settings in the nif, such as audio material settings.<br />
<br />
==Actor/creature animations==<br />
{{main|[[AU:Implementation of Custom Animations|Implementation of Custom Animations]]}}<br />
Another of ck-cmd's functions is creating custom animations for actors. This can be used to replace animations of vanilla npcs or creatures, or add new animations by editing the behavior files. ck-cmd can also be used to create entirely new actor rigs with custom animations.<br />
<br />
==Known Bugs==<br />
*'''FBX -> Nif'''<br />
**While ck-cmd can automatically separate objects with multiple materials on export, it duplicates many vertices in the process. Instead, simply separate each object by material before export.<br />
<br />
==Links==<br />
* [https://github.com/aerisarn/ck-cmd ck-cmd on GitHub]<br />
<br />
[[Category:Arcane University-3D Art-Mesh Export to NIF]] [[Category:Arcane University-Animation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:CK-CMD_for_Skyrim&diff=4519Arcane University:CK-CMD for Skyrim2022-10-20T21:48:17Z<p>Gamma Metroid: /* Scale Matching */ clarification on scale</p>
<hr />
<div>'''CK-CMD''' is a command prompt application that can convert fbx files into [[Arcane_University:NIF_Data_Format|NIF]] files. This makes it software-agnostic, unlike most exporter plugin solutions, and thus not as affected by changes in the modeling software. CK-CMD makes it possible to export a finished asset as an fbx from nearly any modeling software, and create a nif file that is 95% ready for game import with only one command.<br />
<br />
It properly transfers vertex coloring to nif files from an fbx, and materials settings and paths are translated from modeling software to BSLightingShaderProperty nodes. It also applies all necessary strings, flags, and values in the resulting nif. Visual adjustments may be desired through [[AU:Nifskope for Skyrim|NifSkope]], but if properly prepared, the resulting nif is game-ready.<br />
<br />
==Download==<br />
* [https://github.com/aerisarn/ck-cmd ck-cmd GitHub]: Download the latest ck-cmd.zip from the releases (ck-gui is a related but different program).<br />
<br />
==System Preparations==<br />
No special considerations need to be made for where ck-cmd is located on your computer, but commands include file paths, so it may be advisable to place it somewhere with a short and simple path. It is convenient to create a common folder for fbx input and nif output, as in the example:<br />
D:\CK-CMD<br />
> Input<br />
> Output\<br />
<br />
==Model Preparations==<br />
Ensure all faces have the intended materials applied, as ck-cmd will create BSLightingShaderProperty nodes with any applicable materials in the FBX. Note that some material shaders do not translate correctly to BSLightingShaderProperty nodes, so check this first if the generated BSLightingShaderProperty nodes have issues. Standard blinn materials are recommended. The application will also use the same file paths as your 3D software’s material shaders, meaning that if you set up materials with the textures already in their proper end-user location in \Data\Textures, you may not need to change the paths in the nif later.<br />
<br />
Contrary to the documentation on github, assets should '''not''' be combined into a single object, as ck-cmd currently has a bug that creates many duplicate vertices in this function. Instead, separate the object by material. The name of your mesh or submeshes in your software’s outliner (or specific term for object heirarchy) will be used to create strings in the nif. The other usual pre-export checks apply (freeze any transformations, check pivot/origin, apply any modifiers, etc). The application will properly transfer any vertex coloring to the resulting nif. (Note however that in some modeling software, using vertex colors on some nodes but not otherwise leads to strange results when converted. Consequently, you may need to flood your model with the default white color before vertex painting shadow areas.) If your nif is to include a [[AU:Mesh Collisions|collision mesh]], the same pre-export checks apply (see [[#Including Collision|below]] for further details).<br />
<br />
===Animations===<br />
{{main|[[AU:Exporting animated statics using ck-cmd|Exporting animated statics using ck-cmd]]}}<br />
<br />
It is usually not necessary to flip or change export settings to compensate for Z-up vs Y-up modeling software. However, animations that use rotation may require proper export settings. Skyrim usually uses Y-forward, Z-up. Additionally, if you are including translations, be sure animation simplification is disabled in the fbx export settings. If it is enabled, the animation may be lost upon export. This will leave some extraneous transform controllers in the controller sequence, but they can be removed manually without too much trouble.<br />
<br />
==Scale Matching==<br />
Different modeling software will have different default settings for the meaning of one measurement unit. When your asset is correctly scaled for its intended in-game size in comparison to the grid or even other exported Skyrim assets, it may import into Nifskope with a different per-unit measurement, and the engine reading the nif could interpret an intended scale of five meters as five centimeters, or vice versa. This problem is almost always a matter of centimeters versus meters, so check this first if your asset looks about 100 times larger or smaller than intended.<br />
<br />
In Blender, setting "Apply Scaling" in the fbx export to "FBX All" is usually the safest. The units in Blender will be equivalent to Skyrim units. For example, an object 128 "meters" tall in Blender will be 128 Skyrim units after converting, which is equal to 6 feet in game.<br />
<br />
In Maya, it is necessary to set the scale of the grid to meters, instead of the default centimeters, then export the fbx with the Units dropdown changed to no automatic scaling, and file units converted to centimeters. This is a matter of Maya to game engine workflow, not specific to ck-cmd.<br />
<br />
==Including Collision==<br />
[[File:ck-cmd collision hierarchy.png|thumb|right|An example collision hierarchy in Blender 2.92]]<br />
To include a [[AU:Mesh Collisions|collision mesh]], arrange your outliner/hierarchy as shown in the figure at right before exporting it all as a single FBX.<br />
<br />
In this example using Blender 2.92, 'Scene_rb_mopp_mesh' is the collision object, contained within a hierarchy of empty objects. Note that the name of the material is 'SKY_HAV_MAT_STONE', which will be interpreted as the collision material. Multiple materials on the collision mesh will be interpreted as multiple collision materials (stone, wood, stairs, etc).<br />
<br />
==Converting FBX to NIF==<br />
Open the command prompt.<br />
Navigate to CK-Cmd’s location.<br />
Use the command: ck-cmd.exe importfbx (full input path\Example.fbx) -e (full output path)<br />
Wait for the process to finish.<br />
Open the resulting nif in [[AU:Nifskope for Skyrim|NifSkope]] for inspection. It is generated in the output location with the same name as the fbx file originally used for input.<br />
<br />
[https://www.youtube.com/watch?v=3f_9evNUiGU CK-CMD FBX to NIF Video Tutorial] by Thog<br />
<br />
==Adjustments in NifSkope==<br />
Ck-cmd should have created a nif file with all basic setup complete, such as strings, [[AU:NIF Data Format#BSXFlags node|BSX flags]], collision meshes, etc. It should have also approximated your material shader settings in the resulting BSLightingShaderProperty nodes. If your asset appears untextured (bright magenta in color), you will need to direct NifSkope to the proper texture paths. You will still need to adjust visuals via BSLightingShaderProperty settings that are not present in your default modeling software’s materials, such as the global glossiness value, switching [[AU:NIF Data Format#Shader Types|shader types]], adding shader flags such as emission or environment mapping, etc, as well as other arbitrary settings in the nif, such as audio material settings.<br />
<br />
==Building from Source==<br />
Requires CMake to be built.<br />
<br />
Cloning the repo<br />
git clone https://github.com/aerisarn/ck-cmd.git ck-cmd<br />
cd ck-cmd<br />
Downloading modules:<br />
git submodule update --init --recursive<br />
Downloading libraries:<br />
Put all the libraries into rootDir/lib The required libraries are:<br />
<br />
bsa : GitHub<br />
DirectXTex : GitHub<br />
fbx : GitHub<br />
loadorder :<br />
loki : Website<br />
nif : GitHub<br />
xedit : GitHub<br />
zlib : GitHub<br />
The expected file structure is here.<br />
<br />
Running CMake:<br />
mkdir build<br />
cd build<br />
cmake -G "Visual Studio 15 2017" -A Win32 ..<br />
Then use Visual studio to build the generated ck-cmd solutions (ck-cmd.sln)<br />
<br />
==Exporting vanilla animations from Skyrim with ck-cmd==<br />
:''View the original document (with pictures) [https://docs.google.com/document/d/1yV4-wzR4Uo5XwfTtGtGUmH72M8bf8-VzTiFMSPlVSmI/edit here]''<br />
<br />
Transcribed by URL#8070 (discord) / @urlknight (twitter). Pictures and initial info from aerisarn#8437 (discord) Last updated 8/16/2020<br />
<br />
===Intro===<br />
This tutorial will tell you how to export rigs from Skyrim with root motion intact, using ck-cmd. This is not a tutorial about importing rigs into Skyrim, which is more complex.<br />
<br />
Tools Needed<br />
*Skyrim LE<br />
*Skyrim BSA Extractor<br />
*ck-cmd<br />
<br />
Extract the Animation BSAs; Navigate to your Skyrim LE Data folder (Important: anything from Skyrim SSE can NOT be used) and find “Skyrim - Animations.bsa”. Open the BSA Extractor and drop the Animations BSA in there. If you want to see meshes/skins too, you’ll have to extract the Meshes01.bsa as well. Using the BSA Extractor is pretty straightforward.<br />
<br />
===The exporting command===<br />
(picture missing)<br />
You will use this command to export an animated rig. Pick a creature folder from your Skyrim LE extracted animation bsa. Here’s an example path for if we were to use the dragon:<br />
<br />
D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.hkx<br />
<br />
(picture missing)<br />
So, the command would be ck-cmd exportrig “D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.hkx”<br />
<br />
ck-cmd will read that file and output a skeleton fbx, which you can import into a 3d program like Blender.<br />
<br />
(picture missing)<br />
If you want to also have the physics and the ragdoll, add the path to the mesh’s bsa skeleton nif.<br />
(picture missing)<br />
So, ck-cmd exportrig “D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.hkx” “D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.nif”<br />
<br />
You will get this:<br />
(picture missing)<br />
Yellow capsules are the single element of the ragdoll. The other capsules are collision areas that generate events for the behavior. The big red box is the creature Creation Kit collision, which is used to see if it will fit through stuff and how much space it takes in the CK.<br />
<br />
If we want the skeletal animation exported with some animations, we can add the --a parameter with a folder containing the vanilla animations.<br />
<br />
(picture missing)<br />
ck-cmd exportrig “D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.hkx” --a=”D:\git\resources\in\havok_bin\meshes\actors\dragon\animations”<br />
<br />
This will batch convert all of the animation .hkx inside that folder.<br />
<br />
If you want the mesh added to that, you can use the --n parameter with a folder. (Note: all of the nifs in that folder will be added to the scene) The mesh nif should also come from the extracted meshes BSA.<br />
(picture missing)<br />
ck-cmd exportrig “D:\git\resources\in\havok_bin\meshes\actors\dragon\character assets\skeleton.hkx” --a=”D:\git\resources\in\havok_bin\meshes\actors\dragon\animations” --n=”D:\git\resources\in\skyrim\meshes\actors\alduin\temp”<br />
(picture missing)<br />
Creatures actually have root motion and behavior events embedded inside an animation. To export that from the game, two more parameters are necessary- the path to the animation cache, and the one to the behavior file, --c and --b.<br />
<br />
The animation cache is in meshes/animationdata. In this case, it’s better seen using a walking creature, like the draugr.<br />
(picture missing)<br />
Adding --c="D:\git\resources\in\havok_bin\meshes\animationdata\draugrproject.txt" --b="D:\git\resources\in\havok_bin\meshes\actors\draugr\behaviors"<br />
<br />
Gives us FBX animations with root movement, which we can view in a 3d program.<br />
<br />
==Known Bugs==<br />
*'''FBX -> Nif'''<br />
**While ck-cmd can automatically separate objects with multiple materials on export, it duplicates many vertices in the process. Instead, simply separate each object by material before export.<br />
<br />
[[Category:Arcane University-3D Art-Mesh Export to NIF]] [[Category:Arcane University-Animation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Main_Page&diff=4516Arcane University:Main Page2022-09-30T01:59:43Z<p>Gamma Metroid: /* Structure and learning process */ rm paragraph break</p>
<hr />
<div>[[Category:Arcane University]]<br />
{| class="wikitable" align="right" style="margin:2em;"<br />
|colspan=2|[[File:AULabeled.png|center|frameless]]<br />
|-<br />
!'''Main Site'''<br />
|[http://beyondskyrim.org/au Arcane University]<br />
|-<br />
!'''Public Discord'''<br />
|https://discord.gg/dPVBnpEX4r<br />
|-<br />
!'''Start Date'''<br />
|2 May 2017<br />
|}<br />
The '''Arcane University''' is a cross-province initiative of the [[Beyond Skyrim]] project.<br />
<br />
It aims to provide teaching and support to all members and applicants to help them to acquire, expand or improve their skillset needed to contribute to the project.<br />
If a person wants to help out any of the partnered projects, but feels that they do not yet possess the required skill level, they can go to the Arcane University for tutorials, help with technical problems, and feedback. The tutorials of the Arcane University are made to support you to become a qualified developer or artist and join our community. About 20 teachers will help you personally if you are motivated to become a developer for our Skyrim mod projects! You may find the link to our Discord server in the [[#Links|Links section]] below.<br />
<br />
==Structure and learning process==<br />
{{AUDisciplines|clear=right}}The Arcane University is divided into '''disciplines''', or departments, each with its own group of specialized teachers who frequent their respective department. The channels are open, so group learning among students is also common. Administration of the AU is handled by a 3-person tribunal (the triumvirate) and a small group of designated moderators. A list of teachers and members of the Triumvirate can be found on the [[Staff]] page.<br />
<br />
Most of the learning within the Arcane University is self-guided. There are a number of tutorials and/or lesson plans available, depending on the discipline. Students can follow these and post their work for feedback, or ask questions at any time. Students may progress through special [[Arcane University:Arcane Roles|Arcane Roles]] based on their dedication to learning through AU coursework: Arcane Scribe, Arcane Mystic, Arcane Praxographicalist. These represent their skill and effort at learning their chosen discipline.<br />
<br />
===Expectations===<br />
'''Students''' are expected to:<br />
* Be willing to learn one or more of the skills we teach for the purpose of modding Skyrim;<br />
* Show some signs of life and progress every year;<br />
* behave nicely and respectfully;<br />
* treat confidential information (especially personal information of others) appropriately.<br />
* not use the Arcane University as a recruiting/advertising platform for your personal projects.<br />
<br />
'''Teachers''' are expected to:<br />
* Understand basic workflows of their departments;<br />
* Explain these workflows and/or link to existing tutorials and our wiki;<br />
* Evaluate the students handed in work regarding their department up to their best knowledge, but note that the evaluation can and will differ between people;<br />
* Notify a moderator if they see serious issues;<br />
* Support the wiki/tutorials if they feel like.<br />
<br />
'''Teachers''' are '''not''' expected to:<br />
* Answer every student in persona (evaluations can be split over the teacher board)<br />
* Respond to every message and question<br />
* Work on AU tutorials and Wiki (this is optional and will always remain optional)<br />
* Be the best of their trade (that is not possible, and evaluation of work quality differs)<br />
* Moderate every discussion (that is not their job)<br />
<br />
== AToMM Workshop Days ==<br />
'''AToMM''' stands for '''A'''rcane '''To'''gether '''M'''odding '''M'''eeting. These are workshop days consisting of four lectures or workshops, each one focused on a specific skill like [https://www.youtube.com/watch?v=1v--E6VtGJU writing for antagonists] or [https://www.youtube.com/watch?v=ZrepotkLSrs using substance designer for Skyrim]. The teacher goes through the steps of a process and students (or anyone else) can work along with them and ask questions as they go. Many of them are recorded and can be browsed in the [[AU:AToMM Archive|AToMM Archive]].<br />
<br />
== Partnered Projects ==<br />
The AU is working with multiple projects to unite the Skyrim modding community and build a source of shared knowledge. Our partners are:<br />
<br />
*[[Atmora:Main_Page|Beyond Skyrim: Atmora]]<br />
*[[Argonia:Main_Page|Beyond Skyrim: Argonia]]<br />
*[[Cyrodiil:Main Page|Beyond Skyrim: Cyrodiil]]<br />
*[[Elsweyr:Main Page|Beyond Skyrim: Elsweyr]]<br />
*[[Iliac Bay:Main Page|Beyond Skyrim: Iliac Bay]]<br />
*[[Morrowind:Main Page|Beyond Skyrim: Morrowind]]<br />
*[[Roscrea:Main Page|Beyond Skyrim: Roscrea]]<br />
*[https://discord.gg/H4BEDxD Alinor: The Eternal Paradise]<br />
*[https://discord.gg/H4BEDxD Cathnoquey: The Fractured Isles]<br />
*[https://discord.gg/p8s8mVq Olenveld]<br />
*[https://skyblivion.com/ Skyblivion]<br />
*[https://discord.gg/BxPjPgr Skygerfall]<br />
*[https://tesrskywind.com/ Skywind]<br />
*[https://discord.gg/H4BEDxD TES Valenwood]<br />
*[https://discord.gg/Mp8ryvt Thras: The Coral Kingdom]<br />
<br />
== Links ==<br />
* [[Arcane University:Rules|Rules - Arcane University]]<br />
* [[Arcane University:FAQ|FAQ about the Arcane University]]<br />
* [[Arcane University:Software|What software tools used to learn?]]<br />
* [https://discord.gg/zyCZXRK Arcane University Discord]<br />
* [[Arcane University:Arcane Roles|Arcane Roles]]<br />
* [https://old.beyondskyrim.org/tutorials/ Old tutorials, to be moved here (BS members access only)]<br />
<br />
== Recently Edited Pages (most recent arcane scrolls) ==<br />
{{#dpl:<br />
|namespace=Arcane_University<br />
|ordermethod=lastedit<br />
|shownamespace = false<br />
|count=10<br />
|order=descending<br />
}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:AULabel.png|Logo of the AU<br />
File:AUBlue.png|Blue, 3D rendered Logo<br />
File:AUBnW.png|Black & White Logo<br />
File:AU_Animated_Logo_Small.gif|AU animated Logo<br />
File:AToMMexample.png|Example of public lecture event schedule<br />
</gallery><br />
<br />
[[Category: Arcane University| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Template:AUDisciplines&diff=4515Template:AUDisciplines2022-09-30T01:57:14Z<p>Gamma Metroid: link heading</p>
<hr />
<div>{| style="border-spacing:0px; padding:0.8em; border:1px solid lightgray; text-align:center; margin:2em; background-color:#444444; float:{{{float|right}}}; clear:{{{clear|none}}};"<br />
| style="border-spacing:5px; font-size:1.5em; background-color:#555555; padding:1ex"|[[File:AULabel.png|25px|link=AU:Main Page]] '''[[AU:Main Page|AU]] Disciplines'''<br />
|-<br />
| [[Arcane University:3D Art|3D Art]]<br />
|-<br />
| [[Arcane University:Animation|Animation]]<br />
|-<br />
| [[Arcane University:Concept Art|Concept Art]]<br />
|-<br />
| [[Arcane University:Implementation|Implementation]]<br />
|-<br />
| [[Arcane University:Level Design|Level Design]]<br />
|-<br />
| [[Arcane University:Music Composition|Music Composition]]<br />
|-<br />
| [[Arcane University:Project Management|Project Management]]<br />
|-<br />
| [[Arcane University:Sound Effects|Sound Effects]]<br />
|-<br />
| [[Arcane University:Voice Acting|Voice Acting]]<br />
|-<br />
| [[Arcane University:Writing|Writing]]<br />
|}<br />
<noinclude><br />
[[Category:Navigational boxes]]<br />
</noinclude></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Main_Page&diff=4514Arcane University:Main Page2022-09-30T01:54:59Z<p>Gamma Metroid: add margin to box</p>
<hr />
<div>[[Category:Arcane University]]<br />
{| class="wikitable" align="right" style="margin:2em;"<br />
|colspan=2|[[File:AULabeled.png|center|frameless]]<br />
|-<br />
!'''Main Site'''<br />
|[http://beyondskyrim.org/au Arcane University]<br />
|-<br />
!'''Public Discord'''<br />
|https://discord.gg/dPVBnpEX4r<br />
|-<br />
!'''Start Date'''<br />
|2 May 2017<br />
|}<br />
The '''Arcane University''' is a cross-province initiative of the [[Beyond Skyrim]] project.<br />
<br />
It aims to provide teaching and support to all members and applicants to help them to acquire, expand or improve their skillset needed to contribute to the project.<br />
If a person wants to help out any of the partnered projects, but feels that they do not yet possess the required skill level, they can go to the Arcane University for tutorials, help with technical problems, and feedback. The tutorials of the Arcane University are made to support you to become a qualified developer or artist and join our community. About 20 teachers will help you personally if you are motivated to become a developer for our Skyrim mod projects! You may find the link to our Discord server in the [[#Links|Links section]] below.<br />
<br />
==Structure and learning process==<br />
{{AUDisciplines|clear=right}}The Arcane University is divided into '''disciplines''', or departments, each with its own group of specialized teachers who frequent their respective department. The channels are open, so group learning among students is also common. Administration of the AU is handled by a 3-person tribunal (the triumvirate) and a small group of designated moderators. A list of teachers and members of the Triumvirate can be found on the [[Staff]] page.<br />
<br />
Most of the learning within the Arcane University is self-guided. There are a number of tutorials and/or lesson plans available, depending on the discipline. Students can follow these and post their work for feedback, or ask questions at any time.<br />
<br />
Students may progress through special [[Arcane University:Arcane Roles|Arcane Roles]] based on their dedication to learning through AU coursework: Arcane Scribe, Arcane Mystic, Arcane Praxographicalist. These represent their skill and effort at learning their chosen discipline.<br />
<br />
===Expectations===<br />
'''Students''' are expected to:<br />
* Be willing to learn one or more of the skills we teach for the purpose of modding Skyrim;<br />
* Show some signs of life and progress every year;<br />
* behave nicely and respectfully;<br />
* treat confidential information (especially personal information of others) appropriately.<br />
* not use the Arcane University as a recruiting/advertising platform for your personal projects.<br />
<br />
'''Teachers''' are expected to:<br />
* Understand basic workflows of their departments;<br />
* Explain these workflows and/or link to existing tutorials and our wiki;<br />
* Evaluate the students handed in work regarding their department up to their best knowledge, but note that the evaluation can and will differ between people;<br />
* Notify a moderator if they see serious issues;<br />
* Support the wiki/tutorials if they feel like.<br />
<br />
'''Teachers''' are '''not''' expected to:<br />
* Answer every student in persona (evaluations can be split over the teacher board)<br />
* Respond to every message and question<br />
* Work on AU tutorials and Wiki (this is optional and will always remain optional)<br />
* Be the best of their trade (that is not possible, and evaluation of work quality differs)<br />
* Moderate every discussion (that is not their job)<br />
<br />
== AToMM Workshop Days ==<br />
'''AToMM''' stands for '''A'''rcane '''To'''gether '''M'''odding '''M'''eeting. These are workshop days consisting of four lectures or workshops, each one focused on a specific skill like [https://www.youtube.com/watch?v=1v--E6VtGJU writing for antagonists] or [https://www.youtube.com/watch?v=ZrepotkLSrs using substance designer for Skyrim]. The teacher goes through the steps of a process and students (or anyone else) can work along with them and ask questions as they go. Many of them are recorded and can be browsed in the [[AU:AToMM Archive|AToMM Archive]].<br />
<br />
== Partnered Projects ==<br />
The AU is working with multiple projects to unite the Skyrim modding community and build a source of shared knowledge. Our partners are:<br />
<br />
*[[Atmora:Main_Page|Beyond Skyrim: Atmora]]<br />
*[[Argonia:Main_Page|Beyond Skyrim: Argonia]]<br />
*[[Cyrodiil:Main Page|Beyond Skyrim: Cyrodiil]]<br />
*[[Elsweyr:Main Page|Beyond Skyrim: Elsweyr]]<br />
*[[Iliac Bay:Main Page|Beyond Skyrim: Iliac Bay]]<br />
*[[Morrowind:Main Page|Beyond Skyrim: Morrowind]]<br />
*[[Roscrea:Main Page|Beyond Skyrim: Roscrea]]<br />
*[https://discord.gg/H4BEDxD Alinor: The Eternal Paradise]<br />
*[https://discord.gg/H4BEDxD Cathnoquey: The Fractured Isles]<br />
*[https://discord.gg/p8s8mVq Olenveld]<br />
*[https://skyblivion.com/ Skyblivion]<br />
*[https://discord.gg/BxPjPgr Skygerfall]<br />
*[https://tesrskywind.com/ Skywind]<br />
*[https://discord.gg/H4BEDxD TES Valenwood]<br />
*[https://discord.gg/Mp8ryvt Thras: The Coral Kingdom]<br />
<br />
== Links ==<br />
* [[Arcane University:Rules|Rules - Arcane University]]<br />
* [[Arcane University:FAQ|FAQ about the Arcane University]]<br />
* [[Arcane University:Software|What software tools used to learn?]]<br />
* [https://discord.gg/zyCZXRK Arcane University Discord]<br />
* [[Arcane University:Arcane Roles|Arcane Roles]]<br />
* [https://old.beyondskyrim.org/tutorials/ Old tutorials, to be moved here (BS members access only)]<br />
<br />
== Recently Edited Pages (most recent arcane scrolls) ==<br />
{{#dpl:<br />
|namespace=Arcane_University<br />
|ordermethod=lastedit<br />
|shownamespace = false<br />
|count=10<br />
|order=descending<br />
}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:AULabel.png|Logo of the AU<br />
File:AUBlue.png|Blue, 3D rendered Logo<br />
File:AUBnW.png|Black & White Logo<br />
File:AU_Animated_Logo_Small.gif|AU animated Logo<br />
File:AToMMexample.png|Example of public lecture event schedule<br />
</gallery><br />
<br />
[[Category: Arcane University| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Main_Page&diff=4513Arcane University:Main Page2022-09-30T01:54:02Z<p>Gamma Metroid: fix floating error</p>
<hr />
<div>[[Category:Arcane University]]<br />
{| class="wikitable" align="right"<br />
|colspan=2|[[File:AULabeled.png|center|frameless]]<br />
|-<br />
!'''Main Site'''<br />
|[http://beyondskyrim.org/au Arcane University]<br />
|-<br />
!'''Public Discord'''<br />
|https://discord.gg/dPVBnpEX4r<br />
|-<br />
!'''Start Date'''<br />
|2 May 2017<br />
|}<br />
The '''Arcane University''' is a cross-province initiative of the [[Beyond Skyrim]] project.<br />
<br />
It aims to provide teaching and support to all members and applicants to help them to acquire, expand or improve their skillset needed to contribute to the project.<br />
If a person wants to help out any of the partnered projects, but feels that they do not yet possess the required skill level, they can go to the Arcane University for tutorials, help with technical problems, and feedback. The tutorials of the Arcane University are made to support you to become a qualified developer or artist and join our community. About 20 teachers will help you personally if you are motivated to become a developer for our Skyrim mod projects! You may find the link to our Discord server in the [[#Links|Links section]] below.<br />
<br />
==Structure and learning process==<br />
{{AUDisciplines|clear=right}}The Arcane University is divided into '''disciplines''', or departments, each with its own group of specialized teachers who frequent their respective department. The channels are open, so group learning among students is also common. Administration of the AU is handled by a 3-person tribunal (the triumvirate) and a small group of designated moderators. A list of teachers and members of the Triumvirate can be found on the [[Staff]] page.<br />
<br />
Most of the learning within the Arcane University is self-guided. There are a number of tutorials and/or lesson plans available, depending on the discipline. Students can follow these and post their work for feedback, or ask questions at any time.<br />
<br />
Students may progress through special [[Arcane University:Arcane Roles|Arcane Roles]] based on their dedication to learning through AU coursework: Arcane Scribe, Arcane Mystic, Arcane Praxographicalist. These represent their skill and effort at learning their chosen discipline.<br />
<br />
===Expectations===<br />
'''Students''' are expected to:<br />
* Be willing to learn one or more of the skills we teach for the purpose of modding Skyrim;<br />
* Show some signs of life and progress every year;<br />
* behave nicely and respectfully;<br />
* treat confidential information (especially personal information of others) appropriately.<br />
* not use the Arcane University as a recruiting/advertising platform for your personal projects.<br />
<br />
'''Teachers''' are expected to:<br />
* Understand basic workflows of their departments;<br />
* Explain these workflows and/or link to existing tutorials and our wiki;<br />
* Evaluate the students handed in work regarding their department up to their best knowledge, but note that the evaluation can and will differ between people;<br />
* Notify a moderator if they see serious issues;<br />
* Support the wiki/tutorials if they feel like.<br />
<br />
'''Teachers''' are '''not''' expected to:<br />
* Answer every student in persona (evaluations can be split over the teacher board)<br />
* Respond to every message and question<br />
* Work on AU tutorials and Wiki (this is optional and will always remain optional)<br />
* Be the best of their trade (that is not possible, and evaluation of work quality differs)<br />
* Moderate every discussion (that is not their job)<br />
<br />
== AToMM Workshop Days ==<br />
'''AToMM''' stands for '''A'''rcane '''To'''gether '''M'''odding '''M'''eeting. These are workshop days consisting of four lectures or workshops, each one focused on a specific skill like [https://www.youtube.com/watch?v=1v--E6VtGJU writing for antagonists] or [https://www.youtube.com/watch?v=ZrepotkLSrs using substance designer for Skyrim]. The teacher goes through the steps of a process and students (or anyone else) can work along with them and ask questions as they go. Many of them are recorded and can be browsed in the [[AU:AToMM Archive|AToMM Archive]].<br />
<br />
== Partnered Projects ==<br />
The AU is working with multiple projects to unite the Skyrim modding community and build a source of shared knowledge. Our partners are:<br />
<br />
*[[Atmora:Main_Page|Beyond Skyrim: Atmora]]<br />
*[[Argonia:Main_Page|Beyond Skyrim: Argonia]]<br />
*[[Cyrodiil:Main Page|Beyond Skyrim: Cyrodiil]]<br />
*[[Elsweyr:Main Page|Beyond Skyrim: Elsweyr]]<br />
*[[Iliac Bay:Main Page|Beyond Skyrim: Iliac Bay]]<br />
*[[Morrowind:Main Page|Beyond Skyrim: Morrowind]]<br />
*[[Roscrea:Main Page|Beyond Skyrim: Roscrea]]<br />
*[https://discord.gg/H4BEDxD Alinor: The Eternal Paradise]<br />
*[https://discord.gg/H4BEDxD Cathnoquey: The Fractured Isles]<br />
*[https://discord.gg/p8s8mVq Olenveld]<br />
*[https://skyblivion.com/ Skyblivion]<br />
*[https://discord.gg/BxPjPgr Skygerfall]<br />
*[https://tesrskywind.com/ Skywind]<br />
*[https://discord.gg/H4BEDxD TES Valenwood]<br />
*[https://discord.gg/Mp8ryvt Thras: The Coral Kingdom]<br />
<br />
== Links ==<br />
* [[Arcane University:Rules|Rules - Arcane University]]<br />
* [[Arcane University:FAQ|FAQ about the Arcane University]]<br />
* [[Arcane University:Software|What software tools used to learn?]]<br />
* [https://discord.gg/zyCZXRK Arcane University Discord]<br />
* [[Arcane University:Arcane Roles|Arcane Roles]]<br />
* [https://old.beyondskyrim.org/tutorials/ Old tutorials, to be moved here (BS members access only)]<br />
<br />
== Recently Edited Pages (most recent arcane scrolls) ==<br />
{{#dpl:<br />
|namespace=Arcane_University<br />
|ordermethod=lastedit<br />
|shownamespace = false<br />
|count=10<br />
|order=descending<br />
}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:AULabel.png|Logo of the AU<br />
File:AUBlue.png|Blue, 3D rendered Logo<br />
File:AUBnW.png|Black & White Logo<br />
File:AU_Animated_Logo_Small.gif|AU animated Logo<br />
File:AToMMexample.png|Example of public lecture event schedule<br />
</gallery><br />
<br />
[[Category: Arcane University| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Template:AUDisciplines&diff=4512Template:AUDisciplines2022-09-30T01:53:24Z<p>Gamma Metroid: oops</p>
<hr />
<div>{| style="border-spacing:0px; padding:0.8em; border:1px solid lightgray; text-align:center; margin:2em; background-color:#444444; float:{{{float|right}}}; clear:{{{clear|none}}};"<br />
| style="border-spacing:5px; font-size:1.5em; background-color:#555555; padding:1ex"|[[File:AULabel.png|25px|link=AU:Main Page]] '''AU Disciplines'''<br />
|-<br />
| [[Arcane University:3D Art|3D Art]]<br />
|-<br />
| [[Arcane University:Animation|Animation]]<br />
|-<br />
| [[Arcane University:Concept Art|Concept Art]]<br />
|-<br />
| [[Arcane University:Implementation|Implementation]]<br />
|-<br />
| [[Arcane University:Level Design|Level Design]]<br />
|-<br />
| [[Arcane University:Music Composition|Music Composition]]<br />
|-<br />
| [[Arcane University:Project Management|Project Management]]<br />
|-<br />
| [[Arcane University:Sound Effects|Sound Effects]]<br />
|-<br />
| [[Arcane University:Voice Acting|Voice Acting]]<br />
|-<br />
| [[Arcane University:Writing|Writing]]<br />
|}<br />
<noinclude><br />
[[Category:Navigational boxes]]<br />
</noinclude></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Template:AUDisciplines&diff=4511Template:AUDisciplines2022-09-30T01:53:09Z<p>Gamma Metroid: add clear parameter</p>
<hr />
<div>{| style="border-spacing:0px; padding:0.8em; border:1px solid lightgray; text-align:center; margin:2em; background-color:#444444; float:{{{float|right}}}; clear{{{clear|none}}};"<br />
| style="border-spacing:5px; font-size:1.5em; background-color:#555555; padding:1ex"|[[File:AULabel.png|25px|link=AU:Main Page]] '''AU Disciplines'''<br />
|-<br />
| [[Arcane University:3D Art|3D Art]]<br />
|-<br />
| [[Arcane University:Animation|Animation]]<br />
|-<br />
| [[Arcane University:Concept Art|Concept Art]]<br />
|-<br />
| [[Arcane University:Implementation|Implementation]]<br />
|-<br />
| [[Arcane University:Level Design|Level Design]]<br />
|-<br />
| [[Arcane University:Music Composition|Music Composition]]<br />
|-<br />
| [[Arcane University:Project Management|Project Management]]<br />
|-<br />
| [[Arcane University:Sound Effects|Sound Effects]]<br />
|-<br />
| [[Arcane University:Voice Acting|Voice Acting]]<br />
|-<br />
| [[Arcane University:Writing|Writing]]<br />
|}<br />
<noinclude><br />
[[Category:Navigational boxes]]<br />
</noinclude></div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Main_Page&diff=4510Arcane University:Main Page2022-09-30T01:52:00Z<p>Gamma Metroid: a bit of reorganizing</p>
<hr />
<div>[[Category:Arcane University]]<br />
{| class="wikitable" align="right"<br />
|colspan=2|[[File:AULabeled.png|center|frameless]]<br />
|-<br />
!'''Main Site'''<br />
|[http://beyondskyrim.org/au Arcane University]<br />
|-<br />
!'''Public Discord'''<br />
|https://discord.gg/dPVBnpEX4r<br />
|-<br />
!'''Start Date'''<br />
|2 May 2017<br />
|}<br />
The '''Arcane University''' is a cross-province initiative of the [[Beyond Skyrim]] project.<br />
<br />
It aims to provide teaching and support to all members and applicants to help them to acquire, expand or improve their skillset needed to contribute to the project.<br />
If a person wants to help out any of the partnered projects, but feels that they do not yet possess the required skill level, they can go to the Arcane University for tutorials, help with technical problems, and feedback. The tutorials of the Arcane University are made to support you to become a qualified developer or artist and join our community. About 20 teachers will help you personally if you are motivated to become a developer for our Skyrim mod projects! You may find the link to our Discord server in the [[#Links|Links section]] below.<br />
<br />
==Structure and learning process==<br />
{{AUDisciplines|float=right}}The Arcane University is divided into '''disciplines''', or departments, each with its own group of specialized teachers who frequent their respective department. The channels are open, so group learning among students is also common. Administration of the AU is handled by a 3-person tribunal (the triumvirate) and a small group of designated moderators. A list of teachers and members of the Triumvirate can be found on the [[Staff]] page.<br />
<br />
Most of the learning within the Arcane University is self-guided. There are a number of tutorials and/or lesson plans available, depending on the discipline. Students can follow these and post their work for feedback, or ask questions at any time.<br />
<br />
Students may progress through special [[Arcane University:Arcane Roles|Arcane Roles]] based on their dedication to learning through AU coursework: Arcane Scribe, Arcane Mystic, Arcane Praxographicalist. These represent their skill and effort at learning their chosen discipline.<br />
<br />
===Expectations===<br />
'''Students''' are expected to:<br />
* Be willing to learn one or more of the skills we teach for the purpose of modding Skyrim;<br />
* Show some signs of life and progress every year;<br />
* behave nicely and respectfully;<br />
* treat confidential information (especially personal information of others) appropriately.<br />
* not use the Arcane University as a recruiting/advertising platform for your personal projects.<br />
<br />
'''Teachers''' are expected to:<br />
* Understand basic workflows of their departments;<br />
* Explain these workflows and/or link to existing tutorials and our wiki;<br />
* Evaluate the students handed in work regarding their department up to their best knowledge, but note that the evaluation can and will differ between people;<br />
* Notify a moderator if they see serious issues;<br />
* Support the wiki/tutorials if they feel like.<br />
<br />
'''Teachers''' are '''not''' expected to:<br />
* Answer every student in persona (evaluations can be split over the teacher board)<br />
* Respond to every message and question<br />
* Work on AU tutorials and Wiki (this is optional and will always remain optional)<br />
* Be the best of their trade (that is not possible, and evaluation of work quality differs)<br />
* Moderate every discussion (that is not their job)<br />
<br />
== AToMM Workshop Days ==<br />
'''AToMM''' stands for '''A'''rcane '''To'''gether '''M'''odding '''M'''eeting. These are workshop days consisting of four lectures or workshops, each one focused on a specific skill like [https://www.youtube.com/watch?v=1v--E6VtGJU writing for antagonists] or [https://www.youtube.com/watch?v=ZrepotkLSrs using substance designer for Skyrim]. The teacher goes through the steps of a process and students (or anyone else) can work along with them and ask questions as they go. Many of them are recorded and can be browsed in the [[AU:AToMM Archive|AToMM Archive]].<br />
<br />
== Partnered Projects ==<br />
The AU is working with multiple projects to unite the Skyrim modding community and build a source of shared knowledge. Our partners are:<br />
<br />
*[[Atmora:Main_Page|Beyond Skyrim: Atmora]]<br />
*[[Argonia:Main_Page|Beyond Skyrim: Argonia]]<br />
*[[Cyrodiil:Main Page|Beyond Skyrim: Cyrodiil]]<br />
*[[Elsweyr:Main Page|Beyond Skyrim: Elsweyr]]<br />
*[[Iliac Bay:Main Page|Beyond Skyrim: Iliac Bay]]<br />
*[[Morrowind:Main Page|Beyond Skyrim: Morrowind]]<br />
*[[Roscrea:Main Page|Beyond Skyrim: Roscrea]]<br />
*[https://discord.gg/H4BEDxD Alinor: The Eternal Paradise]<br />
*[https://discord.gg/H4BEDxD Cathnoquey: The Fractured Isles]<br />
*[https://discord.gg/p8s8mVq Olenveld]<br />
*[https://skyblivion.com/ Skyblivion]<br />
*[https://discord.gg/BxPjPgr Skygerfall]<br />
*[https://tesrskywind.com/ Skywind]<br />
*[https://discord.gg/H4BEDxD TES Valenwood]<br />
*[https://discord.gg/Mp8ryvt Thras: The Coral Kingdom]<br />
<br />
== Links ==<br />
* [[Arcane University:Rules|Rules - Arcane University]]<br />
* [[Arcane University:FAQ|FAQ about the Arcane University]]<br />
* [[Arcane University:Software|What software tools used to learn?]]<br />
* [https://discord.gg/zyCZXRK Arcane University Discord]<br />
* [[Arcane University:Arcane Roles|Arcane Roles]]<br />
* [https://old.beyondskyrim.org/tutorials/ Old tutorials, to be moved here (BS members access only)]<br />
<br />
== Recently Edited Pages (most recent arcane scrolls) ==<br />
{{#dpl:<br />
|namespace=Arcane_University<br />
|ordermethod=lastedit<br />
|shownamespace = false<br />
|count=10<br />
|order=descending<br />
}}<br />
<br />
== Gallery ==<br />
<gallery mode=traditional><br />
File:AULabel.png|Logo of the AU<br />
File:AUBlue.png|Blue, 3D rendered Logo<br />
File:AUBnW.png|Black & White Logo<br />
File:AU_Animated_Logo_Small.gif|AU animated Logo<br />
File:AToMMexample.png|Example of public lecture event schedule<br />
</gallery><br />
<br />
[[Category: Arcane University| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:3D_Art&diff=4509Arcane University:3D Art2022-09-29T08:11:04Z<p>Gamma Metroid: rewrite intro</p>
<hr />
<div>{{Trail}}{{Template:AUDisciplines}}<br />
The '''3D Art''' department takes two-dimensional [[AU:Concept Art|concept art]]—usually digital drawings—and uses them to create three-dimensional models to be placed in the game world. The 3d artist must also take into account any special requirements regarding pre-existing lore, and technical restrictions required by the [[AU:Animation|animation]] and [[AU:Implementation|implementation]] teams.<br />
<br />
== General Workflow ==<br />
With the [[AU:Concept Art|concept art]] imported into the modelling software, [[AU:Blockout|blockout]] modeling starts. For the '''high-polywork flow''', the 3D artist [[AU:Sculpting|sculpts]] a high-poly mesh. They then [[AU:Baking|bake]] the high-poly details into the normal map of a [https://www.youtube.com/watch?v=X8kQiccJetw retopologized] [[AU:Mesh Polycount Comparisons|low-poly]] version of the mesh, and [[AU:Texturing|add textures]] to this low-poly model. After the asset is [[AU:Mesh Export to NIF|exported to NIF format]], it is given its physical properties such as [[AU:Mesh Collisions|collision and physics]]. It may then be rigged/skinned to bones and [[AU:Animation|animated]], if necessary.<br />
<br />
#[[Arcane University:Blockout|Blockout]]<br />
#[[Arcane University:Sculpting|Sculpting]]<br />
#[https://www.youtube.com/watch?v=X8kQiccJetw Retopology]<br />
#[[Arcane University:UV Unwrapping|UV Unwrapping]]<br />
#[[Arcane University:Baking|Baking]]<br />
#[[Arcane University:Texturing|Texturing]]<br />
#[[Arcane University:Mesh Export to NIF|Mesh Export to NIF]]<br />
#:{{#dpl:<br />
|category = Arcane University-3D Art-Mesh Export to NIF<br />
|shownamespace = false<br />
|nottitlematch = Mesh_Export_to_NIF<br />
}}<br />
#Adding [[Arcane University:Mesh Collisions|Mesh Collisions]]<br />
#[[Arcane University:Animation|Animation]]<br />
<br />
== Skyrim Data Formats ==<br />
Skyrim uses NIFs and DDS file formats to read and render objects in game. That means your mesh must be converted to a NIF and textures to DDS.<br />
* To review the specifics of the NIF data format used for meshes, check [[Arcane_University:NIF_Data_Format|Nif Data Format]].<br />
* To review the specifics of the DDS data format used for textures, check [[Arcane_University:DDS Data Format|DDS Data Format]].<br />
* Software for converting files can be found under [[Arcane_University:3D_Art#Asset_Implementation_Software|Asset Implementation Software]].<br />
<br />
== Asset-specific Tutorials ==<br />
=== Weapons ===<br />
*[[AU:Nifskope Weapons Setup|Nifskope Weapons Setup]]<br />
*[[:File:Tutorial_skyrim_bows_from_3ds.pdf|Rigging bows with 3ds Max and NifSkope (pdf)]] by Artisanix<br />
=== Armor ===<br />
=== Animated Objects ===<br />
*[https://www.youtube.com/watch?v=4DrN_AS28qk Animating Crash Course - Basic Static Animations in Blender (video)] by Hayden Price<br />
*[[AU:Exporting animated statics using ck-cmd|Exporting animated statics using ck-cmd]]<br />
*[[AU:Nifskope Hinge Constraints|Hinge Constraints]]<br />
=== Trees and Plants ===<br />
*[[AU:Flora Workflow|Flora Workflow]]<br />
*[https://www.youtube.com/watch?v=GE0Tm0RBRuc Creating and Texturing Grass (video)] by David Pynkoski (Beyond Skyrim)<br />
=== Tilesets and Architecture ===<br />
*[[:File:Bernstein_Mike_ModularKits3d.pdf|Modularity in Creating 3D Game Environments (pdf)]] by Mike Bernstein<br />
*[http://blog.joelburgess.com/2013/04/skyrims-modular-level-design-gdc-2013.html Skyrim’s Modular Approach to Level Design] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=PhW8CY8XkFg How We Used Iterative Level Design to Ship Skyrim and Fallout 3 (lecture video)] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=QBAM27YbKZg Fallout 4's Modular Level Design (lecture video)] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=sx9H2MW-sTs How to Create Tilesets (lecture video)] by Zix (Skywind)<br />
*[https://www.youtube.com/watch?v=zfPwxTmx73w Snapping Tutorial (video)] by Zix (Skywind)<br />
<br />
=== LOD Objects ===<br />
*[[AU:LOD Model Creation|LOD Model Creation]]<br />
*[https://morroblivion.com/forums/3d-models-and-textures/guideline-for-lod-model-creation Guideline for LOD model creation (forum thread)] by Grumpycat (Skywind)<br />
<br />
==Basic Software==<br />
As a 3D artist you have to use a variety of software and plugins to achieve the results you want. Below you'll find several alternatives within each category that are suitable for asset creation. You must have a 3D modeling, 3D baking and 3D texturing program in order to create your asset - this is your most basic programs in the unique 3D workflow. <br />
<br />
===3D modelling and sculpting programs===<br />
All 3D artists need a modelling and sculpting program to create the geometry of their asset.<br />
<br />
*[https://www.blender.org Blender] - free, modelling and sculpting. (also read [[AU:Blender for Skyrim|Blender for Skyrim]])<br />
*[https://www.autodesk.com/products/maya/overview Maya] [$] - modelling. (also read [[AU:Maya for Skyrim|Maya for Skyrim]])<br />
*[https://www.autodesk.com/products/3ds-max/overview?term=1-YEAR 3ds Max] [$] - modelling. (also read [[AU:3DS_Max_for_Skyrim|3ds Max for Skyrim]])<br />
*[https://pixologic.com ZBrush] [$] - sculpting. (also read [[AU:Z-Brush for Skyrim|ZBrush for Skyrim]])<br />
*[https://www.autodesk.com/products/mudbox/overview Mudbox] [$] - sculpting. (also read [[Mudbox for Skyrim|Mudbox for Skyrim]])<br />
<br />
===3D baking programs===<br />
You'll want to avoid [[AU:baking|baking]] in Blender, as the results can be slow, prone to errors and inaccurate. <br />
<br />
*[https://xnormal.net xNormal] - free.<br />
<br />
Some texturing programs are also good at baking. See list below for what options offer baking. <br />
<br />
===3D texturing program===<br />
We recommend these programs to texture your asset, as the tools at your disposal are vastly superior to Blender. <br />
<br />
*[https://quixel.com/mixer Quixel Mixer] - free, texturing. <br />
*[https://marmoset.co Marmoset Toolbag] [$] - baking, texturing. <br />
*[https://www.substance3d.com/products/substance-painter/ Substance Painter] [$*] - baking, texturing. Free with Student License. <br />
**[https://www.nexusmods.com/skyrimspecialedition/mods/44400?tab=description Substance Painter Plugin] - free. if you're using Substance Painter, you'll also want to use the PBR to Skyrim plugin.<br />
**[https://www.substance3d.com/products/substance-designer/ Substance Designer] [$*] Create materials with nodes - not for applying texture to an asset, only to create complex materials. Substance Designer is not required use, you can usually create the materials you want in Painter, but it's a powerful program for complex materials.<br />
*[https://www.blender.org/download/ Blender] Blender is not recommended for texturing assets, as all the programs above are ''much'' easier to use and superior in features and results. However, it does exist.<br />
<br />
===2D texturing program===<br />
These programs can be used to manually alter texture maps. These are not mandatory to download, but you might need one at some point. <br />
<br />
*[https://www.gimp.org GIMP] - free (also read [[AU:Gimp for Skyrim|GIMP for Skyrim]])<br />
*[https://affinity.serif.com Affinity] [$]<br />
*[https://www.adobe.com/uk/creativecloud/plans.html?promoid=8JD95GBM&mv=other Adobe Photoshop] [$] - Can be used with NVidia Plugin to convert maps to DDS format. PS: you sign up for yearly subscriptions, paid monthly.<br />
<br />
==Asset Implementation Software==<br />
When you've finished your textures and low poly mesh, they must be converted into Skyrim friendly formats, and implemented into Skyrim. In some of the Partner Projects your work as a 3D artist finishes here, and an asset implementer takes over. However, in most projects you are encouraged to implement your own asset. This is also what we recommend in the Arcane University, as it allows you to see and fix errors in your mesh and textures that's not visible until you see it in game. <br />
<br />
Asset implementation is a big topic, and more complicated assets require a thorough knowledge of NifSkope and Creation Kit. However, something as simple as a bowl can easily be done!<br />
<br />
All programs and plugins from here on out are free. <br />
<br />
===Convert Texture Maps to DDS===<br />
Skyrim uses the [[Arcane_University:DDS_Data_Format|DDS]] file format for all their texture maps. Export your textures in PNG or TGA, prepare your diffuse and other maps, then convert the images to DDS.<br />
<br />
*[https://www.getpaint.net Paint.Net] ''(also read [[Arcane_University:Paint.Net_for_Skyrim|Paint.net for Skyrim]])''<br />
*[https://www.nexusmods.com/skyrimspecialedition/mods/23316 Cathedral Assets Optimizer] converts only TGA to DDS. Allows batch conversion.<br />
*[https://developer.nvidia.com/nvidia-texture-tools-exporter Nvidia Texture Tools Exporter] can be downloaded as standalone program, or as Photoshop plugin. Standalone program allows batch conversion. <br />
*[https://www.gimp.org GIMP] primarily an image manipulation program. Plugin not required (v 2.10.24). Does not support [[Arcane_University:DDS_Data_Format#There_are_tons_of_DXT_codecs.21_Which_should_I_use.3F|DXT10/BC7]] export. Results can be inferior to other DDS export methods.<br />
*[https://github.com/Unity-Technologies/crunch/tree/unity Crunch] is designed for more advanced compression, and is a command-line tool, but it also outputs excellent quality DDS when configured properly.<br />
*[https://gpuopen.com/compressonator/ Compressonator] requires an AMD graphics card, but outputs good quality and has a nice GUI. Also supports command-line use.<br />
<br />
For information regarding the various export settings, and '''how to convert your texture to DDS''', read the [[Arcane_University:DDS_Data_Format|DDS]] page.<br />
<br />
===Convert Mesh to NIF===<br />
{{note|float=right|max-width=35%|Special Edition uses a different nif format from Skyrim/Legendary Edition. However, nearly all Skyrim/LE nifs will work in SSE, and are easier to work with. SSE nifs are also less precise. For this reason, most projects use LE nifs. If you do need to convert either way, you can use [https://www.nexusmods.com/skyrimspecialedition/mods/23316 Cathedral Assets Optimizer] or [https://www.nexusmods.com/skyrimspecialedition/mods/4089 SSE Nif Optimizer].}}<br />
<br />
There are a variety of methods to convert your mesh, including both software-specific plugins, and standalone converters that are software-agnostic:<br />
<br />
*Sofware agnostic:<br />
**[[Arcane_University:CK-CMD_for_Skyrim|CK-CMD]] - can convert both ways between .fbx and nif. Also can handle havok behaviors.<br />
**[[AU:Outfit Studio for Skyrim|Outfit Studio]] - can import .obj or .fbx, and export LE or SSE nifs. Also used skin armor, creatures, or npcs.<br />
*Blender:<br />
**[https://github.com/niftools/blender_niftools_addon Blender Niftools] - For Blender 2.8+, Export/Import tool between Blender and the Nif format. <br />
**[https://github.com/BadDogSkyrim/PyNifly PyNifly] - Export/Import tool between Blender and the Nif format. Supports SSE Meshes<br />
*3ds Max:<br />
**[https://github.com/figment/max_nif_plugin/releases/tag/3.8.0 3DS Max Niftools Addon] - Niftools Addon for 3DS Max. Might not work with versions after 2016<br />
**[https://www.nexusmods.com/skyrim/mods/84041 Apenov 3DS Max Plugin] - Another Plugin for 3DS Max, works with versions up to 2018. Supports some SSE Meshes<br />
<br />
===Add Collision to NIF===<br />
Your mesh needs a collision to become solid in the engine. Read the [[Arcane_University:Mesh_Collisions|collision wiki page]] for details on what program to use.<br />
<br />
*[[Arcane_University:CK-CMD_for_Skyrim|CK-CMD]]<br />
*[https://www.afkmods.com/index.php?/files/file/2398-nifutilssuite/ NifUtilsSuite] (includes ChunkMerge) - Can transfer collision from one nif to another, or convert TriShapes to compressed mesh collision<br />
*[https://wiki.beyondskyrim.org/wiki/File:Chunkmerge_Utils.zip Chunkmerge Utils] - templates for use with ChunkMerge<br />
<br />
===NifSkope===<br />
[https://github.com/niftools/nifskope/releases NifSkope] is a program that allows you to open NIF files, view and alter NIF's properties and contents, and export NIF files into other file formats readable by other programs such as Blender. Nifskope is where you attach your textures to the NIF and specify shader settings for it to appear correctly in game. Nifskope also allows you to browse the Skyrim meshes BSA (archive) without using a BSA unpacker. <br />
<br />
<center>{{note|Nifskope is essential for all asset implementation.}}</center><br />
<br />
===Skyrim and Creation Kit===<br />
To view your asset in game you'll need the game. You can use Skyrim Legendary Edition, or Skyrim Special Edition.<br />
<br />
Depending on which Skyrim you own, you must download the Creation Kit that goes with your version: Creation Kit Legendary Edition, or Creation Kit Special Edition. See [https://www.creationkit.com/index.php?title=Category:Getting_Started Creationkit.com] for more information.<br />
<br />
And finally, if you use Skyrim Special Edition, you'll want to download Creation Kit Fixes to stabilize the program, reduce loadtimes and CTDs. [https://www.nexusmods.com/skyrimspecialedition/mods/20061 SSE Creation Kit Fixes]<br />
<br />
==See Also==<br />
*[[AU:NIF_Data_Format|NIF Data Format]] explains NIFs, the file format Skyrim uses to read meshes<br />
*[[AU:DDS_Data_Format|DDS Data Format]] explains DDSs, the file format Skyrim uses for texture images<br />
*[https://www.twitch.tv/videos/53095530 Start to Finish Game Asset (Video on Twitch)] By Bartalon<br />
'''Modelling'''<br />
*[https://www.youtube.com/watch?v=tTfIo_bezqw How to Model Anything in 3D - Modeling Fundamentals (Youtube)] by FlippedNormals<br />
*[https://www.youtube.com/watch?v=OVbIOHAI3iY 6 key principles for 3D modeling (Youtube)] by CG Cookie<br />
'''Texturing'''<br />
*[https://store.substance3d.com/blog/see-how-team-modders-uses-substance-recreate-skyrim How a Team of Modders Use Substance Painter to Recreate Skyrim] article on Substance Painter blog by Hayden Price<br />
*[https://www.youtube.com/watch?v=5e6zvJqVqlA What is Texel Density and How to Master it (Youtube)] By malcolm341<br />
*[https://www.youtube.com/watch?v=MVsIIkJNkjM What is Texture Padding and How to Master it (Youtube)] By malcolm341<br />
*[https://www.youtube.com/watch?v=DmuHLe6MjEA UDIMs - Modelling and Texturing Essentials (Youtube)] By FlippedNormals<br />
<br />
[[Category:Arcane_University-3D_Art| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Project_Management&diff=4508Arcane University:Project Management2022-09-29T07:49:17Z<p>Gamma Metroid: line break</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
'''Project Management''' requires both [[wikipedia:skill#hard skill|hard skills]] and [[wikipedia:soft skills|soft skills]]. Hard skills include file management and team organization. The soft skills, which are arguably the more important, include facilitating good communication and resolving conflicts. These are vital for our community projects to achieve a quality level comparable to professional projects, which have monetary funding and local physical presence. Our big and diverse community can make up for these disadvantages of being non-commercial and working remotely from each other with our dedication, time investment, and passion. The goal of project management is to make sure that individual team members are able to reach their highest potential.<br />
<br />
== General Ideas ==<br />
<br />
== Team Management ==<br />
Conflicts should be reduced to topic level, and never be promoted to a personal level. (add all that theory here later)<br />
<br />
== Project Management ==<br />
* Milestones<br />
* Planning<br />
* Tools (excel, Trello, Miro etc)<br />
<br />
== File Management ==<br />
<br />
=== Cleaning and Merging with xEdit ===<br />
<br />
=== Version Control ===<br />
<br />
=== LOD Generation ===<br />
{{main|[[AU:LOD Generation|LOD Generation]]}}<br />
LOD generation is typically something that is done by users. However, because our projects create entirely new worldspaces, we must provide an initial LOD for the "vanilla" experience. This process can be done a number of ways using Creation Kit, xLODGen, and DynDOLOD, but we recommend using xLODGen to generate terrain, and DynDOLOD for objects.<br />
<br />
{{stub}}<br />
[[Category:Arcane University-Project Management]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Project_Management&diff=4507Arcane University:Project Management2022-09-29T07:49:02Z<p>Gamma Metroid: stub</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
'''Project Management''' requires both [[wikipedia:skill#hard skill|hard skills]] and [[wikipedia:soft skills|soft skills]]. Hard skills include file management and team organization. The soft skills, which are arguably the more important, include facilitating good communication and resolving conflicts. These are vital for our community projects to achieve a quality level comparable to professional projects, which have monetary funding and local physical presence. Our big and diverse community can make up for these disadvantages of being non-commercial and working remotely from each other with our dedication, time investment, and passion. The goal of project management is to make sure that individual team members are able to reach their highest potential.<br />
<br />
== General Ideas ==<br />
<br />
== Team Management ==<br />
Conflicts should be reduced to topic level, and never be promoted to a personal level. (add all that theory here later)<br />
<br />
== Project Management ==<br />
* Milestones<br />
* Planning<br />
* Tools (excel, Trello, Miro etc)<br />
<br />
== File Management ==<br />
<br />
=== Cleaning and Merging with xEdit ===<br />
<br />
=== Version Control ===<br />
<br />
=== LOD Generation ===<br />
{{main|[[AU:LOD Generation|LOD Generation]]}}<br />
LOD generation is typically something that is done by users. However, because our projects create entirely new worldspaces, we must provide an initial LOD for the "vanilla" experience. This process can be done a number of ways using Creation Kit, xLODGen, and DynDOLOD, but we recommend using xLODGen to generate terrain, and DynDOLOD for objects.<br />
{{stub}}<br />
[[Category:Arcane University-Project Management]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Implementation&diff=4506Arcane University:Implementation2022-09-29T07:47:14Z<p>Gamma Metroid: move impnav</p>
<hr />
<div>{{Trail}}<br />
{{AUDisciplines}}<br />
'''Implementation''' is the stage where all resources come together, get married, and finally get polished until the game is "ready enough" for shipment.<br />
It is the most important and diverse task for Skyrim modding.<br />
<br />
If you have never touched the Creation Kit before, you should begin with the Creation Kit Wiki's [https://www.creationkit.com/index.php?title=Category:Getting_Started Getting Started] page. After that, a good entry to implementation is the [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Creating_an_Actor official Bethesda Quest tutorial]. It touches on many aspects of implementation, like quests, scenes, actors, packages and more. However, it is an ''entry''. Going through the tutorial will make you acquainted with the Creation Kit and its systems, and it can serve as a springboard to dive into more complex tasks. Additionally, the Creation Kit Wiki provides many more tutorials that you can take advantage of ([https://www.creationkit.com/index.php?title=Tutorials CK Wiki Tutorials]/[https://www.creationkit.com/index.php?title=Category:Community_Tutorials Community Tutorials]/[https://www.creationkit.com/index.php?title=Video_Tutorials Video Tutorials]).<br />
<br />
== Expectation ==<br />
Some things you may be doing as an implementer are:<br />
*Creating complex quests, sometimes with branching paths<br />
*Working with the Story manager to create radiant quests<br />
*Creating scenes, where NPCs talk with each other<br />
*Creating NPC packages or schedules<br />
*Creating magic effects or perks<br />
*Working with more complex NIFs<br />
<br />
Fundamental to many of these are the following:<br />
*Being comfortable working with the Papyrus scripting engine<br />
*Being able to troubleshoot when something does not work as intended.<br />
*As part of the former, reading through documentation such as the Creation Kit wiki or other sources.<br />
<br />
It should be noted that, in order to be an implementer, you do not need to be able to do all the aforementioned tasks. Some implementers can have more focused areas, such as creating quests or working with NIFs.<br />
<br />
== Implementation Lesson Plan ==<br />
{{ImpNav}}<br />
=== Quests/Dialogue ===<br />
<br />
* [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Planning_the_Quest Quest Implementation - Basic (Creation Kit Wiki)]<br />
* [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Packages Quest Implementation - Intermediate (Creation Kit Wiki)]<br />
* [[Arcane University:Dialogue Tips & Tricks|Dialogue Tips & Tricks]] (To come)<br />
* [[Arcane University:Voice Line Implementation|Voice Line Implementation]]<br />
* [[Arcane University:Random Encounters|Random Encounters]] (To come)<br />
* [[Arcane University:World Interactions|World Interactions]]<br />
* [[AU:Seq Guide|Seq Guide]]<br />
<br />
=== 3D/NIF Implementation ===<br />
<br />
<!-- This is just the lesson plan from https://docs.google.com/document/d/1vjiuNeBrRkmIpzNxzV6VgxBM9WgAfiHKwPwOTrmkYWw/edit and doesn't really match the Nif Implementation page --><br />
* [[Arcane University:Static/Havok Objects|Static/Havok Objects]] (To come)<br />
* [[Arcane University:Exporting animated statics using ck-cmd|Animated Objects]] (doors, gates, containers, etc.)<br />
* [http://skyrimmw.weebly.com/skyrim-modding/destructible-object-creation-breakable-stuff-skyrim-modding-tutorial Destructible Objects (external link)]<br />
* [[Arcane University:Grasses|Grasses]]<br />
* [[Arcane University:Tree Animations|Tree Animations]]<br />
* [[Arcane University:Nifskope Weapons Setup|Weapons]]<br />
* [[Arcane University:Armors|Armors]] (To come)<br />
* [[Arcane University:Creatures (Vanilla Skeleton)|Creatures (Vanilla Skeleton)]]<br />
* [[Arcane University:Implementation of Custom Animations|Creatures (Custom Skeleton)]]<br />
* [[Arcane University:Decals|Decals]] (To come)<br />
* [[AU:LOD Model Creation|LOD Model Creation]]<br />
<br />
=== Game Mechanics ===<br />
<br />
* [[Arcane University:Weathers|Weathers]] (To come)<br />
* [https://www.youtube.com/watch?v=kpg14lOGaVo Implementing a Custom Creature Race (Youtube)] <br />
* [https://morroblivion.com/forums/music-and-sound/creature-sfx-implementation-guide Custom Creature Sound Effects (External Link)]<br />
* [[Arcane University:Magic Effects & Spells|Magic Effects & Spells]] (To come)<br />
* [[Arcane University:Perks|Perks]] (To come)<br />
* [[Arcane University:Setting Up an NPC|Setting Up an NPC]] (To come)<br />
* [[Arcane University:NPC Packages|NPC Packages]] (To come—CK Wiki's "Quest Implementation - Intermediate" introduces this for now)<br />
* [[Arcane University:Procedures|Procedures]]<br />
<br />
=== Misc. Other Tutorials ===<br />
<br />
* [https://www.creationkit.com/index.php?title=Category:Getting_Started Getting Started with the Creation Kit (Creation Kit Wiki)]<br />
* [https://www.creationkit.com/index.php?title=Category:Bethesda_Scripting_Tutorial_Series Bethesda Scripting Tutorial Series (Creation Kit Wiki)]<br />
* [http://www.cipscis.com/skyrim/tutorials/beginners.aspx Papyrus for Beginners (External Link)]<br />
* [[AU:Dynamic Book Entries|Dynamic Book Entries]]<br />
* [[AU:Scripting Best Practices|Scripting Best Practices]]<br />
* [[AU:Custom Map Marker Implementation|Custom Map Marker Implementation]]<br />
* [[AU:Masterfile Merging with MergePlugins|Masterfile Merging with MergePlugins]]<br />
* [[AU:Compatible Implementation of Hard Coded Music Types|Compatible Implementation of Hard Coded Music Types]]<br />
* [[AU:World space synchronization|World space synchronization]]<br />
* [[AU:Cross Province Travel|Cross Province Travel]]<br />
<br />
== Test Claims ==<br />
Test Claims used by the Arcane University to give students access to authentic Beyond Skyrim and Third-Party project claims.<br />
<br />
Test claims are, primarily, an exercise. If a student completes the claim and it is of a very high quality, the claim in question may become part of the project. Teachers are allowed and encouraged to use these claims as final exams for students.<br />
<br />
# Any claim can be taken by anyone, at any time by asking the corresponding teacher. <br />
# The claims are used as an exercise. Should a student complete it especially well and with required quality, then the asset may be used for the corresponding project and the student gets the chance to be accepted as a developer.<br />
# Teachers can use claims as "entrance exams" for a project, when the specific project has given consent. <br />
# All claims should be finished within 1 month. They can be dropped at any time with no penalty, and there is no penalty for failing to complete the claim within the given period. The claim can be approached again at a later date if desired.<br />
# If you find yourself hitting a wall with the claim, ask a teacher! Other students may also have useful information. And there is no shame in following #4 and dropping it to move on to something else. The brain needs distance to make sense of the issues it finds.<br />
<br />
The AU's Implementation Test Claims can be found here: [https://trello.com/b/8hMcebPq/test-claims-implementation Implementation Test Claims Trello Board].<br />
<br />
[[Category:Arcane University-Implementation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Writing&diff=4505Arcane University:Writing2022-09-29T07:36:46Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
This is the main page of the Beyond Skyrim Arcane University Writing tutorials. <br />
<br />
== General ==<br />
<br />
[[File:Writingoverview01.png|600px|center|Overview over the areas of game writing]]<br />
=== Purpose ===<br />
A writer needs to have profound knowledge of the mechanisms of the game, the history and lore, and most importantly, the unique feeling and methods of making the player feel richly rewarded by his presence in the game world. Writing is a vast field. It includes the most creative opportunities to shape a new concept of a game. But it is also the most critical step because it can provoke structural difficulties, which are hard to overcome in later stages, especially if those stages are not sufficiently considered before. These include the capabilities of Level Design and Implementation. Those have to be able to realize the scenario and still achieve an interesting and evenly paced game experience. Like all fields of game development, writing must be evaluated by the finished content. Did it help the game? Or did it create issues? But even more than any other field, it is a first big step, setting frames and borders and sketching the world and characters. It can potentially annihilate the opportunities of other departments to work with the given writing if those borders are too tight. On the other side, it can also push other departments into completely new experiences and levels, unleashing their potentials, which is the real intention.<br />
<br />
=== Categories ===<br />
There are different uses for writing when working on games. Also, there are many methods and as many writing styles as there are authors, and all of them are legitimately following their visions. It makes no sense to block ideas, concepts would starve. But before having great ideas, its good to have a decent understanding of how these ideas could be potentially used and how much space is available for them.<br />
<br />
==== World and Plot Drafts, Environmental Writing ==== <br />
<br />
There are the lore texts and world primers, which try to sketch out a world entirely. Those can include the most details and fantasy and give you great inspiration. But sadly, those also often lack the condensed and defined shape of exposition and dialogue that will make it later in the game. Also, they lack the direct tie to the player and his/her current situation in the world, his intrinsic motivation (more about that below).<br />
It can be seen as a general brainstorming, and the more ideas are discussed and combined and filtered, the better. This might even take several years. But ultimately, when the world is far in the implementation process, this lore should be solid and not altered too much, to avoid inconsistencies and reworks in the following departments (Level Design, Implementation and sometimes even the 3d-Design or Concept art, such re-iterations can be avoided by taking decisions together and building workarounds rather than deleting everything since the team also has a responsibility to accomplish the set schedule).<br />
<br />
==== Exposition and Dialogue ====<br />
<br />
This is where it gets interesting. As we will discuss below, games offer only a tiny amount of space to place your info and dialogue. This information has to be chosen very carefully, packed and placed well and include everything relevant, but nothing else. Unlike environmental writing, it cannot contain all details and there has to be a filtering and selection process between the above stage and the “in-game writing”.<br />
<br />
“Why discussing in-game writing deeply when writing is a free, creative and individual process?”<br />
<br />
You will find that there are general limitations that have to be mastered inside the game. Each game has its own ways to bring texts, words, and dialogues to life. These have to follow the general pace of the player’s situation. It should also be the right amount of information, and it should be relevant.<br />
One can find some general rules working with Dialogue and Exposition. You are free to do it your way, but it might be useful advice on what some experienced game writers said. We gathered some condensed excerpts of their speeches for you.<br />
<br />
'''What is Exposition and its general purpose?'''<br />
<br />
Exposition is the direct dialogue that carries the narrative. It should be split into slices to make them digestible most important info at the end of dialogue just one piece of important information at once (per dialogue) the type of information chronologically gathered should follow logical order characters presenting this information should have valid reasons to give them “The general purpose of dialogue is to move the player forward!” -> Dialogue does not offer the space to tell a background story in general.<br />
<br />
'''Common examples of wrong use of Exposition'''<br />
* ''“Let me tell you how our people started in stone age…”'' -> The writer's history encyclopedia issue. '''player reaction''': fall asleep.<br />
<br />
* ''“The evil empire killed all good people…”'' -> The oversimplification issue. '''player reaction''': perceiving an artificial, inorganic and generic the story. <br />
<br />
* ''“Dragons used dirty bombs and nuked our battle mechs with Magicka”'' -> The Publicity-exaggeration issue/ commercial keyword issue. '''player perception''': artificial, un-immersive overcooked story.<br />
<br />
* ''“Once in the days of old, we captured the Mines of Moria, and Whiterun, and….”'' -> The lead level designer showing off random unrelated locations in the game issue. '''player perception''': what bulk of irrelevant information, tired.<br />
<br />
* ''“Oh, and when you go there, gather 20 Goblin skulls for me!”'' -> The Quality department realized the emptiness of contents/tasks before shipping, added random things issue. '''player perception''': it's generic, artificial and impersonal and un-immersive.<br />
<br />
=== The primary Purpose of Exposition === <br />
* What is happening?<br />
* What do I do?<br />
* Where do I have to go next?<br />
<br />
'''must''' - extrinsic motivation, plot-critical info: ''“This Dragon will eat Nirn!”''<br />
<br />
'''should''' - intrinsic character motivation: ''“This dragon killed your father!”''<br />
<br />
'''could''' - additional lore and realism (optionally, if not breaking game flow!): ''“How did we find out that he will destroy Nirn? Well, …”''<br />
<br />
'''should not''' - irrelevant/stopping game flow: ''“Let me tell you about the life cycle of dragons…”''<br />
<br />
=== The secondary purpose of Exposition === <br />
<br />
Adding to environmental writing. Examples:<br />
<br />
* Codex (encyclopedia)<br />
* in-game books (journals, books, scrolls…)<br />
* ambient dialogue (if the Thalmor spy would say something to a guard when you visit him; you could overhear it and go on or stay and listen)<br />
* optional questions (How did you meet character a, character b? -> above, category 3, could)<br />
* environmental storytelling (level design and graphical design, music…)<br />
* auxiliary products (card games etc, not for us)<br />
<br />
=== Working with a complex background story ===<br />
<br />
To avoid getting stuck in details, the only way is to analyze the relevant key pieces of information and to serve them in bite-able chunks where it is necessary.<br />
<br />
'''Example:''' ''"The ancient crown went missing has elven magic. the elven kingdom was west of where you are. it was destroyed by a war with the goblin king."'' -> the player only remembers one last thing in each dialogue.<br />
<br />
=== The strategy of breadcrumb trails ===<br />
<br />
'''What''' (motivation) or: ''know about the crown''<br />
<br />
'''Why''' (connection) or: ''realize there are runes with elven magic''<br />
<br />
'''Where''' (location) or: ''find a scholar who can translate them''<br />
<br />
'''How''' (method of interaction) or: ''read the runes yourself''<br />
<br />
Pitfalls using the Bread Crumb Trail:<br />
<br />
* ''“Maybe the Elves know something!”…'' '''Problem''': The Player has no idea where the next NPC is and how to proceed with the story. Their perception is not: “Wow. this is challenging, I should keep trying…” but rather: “Your game does not work, it is broken and it sucks.” ''“go there and do this”'' -> pack it, so it does not appear as the designers manipulate the player in a certain direction but rather like “you have this choice, and there will be your reward”. (Quest Objectives)<br />
<br />
* ''“Let me tell you a story”…'' '''Problem''': irrelevant information gets ignored and disturbs the game flow. (check the 4 W’s about Motivation and Hook up above for better use)<br />
<br />
* “Red Herrings” Each bit and piece of information is expected to be relevant and important; giving irrelevant information (and having the player remembering it without reward) will make him frustrated. Player perception will not be “Oh, I was stupid to try that and go there.” but rather: “Your Game is broken and it sucks.”<br />
<br />
=== Show, do not tell!=== <br />
(or: how to pack exposition in the game) “Exposition is the bitter pill to swallow information; Characterisation can be the chocolate coating to make it more appealing.”<br />
<br />
==== Speakers Position, Style, and Perception ====<br />
<br />
Framing the Exposition with a believable character -> the information given must be an integral component of the character's own life story.<br />
You should not be able to replace a character by a road sign “bandits this way!” – then, something went horribly wrong!<br />
<br />
Ask yourself, what would the characters say, if it was themselves?<br />
Consider topics of their environment, daily life, and social group, plus their unique character.<br />
<br />
==== Speakers Messages (Subtext and Analogies) ====<br />
<br />
The '''subtext''' is raised out of the world's background, Plot, Characters, and his/her feelings.<br />
The example below from a scene we all know:<br />
See, why scene 1 is good, and scene 2 feels “off” because of the perception of Han Solo’s Character we all have?<br />
<br />
[[File:WritingSubtext.jpg]]<br />
<br />
==== Analogies ====<br />
Whenever you can package Exposition in an analogy using consistent terms of a world, you can avoid making an “artificial, top-down birds-eye analysis” which would break the immersion of the scene entirely. Also, analogies can be understood subconsciously and quicker and be remembered longer, using metaphors and pictures.<br />
Example:<br />
Do not say “you need to explain to them their feelings” but rather “tell them, this is normal, this is your anger, and this is your happiness.”<br />
It will get one level closer to the reality of the recipient and less meaning is lost in translation between implied message content and the receiver level.<br />
You do not exactly say what you mean, but portray it. making it more impressive and lasting.<br />
<br />
This applies only for non-immediate and non-interactive info; that info should all go in subtext and / or analogies! (obviously “run for your lives!” does not go there as it requires immediate action! 😉 )<br />
<br />
==== About the Characters Stake in the story ====<br />
<br />
What is the personal connection of the Character? What are his feelings regarding the plot and other characters and the environment? Every speaker should have all of these elements:<br />
(The 5 personal ties of a speaker)<br />
<br />
* something they want<br />
* something they need<br />
* something they fear<br />
* something they gain<br />
* something they lose<br />
<br />
And, of course, if possible, every actor should have each different from each other! Some should be the noble part, others the mean ones, some altruistic, some merchants,…<br />
<br />
==== How much Emotion? ====<br />
<br />
Like in music and painting and theater play, it is best to first give a stronger emotion, and later tune it down, the opposite way will get very hard with writing.<br />
“go there.” (how could a voice actor invoke much emotion in this anymore? 😉 )<br />
<br />
==== The Player – NPC relation ====<br />
<br />
Start considering the dialogue from both sides:<br />
* What does the player want to / need to hear (for story progress)?<br />
* What does the NPC want to / would be willing to tell, and what does he/she usually think of?<br />
* ''“A Janitor is more memorable than a commander, because he has a more personal relationship to his environment, and not all of his character is filled by his assigned role.”''<br />
* ''“Characters who are not as we expect them, like a commander who is not a fierce strategist, or a janitor who is actually a warrior, are memorable and noteworthy and have character; but the general dummy characters based on stereotypes are killing the credibility of your story.”''<br />
* The exposition is telling. -> direct dialogue<br />
* The characterization is showing. -> show emotional reactions on events and plot!<br />
<br />
'''Example:'''<br />
You don’t say “he hates the empire” but you find out he was imprisoned and later after a battle that he is in the secret resistance. You can and should split this information over time. And do this for all relevant characters, as space of the game plot allow it. Then you come to the point where the player asks themselves “What else might we know about a character?”. The player will start guessing what kind of person the character is, and most can be left vague, but it will be an interesting actor.<br />
<br />
==== Stereotypes ====<br />
Nobody wants to see stereotypical actors. The blonde cliche women, the idiot boy, the super hulk, …rather do some research on the roles of your actors and their possible background and social relations, but most importantly, besides their official roles and their self-understanding, imagine them as human beings. Credible humans are, in doubt, more convincing than perfectly sketched actors for their “roles” who lack any character. That means, in doubt, give your characters 60% persona and individual character that might even conflict with the role their environment puts them in; and for the remaining 40% try to get a good idea of what role this character players play in their world. Some personas might support their roles, as having chosen them, others might not.<br />
<br />
=== Summary ===<br />
<br />
* Dialogue should be the solution to a player's problem.<br />
* The characters who deliver the dialogue and the way of speaking should be carefully considered<br />
* Try to “get in the head” of the speakers.<br />
* Do it like for a musical, the time horizon of an RPG is similarly short and fluid<br />
* Remember that you have a tiny amount of time to place information in a fluid and dynamic game environment<br />
<br />
== General Workflow ==<br />
<br />
* [[Arcane University:Dialogue Systems for Writers|Dialogue Systems for Writers]]<br />
<br />
== Exposition Writing Tutorials ==<br />
<br />
* https://youtube.com/watch?v=0RzIDj0FGH0<br />
* https://youtube.com/watch?v=3x_i2clIRUM<br />
<br />
== Environmental Writing Tutorials ==<br />
<br />
<br />
== Tool-specific Guidelines and Links ==<br />
<br />
*[[AU:Managing Google Drive|Managing Google Drive]]<br />
<br />
[[Category:Arcane University]][[Category:Arcane University-Writing]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Voice_Acting&diff=4504Arcane University:Voice Acting2022-09-29T07:36:32Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
This is the main page of the Beyond Skyrim Arcane University Voice Acting tutorials. <br />
<br />
== Expectation ==<br />
<br />
A Voice Actor will lend their voice and acting to characters of the game world, making them immersive, believable, and unique. <br><br />
They must be able to provide clear, high quality audio files with minimal to no room echoes and a noise floor of preferably no higher than -60dbFS.<br><br />
A voice actor must also be able to take critique and direction in stride from the Voice Acting lead of the project they're on, and be willing to make modifications to the performance if necessary.<br><br />
To a lesser extent, the VA must also be capable of providing post processing if requested by the lead to ensure appropriate levels and dynamics. This is often done by the team's Audio lead, but it is a useful skill for the Actor.<br />
<br />
== A personal introduction by a teacher ==<br />
=== Introduction ===<br />
Voice acting is one of the most applied-for yet underestimated aspects of being in a mod. This page will endeavor to explain why and give you some clues on what it takes to become a voice actor for Beyond Skyrim. <br><bR><br />
<br />
<b>Details of the Course</b><br><br />
* The foundation of voice acting - Acting <br><br />
* The foundation of a good recording - The Space <br><br />
* The tools of the trade - A guide of VA gear<br><br><br />
<br />
=== First Steps ===<br />
<br />
The most common misunderstanding about voice acting is that people think they will be just doing some impersonations on their cell phones or with a gaming headset mic. But the goal of Beyond Skyrim is to meet or exceed the quality provides by the base game of Skyrim, in an effort to feel like an extension of the world. That quality requires a little more effort and investment. <br><br><br />
<br />
Voice acting is acting. There's no getting around that. If you come from a background of drama, reenactments, or role playing, then you've already got a handle. These and many other things are ideal for learning to put yourself into a character's shoes. Being able to successfully act is your starting point. <br> While getting your acting chops in order, you also have to realize that you are probably not going to get everything perfect in one take. Learning humility and being easy to work with is as valuable as having a voice like Morgan Freeman.<br><br />
<br />
Your investment will not only include the learning and effort, but also: <br> A decent microphone setup (set aside about $300-500 for something good, the sky's the limit if you wanna go above and beyond) <br> Acoustic treatment (to make the room sound less like a bedroom and more like a studio) <br> And a digital audio workstation or DAW (the program you use for recording and manipulating the files). <br><br><br />
<br />
=== Signals! ===<br />
''"Okay! I got a Blue Yeti and"''- <br><br />
No no no... I hope you don't. The Blue Yeti is no longer a viable or affordable option for budget recording. There are several options out there by lesser known companies that sound better and cost less, and for the cost of the Yeti, younger but a few dollars away from a <i>much</i> higher quality setup. <br />
<br>USB mics, by a wide margin, sound like USB mics. They are marketed towards you exactly but have several technical and audible shortcomings that don't hold up to the levels we aspire to portray in Beyond Skyrim. To go into more technical detail on why USB mics should be avoided… They are designed to exist within an affordable price point around what the average streaming or hobbyist consumer can afford, and as a result, the components are as cheaply sourced and manufactured as possible. This means that the design is also the simplest design possible to get the job done, and it doesn't take into account the digital artifacts created by an amplification system and analog-digital converter (ADC) sitting so close to the small electret condenser diaphragm(s). All of this must also be powered by only +5vDC from the USB hub. Now, in order to get more juice to power a more complex and transparent converter, as well as to power the amplification circuitry in the mic, you need a good quality transformer to ramp that power up. But the designers eventually run out of the room. And we get the Blue Yeti.. and the Snowball… and so many other USB mics. <br><br />
And that's just scratching the surface! But you don't need to rent expensive studio time by the hour for this either. I just recommend a decent, low noise XLR microphone and a decent, low noise audio interface. Now as mentioned, you could spend anywhere from $300-500 on this kind of setup and be set for life. It's more than a Yeti but worth it.<br />
<br><br />
Now all this being considered, there are a couple of affordable USB mics out there that are superior in sound to the Yeti and Snowball. More details further inside<br />
<br />
=== Investment! ===<br />
''Ugh, that's so expensive!''<br />
That depends. Do you plan on using your voice for more than just Beyond Skyrim? If so, that's a solid beginner's investment that you can continue to use throughout your entire professional career.<br />
Because we are a volunteer group, there's no pay here. But the experience you get can prepare you for a life of voice over! Myself, I'm an aspiring audio engineer and musician who uses his gear to record local musicians, and my wife is getting into ACX for audiobooks. So I'll be using my equipment a lot, and recommend that you think long and hard before committing to the investment. Because my example price range just covers the basic hardware. The next part introduces something that is likely as important as your equipment choice, if not more so.<br />
===Acoustic Treatment!=== <br />
This is how you make your room sound like a studio and NOT a bedroom. The reason your bedroom (or closet or den or office) sounds "bad" is because of room reflections that create a nasty echo or fluttering noise. These are the sound of your voice, bouncing off of hard surfaces at different strengths and distances away. To combat this, you need acoustic treatment. Acoustic treatment is usually made of some rigid, porous material that will slow down the energy of sound waves and keep them from reflecting in the room. Don't stock up on egg carton foam or anything. You need something thicker and denser. Basically, you need a material that will absorb, or at least reduce the reflections in the room. Preferably down to at LEAST 1,000hz. Your standard egg crate foam stops absorbing frequencies much higher than that. The spiky rigid stuff that sells for dozens of dollars per square foot is… okay. But it's better when placed on something much more full range. I'll link to a few of my favorite tutorials for making sound absorption panels out of either rigid fiberglass insulation (very dangerous), or mineral wool (slightly less dangerous). If you aren't comfortable making these, there are a few other options. You can use the spiky foam stuff, just get it thicker, and mount it with an inch or two distance between it and the wall to maximize their effectiveness. You can also get by with some layers of heavier quilted moving blankets. But as your voice gets louder for things like combat barks or angry dialogue, you'll start noticing more heavy reflections from the lower and middle frequencies of your voice showing up in the recording. ''So this stuff with soundproof my room?'' No, it's for sound treatment. Treatment cuts down on echoes. Soundproofing (or more accurately, sound isolation) is there to eliminate the sound itself from moving in or out of the room. That's incredibly work-intensive and expensive. Don't worry about that unless your noise situation is dire enough to need it. If that is the case and you're pursuing a life dream of voice acting, and you've already got steady work with it, there is a web forum you should go to for designing yourself a custom, isolated vocal booth. Every room is different, every voice is different and each person's needs are different. What works for one person isn't likely to work for another. But it is all based around the same principle and as long as you get familiarized with the hows and whys, you'll be able to set something up that will work for you.<br />
<br />
Each of these sections will go into a cut and dry explanation of what is needed from you personally as a voice actor, and what is recommended for equipment and sound treatment.<br />
<br />
== General Workflow ==<br />
=== Voice Acting & Recording ===<br />
<br />
=== Recording Equipment ===<br />
<br />
=== Mastering ===<br />
For music, you have a choice of quality - 192kbit XWM, or WAV's that have not been re-encoded. There's a huge quality difference between either choice and vanilla music, easily perceptible and borne out by ABX (blind comparison) testing - I had 99.95% confidence results that I could correctly identify each file (100% accuracy). I'll be putting up some comparison files at some point.<br />
<br />
My own ABX testing of the 192kbit XWM vs the WAV's gives results below statistical significance (74% confidence), though obviously this may vary according to your own ears and audio equipment, so the files are there if you want them. If in doubt, just go for the 192kbit XWM's, they are a huge improvement over vanilla and do not use the extra 3GB of space needed for the WAV's.<br />
<br />
The voices only come as one encoding option, 192kbit XWM's - WAV's would both be far too large (25-30GB) and couldn't be packed into .fuz files with lipsync data. Again, ABX testing against the vanilla files gave 99.95% confidence of the perceptible difference between vanilla and the mod. These have been carefully level matched to within 0.2dB of the original vanilla voices - so they will fit fine with any mod-added voices based on vanilla volumes. 1dB is generally regarded as the limit of perceptible volume difference for humans, so any difference should be imperceptible.<br />
<br />
The original Vanilla files are 44.1kHz at 48kbit XWM files. UHDAP's files are 48kHz 192kbit XWM files. WAV Music is lossless PCM conversion from the PS4 AT9 compression (so not re-compressed in any way)<br />
<br />
=== Implementation ===<br />
<br />
== Asset-specific Tutorials ==<br />
<br />
== Tool-specific Guidelines and Links ==<br />
<br />
You can also try to use [[xVASynth]] for generating voice lines close to vanilla voice types.<br />
<br />
[[Category:Arcane University]]<br />
[[Category:CK Audio]]<br />
[[Category:Arcane University-Voice Acting| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Sound_Effects&diff=4503Arcane University:Sound Effects2022-09-29T07:36:22Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
This is the main page of the Beyond Skyrim Arcane University Sound Effects tutorials. <br />
<br />
== Expectation ==<br />
<br />
A sound engineer can create acoustic spheres and ambients, which make the world the player journeys through directly experienceable. <br />
== General Workflow & Format ==<br />
<br />
=== Implementation ===<br />
*The '''Creation Kit''' knows certain sound categories, which are playing according an hierarchy. Higher hierarchy sounds duck (mute or lower volume of) lower hierarchy sounds.<br />
*[[File:Soundcategories.png]]<br />
<br />
In the Creation Kit, you can find these sound objects to work with as implementer:<br />
<br />
* Acoustic Space<br />
* Music Track<br />
* Music Type<br />
* Reverb Parameters<br />
* Sound Category<br />
* Sound Descriptor<br />
* Sound Marker<br />
* Sound Output Model<br />
<br />
see: https://www.creationkit.com/index.php?title=Category:Audio<br />
<br />
=== Mastering the Sound File ===<br />
For music, you have a choice of quality - 192kbit XWM, or WAV's that have not been re-encoded. There's a huge quality difference between either choice and vanilla music, easily perceptible and borne out by ABX (blind comparison) testing - I had 99.95% confidence results that I could correctly identify each file (100% accuracy). I'll be putting up some comparison files at some point.<br />
<br />
My own ABX testing of the 192kbit XWM vs the WAV's gives results below statistical significance (74% confidence), though obviously this may vary according to your own ears and audio equipment, so the files are there if you want them. If in doubt, just go for the 192kbit XWM's, they are a huge improvement over vanilla and do not use the extra 3GB of space needed for the WAV's.<br />
<br />
The voices only come as one encoding option, 192kbit XWM's - WAV's would both be far too large (25-30GB) and couldn't be packed into .fuz files with lipsync data. Again, ABX testing against the vanilla files gave 99.95% confidence of perceptible difference between vanilla and the mod. These have been carefully level matched to within 0.2dB of the original vanilla voices - so they will fit fine with any mod-added voices based on vanilla volumes. 1dB is generally regarded as the limit of perceptible volume difference for humans, so any difference should be imperceptible.<br />
<br />
The original Vanilla files are 44.1kHz at 48kbit XWM files. UHDAP's files are 48kHz 192kbit XWM files. WAV Music is lossless PCM conversion from the PS4 AT9 compression (so not re-compressed in any way)<br />
<br />
== Asset-specific Tutorials ==<br />
<br />
== Tool-specific Guidelines and Links ==<br />
<br />
* https://www.sononym.net/<br />
* https://www.audacity.de/<br />
* https://www.musicradar.com/news/the-bbc-is-letting-you-download-more-than-16000-free-sound-effect-samples-from-its-archive<br />
* https://sonniss.com/gameaudiogdc18/<br />
<br />
[[Category:Arcane University]]<br />
[[Category:Arcane University-Sound Effects| ]]<br />
[[Category:CK_Audio]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Project_Management&diff=4502Arcane University:Project Management2022-09-29T07:36:10Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
'''Project Management''' requires both [[wikipedia:skill#hard skill|hard skills]] and [[wikipedia:soft skills|soft skills]]. Hard skills include file management and team organization. The soft skills, which are arguably the more important, include facilitating good communication and resolving conflicts. These are vital for our community projects to achieve a quality level comparable to professional projects, which have monetary funding and local physical presence. Our big and diverse community can make up for these disadvantages of being non-commercial and working remotely from each other with our dedication, time investment, and passion. The goal of project management is to make sure that individual team members are able to reach their highest potential.<br />
<br />
== General Ideas ==<br />
<br />
== Team Management ==<br />
Conflicts should be reduced to topic level, and never be promoted to a personal level. (add all that theory here later)<br />
<br />
== Project Management ==<br />
* Milestones<br />
* Planning<br />
* Tools (excel, Trello, Miro etc)<br />
<br />
== File Management ==<br />
<br />
=== Cleaning and Merging with xEdit ===<br />
<br />
=== Version Control ===<br />
<br />
=== LOD Generation ===<br />
{{main|[[AU:LOD Generation|LOD Generation]]}}<br />
LOD generation is typically something that is done by users. However, because our projects create entirely new worldspaces, we must provide an initial LOD for the "vanilla" experience. This process can be done a number of ways using Creation Kit, xLODGen, and DynDOLOD, but we recommend using xLODGen to generate terrain, and DynDOLOD for objects.<br />
[[Category:Arcane University-Project Management| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Music_Composition&diff=4501Arcane University:Music Composition2022-09-29T07:36:01Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
This is the main page of the Beyond Skyrim Arcane University Music Composition tutorials. <br />
<br />
== Expectation ==<br />
<br />
A composer can create an acoustic reference to lore and environment and deepen the player's perception of the world they encounter. <br />
<br />
== General terminology and description of sounds ==<br />
<br />
See [[Arcane University:Audio Basics]]<br />
<br />
== General Workflow & Format ==<br />
=== Implementation ===<br />
==== Discovery Sounds ====<br />
We reached to an agreement about the way of implementing discovery sounds (technically a music in CK) for all the BS teams.<br />
All the provinces will have a parent location, stored in BSAssets that will indicate the province.<br />
Every province will implement their discovery music using a keyword system on location, that will be conditioned.<br />
==== Combat Music ====<br />
<br />
The challenge is, not to overwrite vanilla combat tracks OR just overwrite temporarily and not to overwrite other teams playlists.<br />
One method: https://www.creationkit.com/index.php?title=DefaultObjectManager_Script<br />
<br />
=== Mastering ===<br />
For music, you have a choice of quality - 192kbit XWM, or WAV's that have not been re-encoded. There's a huge quality difference between either choice and vanilla music, easily perceptible and borne out by ABX (blind comparison) testing - I had 99.95% confidence results that I could correctly identify each file (100% accuracy). I'll be putting up some comparison files at some point.<br />
<br />
My own ABX testing of the 192kbit XWM vs the WAV's gives results below statistical significance (74% confidence), though obviously this may vary according to your own ears and audio equipment, so the files are there if you want them. If in doubt, just go for the 192kbit XWM's, they are a huge improvement over vanilla and do not use the extra 3GB of space needed for the WAV's.<br />
<br />
The voices only come as one encoding option, 192kbit XWM's - WAV's would both be far too large (25-30GB) and couldn't be packed into .fuz files with lipsync data. Again, ABX testing against the vanilla files gave 99.95% confidence of perceptible difference between vanilla and the mod. These have been carefully level matched to within 0.2dB of the original vanilla voices - so they will fit fine with any mod-added voices based on vanilla volumes. 1dB is generally regarded as the limit of perceptible volume difference for humans, so any difference should be imperceptible.<br />
<br />
The original Vanilla files are 44.1kHz at 48kbit XWM files. UHDAP's files are 48kHz 192kbit XWM files. WAV Music is lossless PCM conversion from the PS4 AT9 compression (so not re-compressed in any way)<br />
<br />
* Source quality 44.1 kHz / 16 bit<br />
* Quality after xwm conversion 160 kbps or 192 kbps<br />
* Peaks at ~0 dB after (a very subtle) limiter processing<br />
* Subtle stereo image expansion per channel where needed<br />
* No prominent mono sounds centered in the stereo field (some exceptions in Chime sounds + other short effects)<br />
* Generous reverb in most cases (for sinking the music into the background). Less reverb in heavy drums f.ex. in battle situations.<br />
<br />
== Asset-specific Tutorials ==<br />
<br />
== Tool-specific Guidelines and Links ==<br />
<br />
[[Category:Arcane University]]<br />
[[Category:CK_Audio]]<br />
[[Category:Arcane University-Music Composition| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Level_Design&diff=4500Arcane University:Level Design2022-09-29T07:35:38Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
This is the main page of the Beyond Skyrim Arcane University Level Design tutorials. Below, important considerations of interior level design and exterior world design are being covered (General Workflow below). <br />
* For creating an entirely new heightmap for a new world, click on [[World Heightmap Creation]].<br />
* For other topics, please add a new page.<br />
<br />
<div class=toclimit-3>__TOC__</div><br />
<br />
==Motivation to Level Design==<br />
<br />
A Level Designer is a person who can create the physical shape of the lands and places where the stories imagined by [[AU:Writing|Writing]] and [[AU:Concept Art|Concept Art]] and team discussion take place. These creations must also be compatible with the [[AU:Music Composition|Music Composition]], they deserve their own [[AU:Sound Effects|Sound Effects]] and they must be compatible to the planned methods of [[AU:Implementation|Implementation]] for the quests and activities later on. There are a few basic questions when working on level design. By answering these appropriately, and having some practice, it is possible to create a beautiful dungeon or world space. This intermediate tutorial is written for people who have built their own first layouts and know the basics but want to achieve more, and it is supposed to point you towards advanced tutorials.<br />
<br />
==General Considerations==<br />
<br />
Level design is the stage between designing the world on paper and implementing the mechanics of it; it is the intermediate step of realizing your vision. As with all sections of development, the criteria of good and bad will be determined by how things as a whole come together and work out. And “works” means from testers/players perception, so it is always helpful to get quickly into the game tests and get third person opinions. The ties between especially the writing – level design – implementation chain are very strong. Bad writing annihilates every chance on good level design (if the level design follows the writing) and obviously the implementation afterward. Also, “bad” level design that does not fit the written story or the implementation makes a splendid player experience impossible. For that reason, good level design needs a basic understanding of the writing and implementation, and early testing by others. In general, the level designer should be in close communication with the responsible writer and implementer, or himself being the same person; and at least another equally (or more) experienced person should check the work and add feedback, suggestions, constructive criticism. This requires a respectful but honest and rational communication. On the process level, it also requires running through stages as a team, like brainstorming, filtering and taking decisions. On sub level, the level design itself also follows a chain of stages. This can be done by either a responsible group or a professional director or department lead who is aware of all details. The optimum would be, if all the department members checked it, everyone knows about the background, and all responsible persons; and after a detailed discussion, a decision can be achieved that convinces everyone and takes inspiration from all suggestions.<br />
<br />
==Generalized Workflow of Level Design==<br />
<br />
The level design workflow follows stages. These could vary from each person, but to give you a general idea, I took a preference:<br />
<br />
===Interior (dungeons) workflow===<br />
<br />
*Concepting Phase (story, the concept of playstyle, enemy stories, type of dungeon)<br />
*Layouting Phase (having a closed layout without holes and getting stuck)<br />
*Basic Cluttering Phase & basic light sources/lighting template raw (adding first objects to get a better impression of the design)<br />
*Test and basic implementation (if the functionality is not yet proven)<br />
*Detailed clutter (going into a certain direction of design after having enough input, repairs and reworks at this point might improve things)<br />
*Encounters, traps, activators (making the interior functional for the test, adding the interactive elements)<br />
*Navmesh, Lighting Template fine-tuning, Sound; load optimization, north-marker, World-Hook Up, Name of the cell, coc marker, Markers etc (adding the full game integration data)<br />
*Extended tests and polishes (expect this to take a lot of time until it feels right)<br />
<br />
===Exterior (world spaces) workflow===<br />
<br />
*Height map<br />
*District layout<br />
*Regional layout<br />
*Basic clutter<br />
*Regional weathers, music<br />
*Interactive elements (as above)<br />
*Detailed clutter<br />
<br />
----<br />
==The Beyond Skyrim Arcane University Level Design Course==<br />
The level design course will go through these general stages of level design in 3 courses for each interior and exterior creation.<br />
<br />
<br />
==First Creative Step: Planning the Design==<br />
Most work happens on a paper with a pencil, or a google doc, or your head (if you know what you are doing, but being able to discuss this with your team always helps). Standing on the brink of creating a new interior for example (but this also applies to exteriors) the first questions you should ask yourself are the following:<br />
<br />
*'''What do I want to portray?'''<br />
**Story, Peoples, Quests, Atmospheres. you need some game environment (we have Skyrim’s) and a world/lore to realize at this point. The main challenge is to find a way to appropriately introduce this topic later to the player, as you need to consider the player’s conception; how they enter and leave a place, how it feels from the first-person view, what relations they could (or cant) build with NPCs in your location; and how immersive that is and so on, you see this is already a heavily writing-connected topic… Most importantly, note that you can only transmit a limited amount of information; so relevance is key.<br />
*'''Who would be inside when the player enters?'''<br />
**“Residence topic” - consider exactly who or what needs to be placed inside and what these encounters require you to do from a level design point of view; if you have a huge monster, for example, having narrow sewers is no option, as the beast would get stuck and this loophole would quickly get exploited by players; which would ultimately break the balance and immersion of your aspired game experience.<br />
*'''Who created that Interior, what was the applied process, which tools have been used?'''<br />
**In your game and your world history, your dungeon is somehow connected to its environment. It was created by certain natural forces, peoples or beasts, and this should be reflected by its composites and its structure. This can greatly aid you in getting forward with a meaningful, realistic and believable design.<br />
*'''What happened to the Interior until then?'''<br />
**This point is logical: before the player arrived, things happened. Make sure you portray these things as part of the environmental storytelling by structures, objects, and damage or intertwining materials (Aging, weather, wars, Dragon attacks…).<br />
*'''What would the basic structure be like?'''<br />
**Some civil engineering and material science and maybe socio-historical economy on small scale here (does it carry its own weight, what kind of material is it, how durable is it, what stretching still makes sense, would the tunnels collide, how much/deep “digging under the earth with elder scrolls lore resources and magic is realistic”?) Make sure that your small village of farmers does not possess a heavily fortified castle exterior unless you really have good reasons for that! As a reminder, you need either decades of rich lords and/or big communities or strong magic to build such structures.<br />
*'''What would I want to show with it?'''<br />
**(feeling, mood, quest event) Your interior should clearly follow a function and a functionality. Make sure that this purpose is followed and the player intuitively can understand that.<br />
*'''How do I connect it with world space / other interiors?'''<br />
**(load doors, connection network or “linear run through”) Consider what you need: a circular path, an expanding labyrinth of instances, an open world or a linear street of dungeons? Think about this carefully because it influences the density of “distribution of content” in your world. Also, obviously ice caves should not be placed in deserts; so check if things fit together, and also consider how much “player convenience” (hidden exit after the boss was killed, shortcuts, etc) you want.<br />
*'''Can I make a sketch and draw it?'''<br />
**The first best thing to do after you have a frame for your story, is to actually sketch the layout with pencil and paper. “think in multiple ways” you can use your haptic impression with the pencil to realise “empty areas” and “choking points” or maybe you can achieve something more organic if you have a blueprint before touching very linear wall segments. Only playing with linear wall segments without a previous thought on an organic layout often leads to a design catastrophe. You want it to be relevant, unique and definitely not too big!<br />
*'''How does it connect to the player’s quests, how could it be interesting to him/her?'''<br />
**You don’t only want your interior to be fitting to the worlds environment and story, but also to have some intrinsic motivation for players to go there. Or something unexpected, or better both. Make sure you have room for that!<br />
*'''Do I use the same materials as in the surrounding exterior or connected interiors? Should I use 2 or more sets?'''<br />
**(cave+mine+imperial fort? Or rather stick to the main idea of the dungeon?) Be careful not to visually “overload” your dungeon with various assets that don’t look very much like they belong together. The visual impact should be scored by an organic unique shape and a (fake) variety of assets along with unexpected and before unseen progression, not a big pit full of various rubble. In fact, monotony if done right can amplify certain aspects of the player’s awareness of the level design.<br />
*'''Where can I place events, ambushes, loot, “safe zones”, hints for the story, encounters, traps, lights, give the player nice detailed Points of Interests or points of sight?'''<br />
**Along with the implementation, this is maybe the most important. If your interior or world space cannot offer spots for what you need to place your gameplay, no matter how beautiful it is, it is useless. Also, remember that it is not very pleasant to enter a dungeon and be attacked immediately. This might cause scenarios where people are kept in the loadscreen and already harassed by enemies and dead by arrival. (depending on game engine and implementation)<br />
<br />
----<br />
<br />
==Basic Rules of Execution ==<br />
You will start with a layout based on your story and immersion factors. You should be familiar with it. <br />
''Example: Bethesda basic tutorial on layouting & cluttering a dungeon, for beginners:'' <br />
* https://www.youtube.com/watch?v=SO-OMWk0mQs&list=PLD5AA9F15CAA68B07&index=3<br />
* https://www.youtube.com/watch?v=p1Twdld0tLc&list=PLD5AA9F15CAA68B07&index=4<br />
* https://www.youtube.com/watch?v=6RzxXWiqb8M&list=PLD5AA9F15CAA68B07&index=5<br />
<br />
Beyond the obvious technical requirements to function as dungeon, there are some important aspects regarding logic and aesthetics of your level: The basic “unwritten rules” that you can follow if you want to avoid a bad impression:<br />
<br />
----<br />
<br />
====Scaling of objects====<br />
Scaling objects under 0.5 will drop fps; scaling objects over 2.0 will look miserable in game. A 1024×1024 texture would practically be reduced by half. Especially objects using vanilla resolution textures will appear super low resolution and break the visual quality level, which should be held consistent during the game to address both optimisation and appeal.<br />
<br />
''Workarounds:'' Sometimes you have to use especially big meshes with low texture resolution to achieve a certain composition of space. There are a few ways how to work with them without making the low resolution too obvious:<br />
*If you can cover the low-resolution texture with other objects, so the low-resolution surface is noticeable.<br />
*If the surface is not seen close up, and you have some distance between the players closest possible position and the object, it is also less noticeable.<br />
*If you have a higher resolution texture than vanilla, the resolution will not be that low.<br />
<br />
On the other hand, regions with a low object count might allow small meshes with higher resolution. Still, it is suggested to test the impacts on the engine and game stability, which you can easily do by checking fps when loading the area and running around there. This is just a general guideline, a checklist for you, if you aim for a high level, and depends on your case of application.<br />
<br />
----<br />
<br />
====Avoid Duplicates====<br />
Better do not get used to duplicates. Try to be original and unique whenever possible. The factor of composition, the combination of things allows for new designs more than you would have thought when doing the first concept sketches or thoughts. This might take time but it is worth it.<br />
<br />
----<br />
<br />
====Avoid dead Space====<br />
Get a dynamic balance in the space; use all spaces, especially heights and ceilings. People who are new to level design often are impressed by the spacial freedom it offers. They create interiors with a big empty hall above the players head. This gives a quit nice impression of spacial dimension, but for a finished game/ mod it has a few downsides that speak against a generous ceiling structure and vast halls:<br />
* Often, it is unrealistic that people would build it that way (economically, statically, storywise).<br />
* It is unrealistic this would stay unharmed over the ages from decay (the aging process would destroy big structures quicker).<br />
* It reduces the tension of a narrow tomb etc (the first person impression will be very limited, certain feelings cannot be achieved anymore).<br />
* It might force you to clutter/redo areas that nobody will use in the game (you will have to cover all the area somehow to make it appear unique).<br />
* It might kill the visual aesthetics in general (it might feel completely out of place compared to the environment).<br />
There are still good reasons for meaningful structures to be huge, but they need good reasons to keep a certain balance of sizes in the design consistent.<br />
<br />
----<br />
<br />
====Avoid boring spaces====<br />
Very close to the above, for example, be careful not to create long hallways with flat, unspecified and generic ceilings.<br />
<br />
----<br />
<br />
====Balance the density of Objects====<br />
Don’t use too few or too many objects; you need to find a balance of amount and density of object placement. The two extreme examples are “an empty floor” and “a full room”. Both would look awkward. At least, the amount of clutter should be balanced and distributed evenly across the area. Try to stay below the suggested object count (see that percentage value at top of render window in CK?) More objects also mean more havoc chaos (unless you add the disablehavokonload script (see next point), the checkbox does not always work) and more does not always mean better. On the other side, more objects allow more expression of layout and design and unique composition. It is a balance between detail and structure.<br />
<br />
----<br />
<br />
====Avoid Havok Chaos of flying and falling objects====<br />
There are two methods to avoid that your assets fly around or fall through the ground. One is the checkbox "disable havoc on load" when you double click on the object reference in the cell view window. The other is to jump to the last tab called scripts in that object reference window and add a script. Search for "disablehavokonload". Once this script is added, double click on it. Now, click on each condition and fill it by default, press okay and you are good.<br />
*[[File:LDHavok1.PNG]]<br />
*[[File:LDHavok2.PNG]]<br />
*[[File:LDHavok3.PNG]]<br />
*[[File:LDHavok4.PNG]]<br />
*[[File:LDHavok5.PNG]]<br />
----<br />
<br />
====Fake Spaces, Choices, and Decay====<br />
Spark the player’s interest and imagination by a non-linear approach that implies that “this dungeon was actually bigger but this way is blocked”<br />
saving you object count and development time and also adding realism and non-linearity. Point out-blocked/hidden areas.<br />
<br />
----<br />
<br />
====Stay non-symmetric and organic (except for places that require it)====<br />
Avoid any linear and symmetrical level design wherever you can (unless you work on cyrodiils palace maybe 😉 )<br />
<br />
----<br />
<br />
====Style Kits don’t like kitbashing between each other====<br />
Use different kits only to a believable extent in the same region/interior; (consistency, not a surrealistic world)<br />
<br />
----<br />
<br />
====Eternal Gravity and Out of Reach====<br />
Check that nothing is “falling under the ground”; (resetting in the center of the cell later on load!)<br />
Also check that nothing is outside of + / – 30.000 units in all x, y and z dimensions, as this can result in issues.<br />
<br />
----<br />
<br />
====Navmesh test with Overlay====<br />
Keep at least always a walking corridor (test with navmesh). Find a good balance between the count of vertices and resolution of your navmesh map.<br />
''Short reminder: This is how Bethesda explained Navmeshing:'' https://www.youtube.com/watch?v=raM9TBZZyQY&list=PLD5AA9F15CAA68B07&index=6.<br />
<br />
----<br />
<br />
====Light Sources====<br />
Make sure you use beams, spotlights, omni-emission light sources and shadow creating light sources as suggested in tutorials. Light might also guide the player through your cave, and can greatly influence the feeling, just like music does. Also, notice that there is an image space dropdown window in the cell view window. The right setting can go a long way in helping to define the proper mood for your interior.<br />
<br />
----<br />
<br />
====Lighting Template====<br />
This is not the light sources and FX, but the cell's “background lighting”. Be very careful when using the lighting templates. If not sure, choose all black, and gradually increase the brightness. This is because the background lighting can come off as unimmersive pretty quickly. Therefore, go with low values; especially if you plan to have realistic light sources.<br />
Reminder: This is how Bethesda explained lighting, one of the most challenging aspects of Level design: https://www.youtube.com/watch?v=5fZoIpKcJ6I&list=PLD5AA9F15CAA68B07&index=10.<br />
<br />
----<br />
<br />
====Loot lists and items====<br />
Consider if the standard containers with standard loot lists fit in or not. In some places, it might be more appropriate to choose different loot lists. For example, if a place is inhabited mostly by Thalmor, then it would not make sense to find regular bandit armor here.<br />
<br />
----<br />
<br />
====Activators & Traps====<br />
Consider player-interactions like lighting a fireplace or climbing a rope/ladder, mushrooms etc. That needs the appropriate space.<br />
Reminder: This is how Bethesda explained to place traps: https://www.youtube.com/watch?v=PN5vCtlxvwk&list=PLD5AA9F15CAA68B07&index=8.<br />
<br />
----<br />
<br />
====Build a Stage for your Encounters / Actors====<br />
Consider your dungeon as a stage for actors who you place later. That means, plan the encounters and patrols and ambushes (like traps and puzzles and collectibles) already at conception stage or layouting stage, to distribute them consistently and make the area/dungeon feel more “smooth and natural”. Avoid enemies facing your player on load, it not only costs fps, they can also get killed on loadscreen, a very demotivating experience and considered "a bug" for most players.<br />
Reminder: this is how Bethesda explained to place encounters: https://www.youtube.com/watch?v=TAih_jr233I&list=PLD5AA9F15CAA68B07&index=7.<br />
<br />
----<br />
<br />
====Optimisation====<br />
Load room borders, occlusion planes, check unrequired objects, remove stuff from the conception phase and clean up carefully;<br />
If you have too much to load in an interior, making a second interior is always an option, as there are limits to our beloved CK engine.<br />
Try to remove or replace small scaled objects (high texture density), FX effects where they aren’t needed and objects that are only 30% or less visible (because the rest is outside the surface).<br />
Reminder: This is how Bethesda explained optimization: https://www.youtube.com/watch?v=acfuZiQh83Y&list=PLD5AA9F15CAA68B07&index=9.<br />
<br />
----<br />
<br />
====World consistency & hook-up====<br />
Your interior for obvious reasons should fit to the environment both in scale and in contents, the stone textures should fit to the exterior, and the size of rooms should fit a structure. You can go ahead and duplicate your interior completely with ctrl+c and paste with ctrl+v in exterior, overlaying the load door to check this out, and other things like water level or sky direction (if you add a sky directional marker to the interior).<br />
Reminder: this is the basic world hook-up of your interior into your exterior explained by Bethesda: https://www.youtube.com/watch?v=kTSQaUx5eKY&list=PLD5AA9F15CAA68B07&index=11.<br />
<br />
----<br />
<br />
====Cell Data: Accoustic Space, North Marker, coc-markers, naming conventions, music playlist, location and more====<br />
Use acoustic spaces for different acoustic impressions; Use a north marker to correctly orient the player's map; Use coc markerd or x-marker headings for teleports; Use consistent cell name and hooked up map markers; music playlist, trigger boxes and implementational preparations…<br />
<br />
----<br />
<br />
====Stay open for inspiration, feedback, criticism====<br />
(most importantly) Even after the “duty job is finished”, check all available sources of content -> historical/archeological sources and all available sources of technique like the [https://www.creationkit.com/index.php?title=Main_Page Creation Kit Wiki]. Quality is made by finishing a dungeon, polishing it and going deeply into the thoughts behind it. you will find that, whilst the first stages you have a lot to lose, the last stages are those where you really gain something.So you should estimate to spent more time on the later stages, even though your “duty job” is already done; but at that level it becomes fun and you can actually become creative with tweaking the overall composition as a whole.<br />
<br />
----<br />
<br />
== Downloading and installing the Creation Kit ==<br />
* '''Skyrim Legendary Edition''': To download the Original Creation kit, you will need to download it through steam. To access it you will go to your library under home you will find a drop-down, change this to tools in this list you will find the Creation Kit. You will have to enanle multiple master loads, and an English game file might help against the missing strings error.<br />
* '''Skyrim Special Edition''': To download the SE Creation you will need to download the [https://bethesda.net/en/game/bethesda-launcher Bethesda.net launcher]. After you download the launcher if the CK is not an already visible download, go to all games and scroll down until you find it. Recommendations: Original Creation Kit: All under Skyrim editor.ini in your Skyrim Root Folder: <br />
* Under audio, change <code>bEnableAudio</code> to 0. Changing this makes the Creation Kit crash less. <br />
* Under archive, add this to SResourceArchieveList2: <pre>,Dawnguard.bsa, Dragonborn.bsa, HearthFires.bsa</pre>. Doing this allows the DLC archives to load in the background reducing missing models during dev. <br />
* Under messages, change <code>bBlockMessageBoxes=0</code> to <code>bBlockMessageBoxes=1</code>. Doing this blocks all the errors that pop up when launching the CK. Note that your merging file admin might be unhappy about your esp adding a ton of dirty edits, so at least check these warnings before you hand in your file and try to fix as much as you can!<br />
* '''Special Edition Creation Kit:''' Download [https://www.nexusmods.com/skyrimspecialedition/mods/20061 Creation Kit Fixes]. Downloading this fixes the majority of issues with the Special Edition Creation Kit and includes some enhancements.<br />
<br />
=== Blockout Tools and Illustrative Reference Tools ===<br />
<br />
<br />
==Speed Level Design as Reference==<br />
* (Maverick: Frozen Wasteland) https://www.youtube.com/watch?v=yx-Ow3-SipE<br />
<br />
[[Category:Arcane University-Level Design| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Implementation&diff=4499Arcane University:Implementation2022-09-29T07:35:15Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}{{ImpNav}}<br />
'''Implementation''' is the stage where all resources come together, get married, and finally get polished until the game is "ready enough" for shipment.<br />
It is the most important and diverse task for Skyrim modding.<br />
<br />
If you have never touched the Creation Kit before, you should begin with the Creation Kit Wiki's [https://www.creationkit.com/index.php?title=Category:Getting_Started Getting Started] page. After that, a good entry to implementation is the [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Creating_an_Actor official Bethesda Quest tutorial]. It touches on many aspects of implementation, like quests, scenes, actors, packages and more. However, it is an ''entry''. Going through the tutorial will make you acquainted with the Creation Kit and its systems, and it can serve as a springboard to dive into more complex tasks. Additionally, the Creation Kit Wiki provides many more tutorials that you can take advantage of ([https://www.creationkit.com/index.php?title=Tutorials CK Wiki Tutorials]/[https://www.creationkit.com/index.php?title=Category:Community_Tutorials Community Tutorials]/[https://www.creationkit.com/index.php?title=Video_Tutorials Video Tutorials]).<br />
<br />
== Expectation ==<br />
<br />
Some things you may be doing as an implementer are:<br />
*Creating complex quests, sometimes with branching paths<br />
*Working with the Story manager to create radiant quests<br />
*Creating scenes, where NPCs talk with each other<br />
*Creating NPC packages or schedules<br />
*Creating magic effects or perks<br />
*Working with more complex NIFs<br />
<br />
Fundamental to many of these are the following:<br />
*Being comfortable working with the Papyrus scripting engine<br />
*Being able to troubleshoot when something does not work as intended.<br />
*As part of the former, reading through documentation such as the Creation Kit wiki or other sources.<br />
<br />
It should be noted that, in order to be an implementer, you do not need to be able to do all the aforementioned tasks. Some implementers can have more focused areas, such as creating quests or working with NIFs.<br />
<br />
== Implementation Lesson Plan ==<br />
<br />
=== Quests/Dialogue ===<br />
<br />
* [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Planning_the_Quest Quest Implementation - Basic (Creation Kit Wiki)]<br />
* [https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Packages Quest Implementation - Intermediate (Creation Kit Wiki)]<br />
* [[Arcane University:Dialogue Tips & Tricks|Dialogue Tips & Tricks]] (To come)<br />
* [[Arcane University:Voice Line Implementation|Voice Line Implementation]]<br />
* [[Arcane University:Random Encounters|Random Encounters]] (To come)<br />
* [[Arcane University:World Interactions|World Interactions]]<br />
* [[AU:Seq Guide|Seq Guide]]<br />
<br />
=== 3D/NIF Implementation ===<br />
<br />
<!-- This is just the lesson plan from https://docs.google.com/document/d/1vjiuNeBrRkmIpzNxzV6VgxBM9WgAfiHKwPwOTrmkYWw/edit and doesn't really match the Nif Implementation page --><br />
* [[Arcane University:Static/Havok Objects|Static/Havok Objects]] (To come)<br />
* [[Arcane University:Exporting animated statics using ck-cmd|Animated Objects]] (doors, gates, containers, etc.)<br />
* [http://skyrimmw.weebly.com/skyrim-modding/destructible-object-creation-breakable-stuff-skyrim-modding-tutorial Destructible Objects (external link)]<br />
* [[Arcane University:Grasses|Grasses]]<br />
* [[Arcane University:Tree Animations|Tree Animations]]<br />
* [[Arcane University:Nifskope Weapons Setup|Weapons]]<br />
* [[Arcane University:Armors|Armors]] (To come)<br />
* [[Arcane University:Creatures (Vanilla Skeleton)|Creatures (Vanilla Skeleton)]]<br />
* [[Arcane University:Implementation of Custom Animations|Creatures (Custom Skeleton)]]<br />
* [[Arcane University:Decals|Decals]] (To come)<br />
* [[AU:LOD Model Creation|LOD Model Creation]]<br />
<br />
=== Game Mechanics ===<br />
<br />
* [[Arcane University:Weathers|Weathers]] (To come)<br />
* [https://www.youtube.com/watch?v=kpg14lOGaVo Implementing a Custom Creature Race (Youtube)] <br />
* [https://morroblivion.com/forums/music-and-sound/creature-sfx-implementation-guide Custom Creature Sound Effects (External Link)]<br />
* [[Arcane University:Magic Effects & Spells|Magic Effects & Spells]] (To come)<br />
* [[Arcane University:Perks|Perks]] (To come)<br />
* [[Arcane University:Setting Up an NPC|Setting Up an NPC]] (To come)<br />
* [[Arcane University:NPC Packages|NPC Packages]] (To come—CK Wiki's "Quest Implementation - Intermediate" introduces this for now)<br />
* [[Arcane University:Procedures|Procedures]]<br />
<br />
=== Misc. Other Tutorials ===<br />
<br />
* [https://www.creationkit.com/index.php?title=Category:Getting_Started Getting Started with the Creation Kit (Creation Kit Wiki)]<br />
* [https://www.creationkit.com/index.php?title=Category:Bethesda_Scripting_Tutorial_Series Bethesda Scripting Tutorial Series (Creation Kit Wiki)]<br />
* [http://www.cipscis.com/skyrim/tutorials/beginners.aspx Papyrus for Beginners (External Link)]<br />
* [[AU:Dynamic Book Entries|Dynamic Book Entries]]<br />
* [[AU:Scripting Best Practices|Scripting Best Practices]]<br />
* [[AU:Custom Map Marker Implementation|Custom Map Marker Implementation]]<br />
* [[AU:Masterfile Merging with MergePlugins|Masterfile Merging with MergePlugins]]<br />
* [[AU:Compatible Implementation of Hard Coded Music Types|Compatible Implementation of Hard Coded Music Types]]<br />
* [[AU:World space synchronization|World space synchronization]]<br />
* [[AU:Cross Province Travel|Cross Province Travel]]<br />
<br />
== Test Claims ==<br />
Test Claims used by the Arcane University to give students access to authentic Beyond Skyrim and Third-Party project claims.<br />
<br />
Test claims are, primarily, an exercise. If a student completes the claim and it is of a very high quality, the claim in question may become part of the project. Teachers are allowed and encouraged to use these claims as final exams for students.<br />
<br />
# Any claim can be taken by anyone, at any time by asking the corresponding teacher. <br />
# The claims are used as an exercise. Should a student complete it especially well and with required quality, then the asset may be used for the corresponding project and the student gets the chance to be accepted as a developer.<br />
# Teachers can use claims as "entrance exams" for a project, when the specific project has given consent. <br />
# All claims should be finished within 1 month. They can be dropped at any time with no penalty, and there is no penalty for failing to complete the claim within the given period. The claim can be approached again at a later date if desired.<br />
# If you find yourself hitting a wall with the claim, ask a teacher! Other students may also have useful information. And there is no shame in following #4 and dropping it to move on to something else. The brain needs distance to make sense of the issues it finds.<br />
<br />
The AU's Implementation Test Claims can be found here: [https://trello.com/b/8hMcebPq/test-claims-implementation Implementation Test Claims Trello Board].<br />
<br />
[[Category:Arcane University-Implementation]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Concept_Art&diff=4498Arcane University:Concept Art2022-09-29T07:33:21Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
'''Concept art''' (also called '''2D''' or '''CA''') in game development is used to visually establish the world and everything that goes in it. <br />
<br />
As a Skyrim concept artist you'll usually be given a short prompt from which you'll create concepts and blueprints of various items. These blueprints are brought to life by 3D artists and placed in the world by level designers. In essence, concept art is a mix of invention and visual problem solving!<br />
<br />
== Concept Art Workflow ==<br />
<br />
The concept art workflow is the process of designing an item from start to finish. The workflow may differ depending on your own preference, your art leads preference, and what you are concepting. In general, here is what you do:<br />
#. Read and Understand the Prompt<br />
#. Gather References<br />
#. Sketch your Ideas<br />
#. Review and Revise<br />
#. Turnarounds and Polish<br />
<br />
=== Read and Understand the prompt ===<br />
<br />
Make sure you read and ''understand'' the claim before you start. Read the text ''thoroughly'', and ask your art lead to clarify if anything is unclear.<br />
<br />
<br />
[[File:Concept Art Claim Example.jpg|center|]]<br />
<center>''standard example of a prompt''</center><br />
<br />
<br />
=== Gather References ===<br />
<br />
Contrary to popular belief, the concept artist does not pull a masterpiece out of their ass after brewing on the idea for 24 hours. <br />
You need references. You need inspiration. You need examples of how others have solved the same problem before you. <br />
The project you join may have a style guide and the claim might have references attached. But it doesn't stop there! Gather the provided references and start thinking of ''ideas''. Head on over to your preferred search engine and image search those ideas. '''Find inspiration from real life and other artists.'''<br />
<br />
<br />
[[File:CA References.jpg|700px|center]]<br />
<br />
<br />
The [https://www.metmuseum.org/art/collection Metropolitan Museum of Art] has photographed and uploaded their entire collection online. The Met is a gold mine with real historically accurate references. And more and more museums catalogue historical artefacts by photo-scanning and turning them into 3D objects. [https://sketchfab.com Sketchfab.com] is well worth a visit.<br />
*[https://sketchfab.com/search?features=downloadable&q=malopolska+&sort_by=-relevance&type=models Malopolska Museum scans]<br />
<br />
<br />
Feel free to post your reference board along with your sketches! It can help the teachers give you better feedback.<br />
<br />
=== Thumbnails/Sketches/Silhouettes (Ideations) ===<br />
<br />
'''You got your references, you got your ideas. You're ready to put the pen to paper.'''<br />
<br />
<br />
There are different ways to start a concept. Some do silhouettes (blockouts of major shapes), some do sketches, some do a mix of the two. No matter your technique, you always:<br />
<br />
#. Be creative! This is the stage where you go wild. Try out all manners of crazy shapes and ideas and sizes and proportions. The bigger variation between your designs the better.<br />
#. Draw multiple variations of your ideas - ''minimum 6'', but as many as you want.<br />
#. Zoom out so your designs are small and make sure the silhouettes are distinguishable from each other.<br />
#. Be quick. 10 minutes max on each design. Establish macro shapes. <br />
#. Don’t draw details. Don't finish the concepts. This comes later.<br />
#. Sign your concept with the name of the claim and your name at the very beginning.<br />
#. Use a grey background to begin with; between 55% B and 80% B.<br />
<br />
<br />
[[File:Concept Art Silhouette AU.jpg|700px|center]]<br />
<center>''Thank you Lea @SkinlessBlack for contributing with concept art. For this asset they chose to start with silhouettes.''</center><br />
<br />
<br />
[[File:OrcishCrossbowsCA.jpg|700px|center]]<br />
<center>''Another example of ideations, using both silhouettes and lineart.''</center><br />
<center>''Naariel was restricted with shape exploration, as the general size and shape of the crossbow must fit with the restrictions of the animation in game.''</center><br />
<br />
<br />
The first ideas be rough, but they '''must be''' readable and portray your idea. <br />
Do not add color or render a lightsource at this stage.<br />
Your ideations do not have to be drawn in orthographic view, nor perspective. Draw however you feel comfortable and think '''portrays the shapes accurately!'''<br />
<br />
<center>{{note|'''Once you've come up with ideations, post them for feedback. Please number your designs.'''}}</center><br />
<br />
=== A dance of reviews and revisions (Iterations) ===<br />
<br />
Once you've come up with enough ideas, submit them to the Concept Art discord channel. A teacher will give you feedback ''(as soon as one is available)'' on your design and how you may improve your work. <br />
They may also suggest you read a tutorial or watch a video for your own improvement. ''Self reflection is important. Which designs do you like and why? Do you feel you're following the prompt accurately? Reflect on your own progress.'' <br />
<br />
Once your work has been reviewed you may incorporate the feedback into your concept, and continue refining your design. <br />
<br />
[[File:Iteration.jpg|700px|center]]<br />
<center>''Lea is experimenting with colours and details in the same iteration, so the lead can say “I love the details of 4 but the colours of 1” for example''</center><br />
<br />
<br />
And so begins the cycle where you are continuously making progress towards a finished concept with each revision. Design multiple variations of secondary details and ask for feedback again. <br />
<br />
:For example, One iteration you design variations of ornaments, details, and decorations you need feedback on.<br />
<br />
::Another iteration you come up with a variety of colours and textures you need feedback on. <br />
<br />
:::And so on and so on until you suddenly have a finished concept. It's important to check in with a teacher at every stage so you don't waste your time on a concept that won't work. <br />
<br />
<br />
=== Finishing Your Concept ===<br />
<br />
Clarity is key. '''A 3D artist who doesn't even know what Skyrim is must be able to look at your sheet and know exactly what to do.''' <br />
<br />
<br />
[[File:Finished Concept Art Sheet.jpg|700px|center]]<br />
<center>''Lea’s finished beetle concept art sheet''</center><br />
<br />
<br />
Accompany your drawn designs with material and texture '''reference images''' and '''written notes'''. How big is it? How does it work? Information that can be portrayed visually should be done so, but you may need to supplement your art with words.<br />
Remember to '''sign your concept art''' with your name. You deserve credit for your work and it'll be easier for the 3D artist to find you if they have any questions. <br />
<br />
<br />
Your finished sheet will most likely need to view the asset from several angles. These are called '''turnarounds'''. What angles you need to draw will depend on what you are concepting. <br />
<br />
<br />
Final Concept Art Sheet Checklist:<br />
#Your name<br />
#Claim name <br />
#[[Arcane_University:2D_definitions#Orthographic_View|Orthographic]] view<br />
#Size measurement<br />
#Notes regarding the design that can't be explained visually<br />
#Material and texture image references<br />
#Optional: Additional orthographic views<br />
#Optional: [[Arcane_University:2D_definitions#Perspective_View|Perspective view]]<br />
#Optional: [[Arcane_University:2D_definitions#Render|Rendered]] view<br />
#Optional: Detail shots and [[Arcane_University:2D_definitions#Designs_/_Patterns|design alphas]]<br />
#Optional: Project logo<br />
<br />
<br />
<center>{{note|Not all assets can be designed and portrayed the same way. Read [[Arcane_University:Concept_Art#Concept_Art_in_Beyond_Skyrim_and_the_Arcane_University|Concept art in the Arcane University]] for more information.}}</center><br />
<br />
==Getting Feedback==<br />
Submit your work for feedback after ''every'' revision. So post your work at at the silhoette/sketch stage, at the refinement stage, at the colour stage and after various revisions. Make sure you apply the feedback you received and ask for feedback ''again'' before continuing to the next stage.<br />
<br />
<br />
'''Being a concept artist means you're part of a team.'''<br />
<br />
Being part of a team means you will receive constructive criticism from your team members and team lead. This can be intimidating or outright discouraging to some, but receiving feedback isn't scary. '''Feedback helps'''. Feedback will guide you towards your final piece and may reveal faults in your knowledge and technique that you didn't know you could improve. Having faults is nothing wrong in and of itself, but they must be addressed if you want to improve as an artist. <br />
<br />
<br />
In the Arcane University (and your future Project), you will be part of a community. Talking with your team members (or fellow students) and helping each other will turn feedback into a network of constructive criticism. It’s not one-sided, it is part of working together, and everyone’s vision is welcome.<br />
<br />
If you have concerns that an individual is attacking your art with malicious intent, please reach out to a teacher, lead, or moderator. However, more often than not it is a mix of a language barrier, cultural differences, and the inability of conveying tone and intent.<br />
<br />
<br />
==No previous art experience?==<br />
<br />
No problem. We recommend you avoid starting with a concept claim and follow these resources instead:<br />
<br />
*[https://drawabox.com/ Drawabox] - RECOMMENDED. Drawabox is perfect for beginners and novices alike, and especially great for folks who use traditional tools. This course will teach you control, perspective, and construction of shapes. Show us your finished lessons in the discord!<br />
*[https://www.ctrlpaint.com/ CTRLpaint.com] is the library of all libraries. He's got all the information you'll ever need, whether for concept art or illustration. <br />
*[https://www.youtube.com/user/FZDSCHOOL FZD] on Youtube is a game concept art industry veteran and art director. He offers the knowledge you'll not find anywhere else. Perfect if you're curious about concept art in a professional aspect and how it fits in the production pipeline. <br />
<br />
<br />
'''Must-read books:''' <br />
*Drawing with the Right side of the Brain ( Betty Edwards) - How to overcome symbol drawing and get into drawing as an adult<br />
*Figure Drawing: Design and Invention (Michael Hampton) - Use Forms to build a human body (good add to the draw a box approach)<br />
*Colour and Light (Gurney) - Understanding Colour and how colour/Light Shadows work<br />
*The Noble Approach (Polson) - Great handbook for scene Setup/ Tricks on eye movement/ presentation and simplification<br />
<br />
<br />
'''Looking for more? We have a whole collection of recommended libraries and tutorials you should check out on [[Arcane University: Concept Art Theory and Tutorials]]'''<br />
<br />
Keep us updated on your work and check in regularly to see if you are ready for a claim.<br />
<br />
==Materials and Equipment==<br />
<br />
<br />
===Recommended software===<br />
It is recommended you finalize your concepts in a digital art program.<br />
There’s plenty of software out there you can use and new ones are being brought out constantly. You should consider doing your own research on this subject if you are unsure. However here are our recommendations:<br />
<br />
Free: Krita or GIMP<br />
<br />
Paid: Photoshop (Subscription) or Clip Paint Studio (One off Purchase)<br />
<br />
<br />
Another program that could be useful is [https://github.com/niftools/nifskope/releases/tag/v2.0.dev7 Nifskope]. This allows you to view in game items from Skyrim without loading up the game and using console codes. This will be used as part of your reference gathering phase, or to make sure that f.ex. a weapon you're designing has the correct proportions.<br />
<br />
===Recommended Hardware===<br />
You should consider doing your own research as the market constantly changes. But when drawing digitally you need a tablet and pen. <br />
Get a cheap tablet for your first one - it only needs pressure sensitivity. Common brands are: XP-Pen, Huion, Wacom, Ugee. <br />
<br />
A tablet with a screen will not make you a better artist. It all comes down to personal preferences. A graphics tablet without a screen can help with ergonomics (you sit straight, the monitor is further away), while a screen can easily force you to hunch over it (bad posture, eyes closer to the screen).<br />
<br />
Other popular digital drawing tools are the iPad Pro and Surface Pro.<br />
<br />
===Traditional Tools===<br />
Concept art does not have to be done digitally - traditional tools can do the job as long as your concept reads well. However, achieving these results are harder to do with traditional tools, and revisions take a lot more work. You will need the proper tools regardless of medium. <br />
Pencils, fine liner, colors and a ruler is the most basic equipment for traditional concept art.<br />
<br />
==Concept Art in Beyond Skyrim and the Arcane University==<br />
Most Skyrim projects works on a '''claim''' basis - meaning they have a variety of assets to choose from that needs to be designed. You choose which asset you want to design - and the assignment is often called a claim. Most projects use Trello to keep track of claims, however others use Excel or other means.<br />
<br />
<br />
===Claim Types===<br />
Not all claims can be designed and presented the same way and they are often subject to different expectations. Click on these links for further information on how to do a claim type.<br />
<br />
*[[Arcane_University:Architecture_(2D)|Architecture]]<br />
*[[Arcane_University:Armour/Clothing_(2D)|Armour/Clothing]]<br />
*[[Arcane_University:Clutter_(2D)|Clutter]]<br />
*[[Arcane_University:Furniture_2D|Furniture]]<br />
*[[Arcane_University:Flora_(2D)|Flora]]<br />
*[[Arcane_University:Fauna_(2D)|Fauna]]<br />
*[[Arcane_University:Tilesets_(2D)|Tilesets]]<br />
*[[Arcane_University:Weapons_(2D)|Weapons]]<br />
<br />
<br />
===Test Claims===<br />
The ''Test Claim Board'' in the Arcane University is used to give students access to authentic Beyond Skyrim and Third-Party project claims. <br />
Test claims are, primarily, an exercise. If a student completes the claim and it is of a very high quality, the claim in question can become part of the project. Teachers are allowed and encouraged to use these claims as final exams for students.<br />
<br />
For more information regarding this system, please see the #test-claim-board on the [https://discord.gg/VWh7k7x6wz Arcane University Discord] server.<br />
<br />
<br />
===Arcane Roles===<br />
The Arcane University may grant special [https://wiki.beyondskyrim.org/wiki/Arcane_University:Arcane_Roles Arcane Roles] to Students in order to display and honour their hard work, enthusiasm to learn and progression of skills.<br />
<br />
==Concept Art Tips and Tricks==<br />
*Use a '''grey background''' for your concepts. It provides a neutral background for the viewer to accurately perceive the highlights, shadows, and colours of your concept. Do not use a pure white or colored background. The grey should be between 55% B and 80% B. (Once your concept is finished you may switch the grey out for a parchment background for a higher cool factor)<br />
*Your canvas size should be approx 3000x3000px in 300 dpi. <br />
*Learn how real things work. <br />
*Screw how real things work! <br />
*Use references for everything. Yes, '''everything'''. <br />
*Sometimes you may work on something that is outside your comfort zone. Prioritize the concept over your own interests and influences (f.ex. if you're designing a lion, don't concept an elephant). <br />
*There is no shame in giving up a claim. You're doing this for fun and if your concept isn't giving you joy, consider giving it up for a different one. (Try to not do this too often though). <br />
#Number your designs.<br />
*Experiment with shapes: use circular shapes on 1 design variation, square shapes on another and triangles on another for example. <br />
*'''Zoom out regularly'''.<br />
*Harmonize your shapes - don't throw triangles and circles and squares at random into your design.<br />
*"I'm sorry, I don't understand. Could you please explain?" is a valid response. <br />
<br />
<br />
We also strongly suggest you learn a 3D program! Not only is it great to test out proportions quickly by modelling the rough shapes yourself, but by knowing the program and the limitations and the workflow you'll be able to design much better assets for the 3D artist. All the best concept artists also have some experience with 3D.<br />
<br />
<br />
And last but not least: Take care of yourself, your mental health and your body! You ''can'' get injured while drawing - don't make this mistake. [https://floobynooby.blogspot.com/2015/07/animators-guide-to-health-and-wellness.html Read here for more information on taking care of yourself.]<br />
<br />
==See Also==<br />
<br />
*[[Arcane_University:2D_definitions|2D Definitions]] Common terms and phrases in the concept art world. <br />
*[[Arcane_University:Concept_Art_Theory_and_Tutorials|Art Theory and Concept Art Resources, Tutorials and Videos]]<br />
*[[Arcane_University:Architecture_(2D)|Architecture]] Claims<br />
*[[Arcane_University:Armour/Clothing_(2D)|Armour/Clothing]] Claims<br />
*[[Arcane_University:Clutter_(2D)|Clutter]] Claims<br />
*[[Arcane_University:Furniture_2D|Furniture]] Claims<br />
*[[Arcane_University:Flora_(2D)|Flora]] Claims<br />
*[[Arcane_University:Fauna_(2D)|Fauna]] Claims<br />
*[[Arcane_University:Tilesets_(2D)|Tilesets]] Claims<br />
*[[Arcane_University:Weapons_(2D)|Weapons]] Claims<br />
<br />
*[https://www.artstation.com/artwork/YVJ6Y Elements of Design] by Mike Franchina. Shapes, ideations and general concept art stuff. <br />
<br />
----<br />
<br />
<br />
[[Category:Arcane University-Concept Art| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:Animation&diff=4497Arcane University:Animation2022-09-29T07:32:31Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{AUDisciplines}}<br />
'''Animation''' in Skyrim has two sub-categories: character animations, rigged to a creature or npc skeleton; and static animations, like doors and chests. Creating new creature/npc animation files is challenging, but doable. More commonly, an existing animation file is being used on a new skeleton, that has mostly the same bone count and proportions. Static animations are much simpler.<br />
<br />
==Specific Tutorials==<br />
===Character and creature animations===<br />
* [[Arcane_University:Editing Animation Skeletons|Editing Animation Skeletons]]: altering skeletons to fit existing animations to a custom skinned mesh<br />
* [[Arcane University:Implementation of Custom Animations|Implementation of Custom Animations]]: implementing new creatures with wholly custom animations and behaviors<br />
<br />
===Static object animations===<br />
* [[AU:Exporting animated statics using ck-cmd|Exporting animated statics using ck-cmd]]: creating animated statics like doors or containers<br />
<br />
====Videos====<br />
* [https://www.youtube.com/watch?v=4DrN_AS28qk Animating Crash Course - Basic Static Animations in Blender (Youtube)]: creating a basic animated static in Blender, using an armature<br />
* [https://www.youtube.com/watch?v=23-JjWs_nrg Nif Animation - Kettlewitch // AToMM August 2021 (Youtube)]: creating animated statics using only NifSkope<br />
<br />
== General hints ==<br />
* It is not recommended to place a lot of meshes in regions with a lot of movement, like armpits, thighs and so on as glitching (surfaces being visible where they should not) is more common to happen.<br />
* Keep disconnected meshes at a minimum, as it will increase the effort to rig the mesh.<br />
* Cover body parts that have different proportions (Argonian head, Khajit head, human head) to cut work for unique variants.<br />
* Prefer booleans to insert meshes to avoid complex clipping.<br />
* The quality assurance of your work must happen with the animations loaded. Expect that you have to go back and iterate on the movement a few times.<br />
* The left thigh of humans moves more than the right.<br />
<br />
==Information by 3D software==<br />
=== 3DS Max ===<br />
Click here for the main [[Arcane University:3DS Max for Skyrim|3DS Max]] page.<br />
<br />
Here you can see a tutorial of animating a skeleton for FO4, which uses the same engine as Skyrim: https://www.youtube.com/watch?v=p-NkbrmG5po<br />
<br />
=== Maya ===<br />
Click here for the main [[Arcane University:Maya for Skyrim|Maya]] page.<br />
<br />
=== Outfit Studio ===<br />
<br />
Click here for the main [[Arcane University:Outfit Studio for Skyrim|Outfit Studio]] page.<br />
Rigging within Outfit Studio is documented on the page [[AU:Rigging in Outfit Studio|Rigging in Outfit Studio]].<br />
<br />
=== Blender ===<br />
Click here for the main [[Arcane University:Blender for Skyrim|Blender]] page.<br />
Rigging Tools within Blender is documented on these pages:<br />
* [[Arcane University:Rigging with Blender 2.79|Rigging with Blender 2.79]]<br />
* [https://drive.google.com/file/d/1q_mNPVJdQ5udrYYftIaeXv7V1Wk7RFoP/view Rigging Jewelry with Blender 2.79]<br />
<br />
=== Nifskope ===<br />
Click here for the main [[Arcane University:Nifskope for Skyrim|NifSkope]] page.<br />
<br />
* You have to enable each of these boxes in BSDismemberSkinInstance or NiSkinInstance of every skinned mesh:<br />
** Partitions: ''BodyPartList''<br />
*** Part Flag: PF_Editor_Visible, PFStartNetBoneSet ''BSPartFlag''<br />
*** Body Part: SBP_32_Body ''BSDismemberBodyPartType''<br />
<br />
[[Category:Arcane University-Animation| ]]<br />
[[Category:Arcane University-3D Art| ]] [[Category:Arcane University-Method| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Arcane_University:3D_Art&diff=4496Arcane University:3D Art2022-09-29T07:32:06Z<p>Gamma Metroid: disciplines template</p>
<hr />
<div>{{Trail}}{{Template:AUDisciplines}}<br />
A '''3D artist''' can create shapes based on [[AU:Concept Art|concept art]], writing and discussions as well as what is required by the [[Arcane University:Animation|animation]] and [[Arcane University:Implementation|implementation]] teams. For the Gamebryo Engine and the context of Skyrim, a 3D artist must take into account [[Arcane University:Mesh Polycount Comparisons|standard polycounts]] for their low poly 3D models.<br />
<br />
== General Workflow ==<br />
With the [[Arcane University:Concept Art|concept art]] imported into the modelling software, [[Arcane University:Blockout|blockout]] modeling starts. For the '''high-polywork flow''', the 3D artist [[Arcane University:Sculpting|sculpts]] a high-poly mesh. They then [[Arcane University:Baking|bake]] the high-poly details into the normal map of a [https://www.youtube.com/watch?v=X8kQiccJetw retopologized] low-poly version of the mesh, and [[Arcane University:Texturing|add textures]] to this low-poly model. After the asset is [[Arcane University:Mesh Export to NIF|exported to NIF format]], it is given its physical properties such as [[Arcane University:Mesh Collisions|collision and physics]]. It may then be rigged/skinned to bones and [[Arcane University:Animation|animated]], if necessary.<br />
<br />
#[[Arcane University:Blockout|Blockout]]<br />
#[[Arcane University:Sculpting|Sculpting]]<br />
#[https://www.youtube.com/watch?v=X8kQiccJetw Retopology]<br />
#[[Arcane University:UV Unwrapping|UV Unwrapping]]<br />
#[[Arcane University:Baking|Baking]]<br />
#[[Arcane University:Texturing|Texturing]]<br />
#[[Arcane University:Mesh Export to NIF|Mesh Export to NIF]]<br />
#:{{#dpl:<br />
|category = Arcane University-3D Art-Mesh Export to NIF<br />
|shownamespace = false<br />
|nottitlematch = Mesh_Export_to_NIF<br />
}}<br />
#Adding [[Arcane University:Mesh Collisions|Mesh Collisions]]<br />
#[[Arcane University:Animation|Animation]]<br />
<br />
== Skyrim Data Formats ==<br />
Skyrim uses NIFs and DDS file formats to read and render objects in game. That means your mesh must be converted to a NIF and textures to DDS.<br />
* To review the specifics of the NIF data format used for meshes, check [[Arcane_University:NIF_Data_Format|Nif Data Format]].<br />
* To review the specifics of the DDS data format used for textures, check [[Arcane_University:DDS Data Format|DDS Data Format]].<br />
* Software for converting files can be found under [[Arcane_University:3D_Art#Asset_Implementation_Software|Asset Implementation Software]].<br />
<br />
== Asset-specific Tutorials ==<br />
=== Weapons ===<br />
*[[AU:Nifskope Weapons Setup|Nifskope Weapons Setup]]<br />
*[[:File:Tutorial_skyrim_bows_from_3ds.pdf|Rigging bows with 3ds Max and NifSkope (pdf)]] by Artisanix<br />
=== Armor ===<br />
=== Animated Objects ===<br />
*[https://www.youtube.com/watch?v=4DrN_AS28qk Animating Crash Course - Basic Static Animations in Blender (video)] by Hayden Price<br />
*[[AU:Exporting animated statics using ck-cmd|Exporting animated statics using ck-cmd]]<br />
*[[AU:Nifskope Hinge Constraints|Hinge Constraints]]<br />
=== Trees and Plants ===<br />
*[[AU:Flora Workflow|Flora Workflow]]<br />
*[https://www.youtube.com/watch?v=GE0Tm0RBRuc Creating and Texturing Grass (video)] by David Pynkoski (Beyond Skyrim)<br />
=== Tilesets and Architecture ===<br />
*[[:File:Bernstein_Mike_ModularKits3d.pdf|Modularity in Creating 3D Game Environments (pdf)]] by Mike Bernstein<br />
*[http://blog.joelburgess.com/2013/04/skyrims-modular-level-design-gdc-2013.html Skyrim’s Modular Approach to Level Design] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=PhW8CY8XkFg How We Used Iterative Level Design to Ship Skyrim and Fallout 3 (lecture video)] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=QBAM27YbKZg Fallout 4's Modular Level Design (lecture video)] by Joel Burgess (Bethesda)<br />
*[https://www.youtube.com/watch?v=sx9H2MW-sTs How to Create Tilesets (lecture video)] by Zix (Skywind)<br />
*[https://www.youtube.com/watch?v=zfPwxTmx73w Snapping Tutorial (video)] by Zix (Skywind)<br />
<br />
=== LOD Objects ===<br />
*[[AU:LOD Model Creation|LOD Model Creation]]<br />
*[https://morroblivion.com/forums/3d-models-and-textures/guideline-for-lod-model-creation Guideline for LOD model creation (forum thread)] by Grumpycat (Skywind)<br />
<br />
==Basic Software==<br />
As a 3D artist you have to use a variety of software and plugins to achieve the results you want. Below you'll find several alternatives within each category that are suitable for asset creation. You must have a 3D modeling, 3D baking and 3D texturing program in order to create your asset - this is your most basic programs in the unique 3D workflow. <br />
<br />
===3D modelling and sculpting programs===<br />
All 3D artists need a modelling and sculpting program to create the geometry of their asset.<br />
<br />
*[https://www.blender.org Blender] - free, modelling and sculpting. (also read [[AU:Blender for Skyrim|Blender for Skyrim]])<br />
*[https://www.autodesk.com/products/maya/overview Maya] [$] - modelling. (also read [[AU:Maya for Skyrim|Maya for Skyrim]])<br />
*[https://www.autodesk.com/products/3ds-max/overview?term=1-YEAR 3ds Max] [$] - modelling. (also read [[AU:3DS_Max_for_Skyrim|3ds Max for Skyrim]])<br />
*[https://pixologic.com ZBrush] [$] - sculpting. (also read [[AU:Z-Brush for Skyrim|ZBrush for Skyrim]])<br />
*[https://www.autodesk.com/products/mudbox/overview Mudbox] [$] - sculpting. (also read [[Mudbox for Skyrim|Mudbox for Skyrim]])<br />
<br />
===3D baking programs===<br />
You'll want to avoid [[AU:baking|baking]] in Blender, as the results can be slow, prone to errors and inaccurate. <br />
<br />
*[https://xnormal.net xNormal] - free.<br />
<br />
Some texturing programs are also good at baking. See list below for what options offer baking. <br />
<br />
===3D texturing program===<br />
We recommend these programs to texture your asset, as the tools at your disposal are vastly superior to Blender. <br />
<br />
*[https://quixel.com/mixer Quixel Mixer] - free, texturing. <br />
*[https://marmoset.co Marmoset Toolbag] [$] - baking, texturing. <br />
*[https://www.substance3d.com/products/substance-painter/ Substance Painter] [$*] - baking, texturing. Free with Student License. <br />
**[https://www.nexusmods.com/skyrimspecialedition/mods/44400?tab=description Substance Painter Plugin] - free. if you're using Substance Painter, you'll also want to use the PBR to Skyrim plugin.<br />
**[https://www.substance3d.com/products/substance-designer/ Substance Designer] [$*] Create materials with nodes - not for applying texture to an asset, only to create complex materials. Substance Designer is not required use, you can usually create the materials you want in Painter, but it's a powerful program for complex materials.<br />
*[https://www.blender.org/download/ Blender] Blender is not recommended for texturing assets, as all the programs above are ''much'' easier to use and superior in features and results. However, it does exist.<br />
<br />
===2D texturing program===<br />
These programs can be used to manually alter texture maps. These are not mandatory to download, but you might need one at some point. <br />
<br />
*[https://www.gimp.org GIMP] - free (also read [[AU:Gimp for Skyrim|GIMP for Skyrim]])<br />
*[https://affinity.serif.com Affinity] [$]<br />
*[https://www.adobe.com/uk/creativecloud/plans.html?promoid=8JD95GBM&mv=other Adobe Photoshop] [$] - Can be used with NVidia Plugin to convert maps to DDS format. PS: you sign up for yearly subscriptions, paid monthly.<br />
<br />
==Asset Implementation Software==<br />
When you've finished your textures and low poly mesh, they must be converted into Skyrim friendly formats, and implemented into Skyrim. In some of the Partner Projects your work as a 3D artist finishes here, and an asset implementer takes over. However, in most projects you are encouraged to implement your own asset. This is also what we recommend in the Arcane University, as it allows you to see and fix errors in your mesh and textures that's not visible until you see it in game. <br />
<br />
Asset implementation is a big topic, and more complicated assets require a thorough knowledge of NifSkope and Creation Kit. However, something as simple as a bowl can easily be done!<br />
<br />
All programs and plugins from here on out are free. <br />
<br />
===Convert Texture Maps to DDS===<br />
Skyrim uses the [[Arcane_University:DDS_Data_Format|DDS]] file format for all their texture maps. Export your textures in PNG or TGA, prepare your diffuse and other maps, then convert the images to DDS.<br />
<br />
*[https://www.getpaint.net Paint.Net] ''(also read [[Arcane_University:Paint.Net_for_Skyrim|Paint.net for Skyrim]])''<br />
*[https://www.nexusmods.com/skyrimspecialedition/mods/23316 Cathedral Assets Optimizer] converts only TGA to DDS. Allows batch conversion.<br />
*[https://developer.nvidia.com/nvidia-texture-tools-exporter Nvidia Texture Tools Exporter] can be downloaded as standalone program, or as Photoshop plugin. Standalone program allows batch conversion. <br />
*[https://www.gimp.org GIMP] primarily an image manipulation program. Plugin not required (v 2.10.24). Does not support [[Arcane_University:DDS_Data_Format#There_are_tons_of_DXT_codecs.21_Which_should_I_use.3F|DXT10/BC7]] export. Results can be inferior to other DDS export methods.<br />
*[https://github.com/Unity-Technologies/crunch/tree/unity Crunch] is designed for more advanced compression, and is a command-line tool, but it also outputs excellent quality DDS when configured properly.<br />
*[https://gpuopen.com/compressonator/ Compressonator] requires an AMD graphics card, but outputs good quality and has a nice GUI. Also supports command-line use.<br />
<br />
For information regarding the various export settings, and '''how to convert your texture to DDS''', read the [[Arcane_University:DDS_Data_Format|DDS]] page.<br />
<br />
===Convert Mesh to NIF===<br />
{{note|float=right|max-width=35%|Special Edition uses a different nif format from Skyrim/Legendary Edition. However, nearly all Skyrim/LE nifs will work in SSE, and are easier to work with. SSE nifs are also less precise. For this reason, most projects use LE nifs. If you do need to convert either way, you can use [https://www.nexusmods.com/skyrimspecialedition/mods/23316 Cathedral Assets Optimizer] or [https://www.nexusmods.com/skyrimspecialedition/mods/4089 SSE Nif Optimizer].}}<br />
<br />
There are a variety of methods to convert your mesh, including both software-specific plugins, and standalone converters that are software-agnostic:<br />
<br />
*Sofware agnostic:<br />
**[[Arcane_University:CK-CMD_for_Skyrim|CK-CMD]] - can convert both ways between .fbx and nif. Also can handle havok behaviors.<br />
**[[AU:Outfit Studio for Skyrim|Outfit Studio]] - can import .obj or .fbx, and export LE or SSE nifs. Also used skin armor, creatures, or npcs.<br />
*Blender:<br />
**[https://github.com/niftools/blender_niftools_addon Blender Niftools] - For Blender 2.8+, Export/Import tool between Blender and the Nif format. <br />
**[https://github.com/BadDogSkyrim/PyNifly PyNifly] - Export/Import tool between Blender and the Nif format. Supports SSE Meshes<br />
*3ds Max:<br />
**[https://github.com/figment/max_nif_plugin/releases/tag/3.8.0 3DS Max Niftools Addon] - Niftools Addon for 3DS Max. Might not work with versions after 2016<br />
**[https://www.nexusmods.com/skyrim/mods/84041 Apenov 3DS Max Plugin] - Another Plugin for 3DS Max, works with versions up to 2018. Supports some SSE Meshes<br />
<br />
===Add Collision to NIF===<br />
Your mesh needs a collision to become solid in the engine. Read the [[Arcane_University:Mesh_Collisions|collision wiki page]] for details on what program to use.<br />
<br />
*[[Arcane_University:CK-CMD_for_Skyrim|CK-CMD]]<br />
*[https://www.afkmods.com/index.php?/files/file/2398-nifutilssuite/ NifUtilsSuite] (includes ChunkMerge) - Can transfer collision from one nif to another, or convert TriShapes to compressed mesh collision<br />
*[https://wiki.beyondskyrim.org/wiki/File:Chunkmerge_Utils.zip Chunkmerge Utils] - templates for use with ChunkMerge<br />
<br />
===NifSkope===<br />
[https://github.com/niftools/nifskope/releases NifSkope] is a program that allows you to open NIF files, view and alter NIF's properties and contents, and export NIF files into other file formats readable by other programs such as Blender. Nifskope is where you attach your textures to the NIF and specify shader settings for it to appear correctly in game. Nifskope also allows you to browse the Skyrim meshes BSA (archive) without using a BSA unpacker. <br />
<br />
<center>{{note|Nifskope is essential for all asset implementation.}}</center><br />
<br />
===Skyrim and Creation Kit===<br />
To view your asset in game you'll need the game. You can use Skyrim Legendary Edition, or Skyrim Special Edition.<br />
<br />
Depending on which Skyrim you own, you must download the Creation Kit that goes with your version: Creation Kit Legendary Edition, or Creation Kit Special Edition. See [https://www.creationkit.com/index.php?title=Category:Getting_Started Creationkit.com] for more information.<br />
<br />
And finally, if you use Skyrim Special Edition, you'll want to download Creation Kit Fixes to stabilize the program, reduce loadtimes and CTDs. [https://www.nexusmods.com/skyrimspecialedition/mods/20061 SSE Creation Kit Fixes]<br />
<br />
==See Also==<br />
*[[AU:NIF_Data_Format|NIF Data Format]] explains NIFs, the file format Skyrim uses to read meshes<br />
*[[AU:DDS_Data_Format|DDS Data Format]] explains DDSs, the file format Skyrim uses for texture images<br />
*[https://www.twitch.tv/videos/53095530 Start to Finish Game Asset (Video on Twitch)] By Bartalon<br />
'''Modelling'''<br />
*[https://www.youtube.com/watch?v=tTfIo_bezqw How to Model Anything in 3D - Modeling Fundamentals (Youtube)] by FlippedNormals<br />
*[https://www.youtube.com/watch?v=OVbIOHAI3iY 6 key principles for 3D modeling (Youtube)] by CG Cookie<br />
'''Texturing'''<br />
*[https://store.substance3d.com/blog/see-how-team-modders-uses-substance-recreate-skyrim How a Team of Modders Use Substance Painter to Recreate Skyrim] article on Substance Painter blog by Hayden Price<br />
*[https://www.youtube.com/watch?v=5e6zvJqVqlA What is Texel Density and How to Master it (Youtube)] By malcolm341<br />
*[https://www.youtube.com/watch?v=MVsIIkJNkjM What is Texture Padding and How to Master it (Youtube)] By malcolm341<br />
*[https://www.youtube.com/watch?v=DmuHLe6MjEA UDIMs - Modelling and Texturing Essentials (Youtube)] By FlippedNormals<br />
<br />
[[Category:Arcane_University-3D_Art| ]]</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Category:Navigational_boxes&diff=4495Category:Navigational boxes2022-09-29T07:30:21Z<p>Gamma Metroid: Created page with "These templates are used for navigation within the wiki."</p>
<hr />
<div>These templates are used for navigation within the wiki.</div>Gamma Metroidhttps://wiki.beyondskyrim.org/w/index.php?title=Template:AUDisciplines&diff=4494Template:AUDisciplines2022-09-29T07:29:43Z<p>Gamma Metroid: category</p>
<hr />
<div>{| style="border-spacing:0px; padding:0.8em; border:1px solid lightgray; text-align:center; margin:2em; background-color:#444444; float:{{{float|right}}};"<br />
| style="border-spacing:5px; font-size:1.5em; background-color:#555555; padding:1ex"|[[File:AULabel.png|25px|link=AU:Main Page]] '''AU Disciplines'''<br />
|-<br />
| [[Arcane University:3D Art|3D Art]]<br />
|-<br />
| [[Arcane University:Animation|Animation]]<br />
|-<br />
| [[Arcane University:Concept Art|Concept Art]]<br />
|-<br />
| [[Arcane University:Implementation|Implementation]]<br />
|-<br />
| [[Arcane University:Level Design|Level Design]]<br />
|-<br />
| [[Arcane University:Music Composition|Music Composition]]<br />
|-<br />
| [[Arcane University:Project Management|Project Management]]<br />
|-<br />
| [[Arcane University:Sound Effects|Sound Effects]]<br />
|-<br />
| [[Arcane University:Voice Acting|Voice Acting]]<br />
|-<br />
| [[Arcane University:Writing|Writing]]<br />
|}<br />
<noinclude><br />
[[Category:Navigational boxes]]<br />
</noinclude></div>Gamma Metroid