Jump to content

[Tutorial] Making Real Reflective Gemstones


Saerileth

Recommended Posts

Making Real Reflective Gemstones with the Gemling Queen

http://i.imgur.com/JcksjxZ.png

 

 

Hey there! I'm Saerileth, the author of Gemling Queen Jewelry. If you want to learn how to make real, reflective gems the way I do, then you're in the right place. What you'll need:

  • A 3D modelling software. I use Blender in my demostrations, but you can use anything that gets the job done.
  • Something that lets you import/export .nif files to/from your 3D software of choice.
  • NifSkope

     

I'll assume you have basic knowledge of Blender (or whatever you choose to use) in this guide, so I will gloss over some of the details. All of what you'll need can be easily looked up in the documentation though, I'm mostly self-taught myself - I only started using Blender a few weeks ago. You also need to know your way about NifSkope pretty well, I'll outline the important steps of course, but this is not a beginner's tutorial.

 

Outline

My gemstone replacers use a technique developed by Madcat221. It's inspired by how the vanilla clutter gems (the ones you need for crafting jewelry) are set up. They have a slightly transparent outer layer, and a highly reflective inner layer that "faces outward", so you will see the back of the gem sparkle. Check the screens on my mod page to get an idea for how the end results look.

 

In this tutorial I will show how to set up the transparency with a NiAlphaProperty, how to add a new shape for the inner layer and flip its normals to face outwards. If you know how to do all that, you can skip ahead to the last few steps. I will illustrate the process with the example of modifying a Dawnguard ring mesh (the Ring of the Beast), but there's no reason it wouldn't work for custom jewelry. This approach will work best for faceted gems, but might work for other shapes as well.

 

1. Importing the mesh with Blender

There's this excellent tutorial on how to import/export .nif files with Blender NifScripts. Please read it, if you are not already familiar with it. I will assume that you have all required tools and installed them according to deedes' guide. I tend to do things slightly differently, though, so I will detail my procedure below.

 

Open your mesh (in my case vampirering01gnd.nif) with Nifskope. Make a backup of the original mesh! You do not want to risk accidentally overwriting it, in case you want to restore it. We will now prepare the mesh for use with Blender, i.e. remove any information the NifScipts can't read. Change the User Version and User Version 2 fields according to deedes' tutorial. Pro tip: When you open a file in NifSkope, if you haven clicked into the block list yet the block details will show a list of all nodes, including NiHeader. If you expand it you can change the user versions directly, without having to change the block view.

 

Then expand all the nodes in the block list and delete anything (Ctrl+Del) but the NiTriShapes and their NiTriShapeData (also keep their parent nodes, obviously). We don't need any of the other information stored in the tree, you will see why when we export from Blender again. We are only interested in the geometry of the mesh. The following image shows how my file looks after this step:

http://static-1.nexusmods.com/15/images/110/4522213-1398299139.jpeg

 

Save under a different name, e.g. vampirering01gnd_export.nif and open Blender. Import the mesh using NifScripts. The settings should be pretty much identical to what deedes suggests, but just to be sure here's a screenshot of my settings:

http://static-2.nexusmods.com/15/images/110/4522213-1398299234.jpg

 

 

2. Separating the gem

If your mesh comes with a nicely separated gem, you can skip this step. In my example, the two gems and the ring are all part of one object, so I need to split them first. Enter Edit Mode and select all vertices that belong to the gem. Select Linked (Ctrl+L) might help if the gem isn't connected to the socket, but sometimes you need to do it by hand. In rare cases you might actually have to edit the vertice / subdivide some edges to get it right, I won't get into that now.

 

Once you have the gem parts selected (and nothing else!), hit P and click "Selected" to separate them into a new object.

http://static-2.nexusmods.com/15/images/110/4522213-1398299668.jpg

 

3. Creating the inner layer

Select the gemstone in Object Mode. Navigate to Object->Duplicate (Shift+D) and immediately click the right mouse button - we don't want to move our copy. We do want to scale it down a tiny, tiny bit to avoid z-fighting problems later on (Skyrim doesn't like it when two surfaces are in the exact same location). Careful, if there is more than one gem (as with my example), you can't scale in Object Mode or the center will be off and they will no longer be contained by the outer layer. You'll have to enter Edit Mode and scale each gem individually.

 

Now select all faces of the gems (in Edit Mode, hit A until they are all selected) and use Mesh->Normals->Flip. This will turn our inner layer "inside-out".

 

If you wan't to make any other edits (like improving the detail of the mesh) do it now, before we get to the next step. I like to use the Subsurf modifier, but I won't go into details on how to use it. A note on faceted gemstones: most vanilla meshes use normals maps to create the facets, the mesh itself is smooth (it looks faceted in Blender, but the edges are marked smooth so the engine will blend them together). I prefer to use flat normal maps and a Split Edge modifier.

 

4. Exporting from Blender

Before exporting, make sure you set a material for each object or you will not have normals or UV on the result. There are tutorials around on how to do that, I won't explain it here.

 

Save, select all objects and export to a different file, e.g. vampirering01gnd_import.nif. The settings should be once again fairly standard, but it's very important that you deselect "Smoothen Inter-Object Seams". If left on it will mess up the normals of your gems because the two layers are so close to each other. The Collision options are pretty much obsolete, we won't be using that information anyway.

http://static-4.nexusmods.com/15/images/110/4522213-1398300514.jpg

 

Now you can pretty much disregard anything deedes' tutorial says about Nifskope steps. The file we just exported will not be our final product, simply because I do not trust a tool that was written for Fallout/Oblivion and doesn't even know about Skyrim to get it right. Instead we will just copy the modified NiTriShapeData nodes back into the original file. You do need to restore the user flags to their original values for that to work though, so do that now and save, reopen.

 

Also open the original mesh (if you haven't made a backup already, DO SO NOW!). If you had to cut the mesh apart in Blender to get the gems separated, you may need additional nodes. You will need one NiTriShape node in the original file for every NiTriShape node in the exported file. You can add shapes easily by using Block->Duplicate Branch on any of the existing shapes (doesn't matter which, we will replace their NiTriShapeData anyway). Once you have all the shapes you need, I suggest renaming them so you can easily tell them apart. I like to call my gem layers "gem_outer" and "gem_inner", but whatever suits you is fine.

http://static-3.nexusmods.com/15/images/110/4522213-1398301206.jpg

 

Now select one of these shapes in the original file and delete it's NiTriShapeData block (select it in the Block List and hit Ctrl+Del). Copy the NiTriShapeData block of the corresponding part in the exported file (just the shape data, not the entire shape!) and paste it into the original file. It will move all the way to the bottom of the list, not where you pasted it. That's normal, now we need to tie it to the proper node. Click the NiTriShape where you want the shape data to end up and navigate down to the "Data" field in the Block Details. Note the number your pasted block has been given (see screen), enter this number in the data field and your NiTriShapeData will be linked to the shape. Beware, the number is not always 18 as in my screen! It depends on your mesh.

http://i.imgur.com/SR1bXen.jpg

 

If you moved parts of the mesh around in Object Mode in Blender, you may need to copy over the transformations as well. Right-click on a NiTriShape in the exported file and navigate to Transform->Copy. Select the corresponding shape in the original file and use Transform->Paste.

 

5. Transparency

Now the outer gem layer needs some transparency. Right-click the appropriate NiTriShape ("gem_outer" in my case) and select Node->Attach Property->NiAlphaProperty. Select the freshly created NiAlphaProperty node and change the flags field to 4845.

 

This in itself doesn't do anything yet, it simply enables the alpha channel in the diffuse texture. You now have to set the texture path of the outer gem layer to a texture with some transparency. Texture paths are set in the BSShaderTextureSet node, which is a child of BSLightingShaderProperty. I assume you are familiar with those.

 

You'll have to experiment a bit with how much transparency to use. It greatly depends on the colour and shape of your gem. You can use the same texture for the inner and the outer layer if you'd like, since the inner layer lacks a NiAlphaProperty it will simply ignore the transparency. The inner layer should always stay opaque, Skyrim does not cope well when two transparent things overlap.

 

6. BSLightingShaderProperty Settings

Now that your mesh is set up with the basic geometry, you can tweak certain settings for your gem. Please refer to this excellent guide on what each setting does.

  • Glossiness: Set this too low and you will not get individual facets reflecting, but one large highlight. I use 50 for the outside, 80 inside.

     

  • Specular Colour: I use a muted shade of the gem colour for the inside, gives the stone some more depth. Use white outside or it'll look strange.

     

  • Specular Strength: You'll have to experiment with this, once again depends on the gemstone and the effect you're trying to achieve. I use values between 1.5 and 2.5 on the inside, slightly less on the outside.

     

  • Environment Map Scale: As above, experiment. I like to put a colourful environment map on my gems, especially the inside. It makes the sparkles very lively.

 

One thing of note is that most vanilla gemstones use vertex colours to determine the gem colour. I prefer to have colour controlled by my textures, so I usually turn vertex colours off by removing the SLSF2_Vertex_Colors flag from Shader Flags 2.

 

You should use very subtle normal maps with gemstones, if at all. I always leave the inner layer normals flat, I see no reason to add anything there. On the outside I only put in the occastional scratch at a very, very low offset. If you're modifying a vanilla mesh and added split edges, you should replace the normals with a flat map or you will end up with a concave gem surface.

 

Once you're done, save your mesh (I do hope you have a backup), check it out ingame and tweak some more until you're happy. I hope I didn't forget anything important, feel free to ask if you have any questions. Happy moding!

 

Here's a screen of my (not quite final) Ring of the Beast:

http://i.imgur.com/sqhEtO4.jpg

Edited by Saerileth
Link to comment
Share on other sites

I need to read this more carefully... :/ but i did manage to get one jewel working properly. Might have to sacrifice some effects, i think. Or not. Thanks for it.

Link to comment
Share on other sites

Feel free to ask if there's anything you need help with. The Ring of the Beast I show in the tutorial is actually not that good an example for my technique, as it turnes out it doesn't have enough facets to make the sparkles looks good so I need to do things slightly differently with it. But it should work as I explained with other gems.

 

I'm probably going to put up an addendum on how to make new, realistically cut gems from scratch, but I don't know when I'll have time to write it up.

Link to comment
Share on other sites

  • 3 weeks later...

The inner. The outside needs to face outwards, the inside inwards (so you can see the backside of the inner layer sparkling through the transparent outer layer). You can check if you did this right by opening the finished mesh in NifSkope, selecting the NiTriShapeData nodes, and scrolling down to the "Normals" field in the Block Details window. The preview should now show the normal vectors as little white lines on your mesh, so you can easily see if they face the right direction.

Edited by Saerileth
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...