[Tutorial] How to Import Custom Grass in Oblivion

Where hooms take a shit and we clean it up.

Moderators: Haplo, Lead Developers

Locked
User avatar
Haplo
Lead Developer
Posts: 11651
Joined: Sat Aug 30, 2003 6:22 pm
Location: Celibacy

[Tutorial] How to Import Custom Grass in Oblivion

Post by Haplo »

A tutorial on how to import grass you've modeled yourself into Oblivion.

Part I – General Information

Grass in Oblivion consists of an animated .nif model which is mapped with a realistic looking grass texture. The model is arranged as a number of planes which intersect in a roughly square cross-hatch pattern. The texture is displayed on both sides of each plane with a precise alpha map, which allows for a very fine definition of each blade of grass. Bethesda's existing models are more then adequate for creating custom grass, and they are already animated. Using an existing model is the best choice if you wish to create grass that will blend seamlessly with the original game. A modder needs only to create an original texture and apply it to an appropriate animated grass NIF.

It's is highly recommended that you imitate Bethesda's style to achieve the best results. The shape of the model, and the design of the texture are very important in determining the characteristics of your custom grass. Study how they have arranged their textures, and which models they are assigned to. What is the resolution of the texture? Where are the blades of grass located on the image? How often do blossoms/flowers repeat in the texture? Where are the highlights/shadows placed? Does the texture have a background gradient? All of these factors will influence how your custom grass appears in the game.


Grass mesh and texture examples:

[img]http://img259.imageshack.us/img259/7752/grass15yx.jpg[/img]
[img]http://img444.imageshack.us/img444/8393/grass22ua.jpg[/img]

Part II – Applying Your Texture to an Existing Grass Model

For this stage you will need to use NifSkope in order to easily attach your custom grass texture to an existing Bethesda mesh. Nifskope is much less painful then hex editing when it comes to texture replacement, and its quite straight forward for our purposes.

a) Download and install Nifskope: http://sourceforge.net/project/showfiles.php?group_id=149157&package_id=170735

b) Open Nifskope, click the load button on the top menu bar, and choose the existing model you wish to use for your grass. You will see the grass model load without a texture, but this is normal, and has to do with how Nifskope truncates file paths.

c) On the left side of your Nifskope window you'll see the Block List. This panel displays the structure and contents of the .NIF file. Expand the 'NiNode' by clicking on the cross, and do the same for 'NiTriShape' which appears below. Continue down and do the same for the 'NiTexturingProperty'.

d) You should now see a purple flower icon located next the model's texture path. Click the icon and select your custom texture from the browser window. The new texture should appear on the grass model.

[img]http://img262.imageshack.us/img262/6292/grass38fv.jpg[/img]

e) Save your retextured .NIF under a new name if you haven't done so already.

- Popular OB Wiki Article titled 'NifSkope Alchemy': http://cs.elderscrolls.com/constwiki/index.php/NifSkope_Alchemy

[img]http://img238.imageshack.us/img238/5249/grass44io.jpg[/img]

Part III - Implementing Grass in the Oblivion Construction Set

In Oblivion, grass meshes and landscape textures are dependent on each other. Grass is not placed on the ground manually, as was the case in Morrowind. Each unique landscape texture can be associated with multiple meshes, and this determines how and where grass appears in the game. The first step is creating a new Grass Object.


a) Open the Construction Set and load the appropriate data files.

b) In the Object Window, expand the following directory:

WorldObjects --> Grass --> Plants

c) Right-click in the Editor ID window and select 'New' to create a new Grass Object in the Plants list, or choose 'Edit' and adjust the properties of an existing object.

d) Give your Grass Object a unique ID, and select the 'Add NIF File' button to browse for your retextured grass model. (The button will appear as a file path if you choose 'Edit' in the previous step). Hit 'OK', and click yes to create a new form.

[img]http://img474.imageshack.us/img474/7454/grass50ld.jpg[/img]

The next section will involve associating a landscape texture with your new Grass Object.

a) In the Object Window, expand the following directory:

Miscellaneous --> LandTexture

b) Right-click in the Editor ID window and select 'New' to create a new object in the LandTexture list, or choose 'Edit' and adjust the properties of an existing object. The LandTexture window should now be open.

[img]http://img261.imageshack.us/img261/1371/grass65fp.jpg[/img]

c) Give your LandTexture Object a unique ID, and select the 'Add Image File' button to browse for a custom texture image if you have one. (The button will appear as the texture file name if you choose 'Edit' in the previous step).

The 'Potential Grass' list displays the Grass Objects which are associated with this LandTexture. The Grass Objects in this list will be distributed randomly over terrain covered by this LandTexture. There is no limit in the number which can added, however, it is suggested that you use a maximum of three.

d) Leaving the LandTexture window open, bring up the Grass list in the Object Window.

e) Click and drag your custom Grass Object from the Editor ID list, and drop it in the Potential Grass list in the LandTexture window.

[img]http://img260.imageshack.us/img260/2638/grass80wu.jpg[/img]

f) Make sure the 'Material Type' is set to 'Grass'.

g) Hit 'OK', and click yes to create a new form.

h) Click on the 'Render Window' and hit the 'H' key to bring up the 'Landscape Editing' menu. Select your LandTexture Object from the list and paint it over your exterior cell. When you enter the game, this area should now appear with your custom grass.

i) Save your plug-in and enjoy!

[img]http://img262.imageshack.us/img262/6751/grass90cf.jpg[/img]

Tutorial by Morden
Forum Administrator & Data Files Manager

[06/19/2012 04:15AM] +Cat table stabbing is apparently a really popular sport in morrowind

[August 29, 2014 04:05PM] <+Katze> I am writing an IRC bot! :O
[August 29, 2014 04:25PM] *** Katze has quit IRC: Z-Lined
Locked