Category Archives: Tutorials

Model conversion to .ase using Blender

HOW TO: Using Blender to Convert models to .ase for import into Unreal Engine.

Step 1:  Download and install the io ase export script into Blender.

Goto: DarklightGames site https://github.com/DarklightGames/io_export_ase and Download the script  (unzip the file).

Installation:

Step 2: Open Blender and Navigate to File Menu > User Preferences (Ctrl Alt U) > Addons tab > Install From File.  Find the file you’ve downloaded, click on the it,

e.g. io_export_ase.py and hit Install From File…

InstallScript

Don’t forget to tick the box (step 2 in the above graphic) then hit Save User Settings (step 3 in the above graphic) and close.

The script in now available under File > Export > Ascii Scene Exporter (.ase)

Now your ready to tailoring your file adding and configuring a extra Light Map UV slot and or a Collision Hull.

Configuring:

To select a file you wish to convert.  File > Import > [select the type of file e.g.] Wavefront .Obj > Navigate to the file > Import OBJ.

Right click on the model to select it and create a material by hitting the New material button, see below.

MaterialSelection

Repeat for the Texture tab, just right of the Material tab > i.e. hit New texture button.

Change Type: from Clouds to Image or Movie. (See below).

Under Image hit the New texture button and select OK on the default texture settings.

TextureSelection

Adding a second UV Slot

(not necessary for export)

1. Hit Tab to change to Edit Mode.

2. Change to the Object data Tab (the triangle icon)

3. Under UV Maps hit the + icon to add a second UV slot (for Light Mapping).

For this slot ensure that the UV islands don’t overlap as required for light mapping.

4. Left click on the corner and drag  to open up a second editor pane.

5. Select UV/ Image Editor from the list of Editors.

UVSelection

UV Unwrapping takes a bit of finesse and time to get used to.  Its a lot like cutting out fabric for sowing into a 3d shape but in reverse.

There are several tutorials that cover  this in higher depth than available here, see Noob to Pro and  Cg Cookie  (vid)

Adding a Collision Hull

(not necessary for export)

Tab to Object Mode then Shift A > Mesh > select the mesh that most fits your model.

Tab into Edit Mode and manipulate your new model to fit around your base model.

Under the Object tab change the header to have a UCX prefix, see graphic below.

CollisionHull

In Object Mode select both base model and collision hull for export by holding down Shift and Right clicking both models.  Now select File Menu > Export > Ascii Scene Exporter (.ase) > Give your model a name, change the scale if need be.

Your model is now ready to import into the Unreal Engine.  If you have problems ensure you have a material and texture set up.  If you have a collision model ensure both models were selected for export.

If your not familiar with Blenders modeling tools fear not, UE3 has a facility to create collision hull automatically.  Just open the Static Mesh Editor and select from the Collision menu. The greater the DOP the more complex the model.  Select the one that fits best.

UE3 collision

1 default Blender unit is 1 Unreal Unit. So to make a box of 256 dimensions in Unreal you can start by setting up a box of 16 blender units, this will translate using the default 16x scaling of Mike Campagnini script, to export a box 256 Unreal Units (16 x 16). This is a convenient scale for working in Blender using the default grid.

Advertisements

Modding for UT3 – Editing and Compiling with uscript: An introduction

Compiling and modifying scripts in UT3

These instructions show how to mod various component of Unreal Tournament III or UE3 game through the use of Unreal’s scripting language uscript. Some simple and easy targets for this sort of operation are:

  • Increasing the damage of a weapon
  • Changing the amount of ammo and or health count of pickups
  • Increasing or decreasing the spawn times of pickups, e.g. for synchronisation purposes or making some items more scarce
  • Replacing the model used in game e.g. customising a health / ammo / power-up (udamage/Beserk/Invis) model

And many more functions, only limited by your imagination and perseverance.

These operations are relatively simple due to the inheritance structure of uscript. Which mean many new users can jump in and get their feet wet, tweaking default properties with little formal understanding of the language or its syntax 🙂

To explore the items available to mod I recommend getting a copy of the latest UT3 ScriptSource on UDN and look through it for scripts that you wish to control.

The property I will demonstrate modding is delaying the spawn time of the Super Health. This mod was used in the level DM-Richter. This was achieved by overriding the default properties of a class.

How to Override Default Properties of a class

Inside the ScriptSource, sift through the folders to:

UT3ScriptSource_1.5\Development\Src\UTGameContent\Classes

Find the file: UTPickupFactory_SuperHealth.uc

To get started modding this script go to:

C:\Users\”UserName”\Documents\My Games\Unreal Tournament 3\UTGame\Src\

Start by adding a folder where your work will be held. In my example I will label the folder “UTPickupFactory_SuperHealth_Delay” as the starting point. (It is customary to label the top level folder as the name of the script to be edited for ease of searching). Beneath that, add a folder named “Classes”. Then create a text file with a .uc extension in this location. By example, UTPickupFactory_SuperHealth_Delay.uc.

i.e. create:

C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Src\UTPickupFactory_SuperHealth_Delay\Classes\UTPickupFactory_SuperHealth_Delay.uc.

Be sure to save the txt file in ANSI format.

In this file UTPickupFactory_SuperHealth.uc I would start by adding the default properties of the .uc file I am seeking to mod taken from the Script Source.  Next I would hone in on the the code one wishes to change.

The folder and file structure should now look like this:

C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Src\UTPickupFactory_SuperHealth_Delay\Classes\UTPickupFactory_SuperHealth_Delay.uc

The entire UTPickupFactory_SuperHealth.uc file: From here I will review the properties I wish to edit.

/**
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
*/
class UTPickupFactory_SuperHealth extends UTHealthPickupFactory;var ParticleSystemComponent Crackle; // the crackling lightning effect that surrounds the keg on spawnsimulated function RespawnEffect()
{
super.RespawnEffect();
Crackle.SetActive(true);
}simulated function SetPickupHidden()
{
Glow.SetFloatParameter('LightStrength',0.0f);
Super.SetPickupHidden();
}simulated function SetPickupVisible()
{
Super.SetPickupVisible();
Glow.SetFloatParameter('LightStrength', 1.0f);
}defaultproperties
{
bSuperHeal=true
bPredictRespawns=true
bIsSuperItem=true
RespawnTime=60.000000
MaxDesireability=2.000000
HealingAmount=100
PickupSound=SoundCue'A_Pickups.Health.Cue.A_Pickups_Health_Super_Cue'Begin Object Name=BaseMeshComp
StaticMesh=StaticMesh'Pickups.Health_Large.Mesh.S_Pickups_Base_Health_Large'
Translation=(Z=-44)
Rotation=(Yaw=16384)
Scale=0.8
End Object
Begin Object Name=HealthPickUpMesh
StaticMesh=StaticMesh'Pickups.Health_Large.Mesh.S_Pickups_Health_Large_Keg'
CullDistance=7000
Materials(0)=Material'Pickups.Health_Large.Materials.M_Pickups_Health_Large_Keg'
End Object
Begin Object Name=ParticleGlow
Template=ParticleSystem'Pickups.Health_Large.Effects.P_Pickups_Base_Health_Glow'
Translation=(Z=-50.0)
SecondsBeforeInactive=1.0f
End Object
Components.Add(ParticleGlow)
Glow=ParticleGlow
Begin Object Name=ParticleCrackle
Template=ParticleSystem'Pickups.Health_Large.Effects.P_Pickups_Base_Health_Spawn'
Translation=(Z=-50.0)
SecondsBeforeInactive=1.0f
End Object
Components.Add(ParticleCrackle)
Crackle=ParticleCrackle
YawRotationRate=16384
bRotatingPickup=true
bHasLocationSpeech=true
LocationSpeech(0)=SoundNodeWave'A_Character_IGMale.BotStatus.A_BotStatus_IGMale_HeadingForTheSuperHealth'
LocationSpeech(1)=SoundNodeWave'A_Character_Jester.BotStatus.A_BotStatus_Jester_HeadingForTheSuperHealth'
LocationSpeech(2)=SoundNodeWave'A_Character_Othello.BotStatus.A_BotStatus_Othello_HeadingForTheSuperHealth'
}

In this case I am changing the RespawnTime from: RespawnTime=60.0 to RespawnTime=90.0 (the variable is in seconds). This will enable it to spawn at the same time as the weapon powerup, creating race conditions for these high value items.

To do this find UTPickupFactory_SuperHealth and create your own custom class using the syntax:

class "name of .uc file you made" extends "name of class your changing";
{
adding the variable you wish to change beneath this, 
enclosing in curly braces
}

So in my example I copy the Default Properties into a text file and change the property I’m after:

i.e.

class UTPickupFactory_SuperHealth_Delay extends UTPickupFactory_SuperHealth;
defaultproperties
{
bSuperHeal=true
bPredictRespawns=true
bIsSuperItem=true
RespawnTime=90.000000
MaxDesireability=2.000000
HealingAmount=100
PickupSound=SoundCue'A_Pickups.Health.Cue.A_Pickups_Health_Super_Cue'
}

Before compile time go to:

C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Config

Edit: UTEditor.ini

In the file just below search for:
[ModPackages]
ModPackageinPath=\UtGame\Src

Add this line.

ModPackages=UTPickupFactory_SuperHealth_Delay

UTPickupFactory_SuperHealth_Delay” Is the name of the top level folder you placed your script in. This tells the compiler where to look when compiling. Save and close this file.

To compile place the make flag on a short cut to UT3.exe
ie “C:\Program Files (x86)\Unreal Tournament 3\Binaries\UT3.exe” make

Now run the short cut!

If all goes well a console will pop up with green out put of the compilation telling if it completed successfully. If so continue. Otherwise carefully go back and check your file names, their paths and syntax are all correct and repeat.

The custom health pickup will be available inside of Generic Browser Pickup Factory Tree. Go ahead and place the actor inside of game.

When publishing this level place the resultant script (UTPickupFactory_SuperHealth_Delay.u) into the /Published/CookedPC/Script Folder. The new script should now be available in game.
Because of the inheritance properties of Uscipt it is easy to create new custom classes that extend (inherit) all the properties of another class. So allowing small and large changes to be made with next to no familiarity of the language, thus giving the novice a toe hold with which to explore the language.

Happy modding.
References:

http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=962 (Override Default Properties?)

http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=963 (Override Properties)