Jump to content
Sign in to follow this  
Eagle114th

SF2 Effects tutorial - Wing vortex

Recommended Posts

Hello everyone!

While working on A-6s and EA-6s series aircraft for SFCE, I just thought of this.  I am going to share techniques I use to inplement the wing vortex and pinpoint the location for it.  That way any modders can get an idea and use it. 

IMPORTANT NOTES:  Any codes after SystemName[032] will not work.  I discovered this limitation.  When creating wing vortex, please note that if any aircraft have a large wing, such as A-6, it would be ideal to either make larger vortex to use less SystemName or experiment an alternative methods.  Personally I think it is impratical to try to implement the wing vortex on A-6s until TK fix this limitation.  I recommend adding wing vortex to any aircraft with smaller wing span, such as F-4s, F-104s, Mirage IIIs, etc.. However, for the sake of tutorial, I will leave this post intact.

A-6A is one of perfect example since it have various shapes from engine intaker to wingtip.

First step - Pinpoint the location

Note: The most useful tools I use is LOD Viewer.  This is Godsent tool.  Without it, it would have taken me probably twice or even more time required for the project.  All hat off to Mue for his masterpieces!  

1) Use LOD Viewer to pinpoint the first location of wing vortex.

TUTORIAL-1

2) Locator - I use light to help me locating where vortex would be.  Here is an example in aircraft data ini file:

[Fuselage]
.
.
.
(BOTTOM of [AircraftData] code)

SystemName[014]=Locator1
SystemName[015]=Locator2
SystemName[016]=Locator3
SystemName[017]=Locator4
SystemName[018]=Locator5
SystemName[019]=Locator6
SystemName[020]=Locator7
SystemName[021]=Locator8
SystemName[022]=Locator9
SystemName[023]=Locator10
SystemName[024]=Locator11
SystemName[025]=Locator12
SystemName[026]=Locator13
SystemName[027]=Locator14
SystemName[028]=Locator15


Then Added this codes:
 

// Wing Vortex ---------------------------------------------------------

[Locator1]
SystemType=LIGHT
Position=-1.0,0.74,0.45
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator2]
SystemType=LIGHT
Position=-1.4,0.27,0.43
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator3]
SystemType=LIGHT
Position=-1.8,-0.20,0.41
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator4]
SystemType=LIGHT
Position=-2.2,-0.75,0.39
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

//--------------------------------

[Locator5]
SystemType=LIGHT
Position=-2.6,-1.0,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator6]
SystemType=LIGHT
Position=-3.0,-1.21,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator7]
SystemType=LIGHT
Position=-3.4,-1.42,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator8]
SystemType=LIGHT
Position=-3.8,-1.63,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator9]
SystemType=LIGHT
Position=-4.2,-1.84,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator10]
SystemType=LIGHT
Position=-4.6,-2.05,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator11]
SystemType=LIGHT
Position=-5.0,-2.26,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator12]
SystemType=LIGHT
Position=-5.4,-2.47,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator13]
SystemType=LIGHT
Position=-5.8,-2.68,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator14]
SystemType=LIGHT
Position=-6.2,-2.89,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE

[Locator15]
SystemType=LIGHT
Position=-6.6,-3.10,0.37
LightSrcOffset=0.0,0.0,0.0
Color=1.0,1.0,1.0
Brightness=0.05
LightSrcRange=50.0
LightRange=10.0
CanFlash=FALSE
MovingLight=TRUE


When running SF2, all light positions are re-adjusted until they match the shape and align with the 'lining' of front edge of wing.  NOTE:  I recommend being above the wing, not 'on surface' of wing.  When you pull high Gs, the wing will sink into the wing. You don't want that.  Instead, you would rather for the wing vortex to be direclty above the wing.

img00088

img00089

img00090

 

3) Save all position information from locator and erase all Locator codes since you no longer need it.  It is better to have clean codes instead of messy in aircraft data ini.  However, now you have saved positions as reference for wing vortex effects.

 

// Wing Vortex ---------------------------------------------------------

// 1 = Position=-1.0,0.74,0.45
// 2 = Position=-1.4,0.27,0.43
// 3 = Position=-1.8,-0.20,0.41
// 4 = Position=-2.2,-0.75,0.39
// 5 = Position=-2.6,-1.0,0.37
// 6 = Position=-3.0,-1.21,0.37
// 7 = Position=-3.4,-1.42,0.37
// 8 = Position=-3.8,-1.63,0.37
// 9 = Position=-4.2,-1.84,0.37
// 10 = Position=-4.6,-2.05,0.37
// 11 = Position=-5.0,-2.26,0.37
// 12 = Position=-5.4,-2.47,0.37
// 13 = Position=-5.8,-2.68,0.37
// 14 = Position=-6.2,-2.89,0.37
// 15 = Position=-6.6,-3.10,0.37
// 16 = Position=-7.0,-3.31,0.37
// 17 = Position=-7.4,-3.52,0.37
// 18 = Position=-7.8,-3.73,0.37
// 19 = Position=-8.2,-3.94,0.37
// 20 = Position=-8.6,-4.15,0.37

4) Prepare effect files for aircraft.  In next version of SFCE, you will see two files in Effects folder:  

AIRCRAFT_A-6_VortexEmitter.ini
VORTEX_A6WingVortex.tga

In AIRCRAFT_A-6_VortexEmitter.ini, you will see this code:
 

[EmitterType001]
Name=A-6VortexEmitter1
EmissionType=POINT_EMITTER
UpdateType=NON_MOVING
MaxVisibleDistance=4000.0
EmissionRate=0.0005
EmissionVolume=0.01,0.01,0.01
EmissionVelocityTableType=CONSTANT
EmissionVelocity=0.0,0.0,0.0
EmissionVelocityDeviation=0.0
ParticleUpdateType=SIMPLE_POINT
ParticleRenderType=SPRITE
ParticleRandomOrientation=TRUE
ParticleLifeTime=0.26
ParticleLifeTimeDeviation=0.25
ParticleWeight=-0.1
ParticleRandomness=0.03
ParticleDragFactor=1.00
ParticleInheritence=1.0
ParticleWindFactor=0.0
ParticleColorTableType=TABLE
ParticleColor[01].Time=0.000000
ParticleColor[01].Value=1.000000,1.000000,1.000000,0.00000
ParticleColor[02].Time=0.500000
ParticleColor[02].Value=1.000000,1.000000,1.000000,0.100000
ParticleColor[03].Time=1.00000
ParticleColor[03].Value=1.000000,1.000000,1.000000,0.00000
ParticleSizeTableType=TABLE
ParticleSize[01].Time=0.000000
ParticleSize[01].Value=0.20
ParticleSize[02].Time=0.500000
ParticleSize[02].Value=0.35
ParticleSize[03].Time=1.000000
ParticleSize[03].Value=0.70
TextureMaterial=A6WingVortexMaterial

.
.
.

//=============================================================================

[A6WingVortexMaterial]
EffectShaderName=effectLightLevel.fx
DepthBufferCheck=TRUE
DepthBufferWrite=FALSE
IgnoreRenderOrder=FALSE
AlphaTestEnabled=FALSE
LightEnabled=FALSE
UseLightLevel=TRUE
SpecularEnabled=FALSE
EmissiveEnabled=FALSE
AmbientColor=1.000000,1.000000,1.000000,1.000000
DiffuseColor=1.000000,1.000000,1.000000,1.000000
ZBufferOffset=0.000000
PriorityLevel=3
BlendOp=BLEND_SRC_ALPHA
NumTextureStages=1
TextureStage[01].TextureName=VORTEX_A6WingVortex.tga
TextureStage[01].MipMap=FALSE
TextureStage[01].FilterEnabled=TRUE
TextureStage[01].StageColorOp=TEXTURE_MODULATE_DIFFUSE
TextureStage[01].StageAlphaOp=TEXTURE_MODULATE_DIFFUSE

5) Prepare your wing vortex codes.

In aircraft data ini, add this code under [AircraftData]:

 

[AircraftData]
.
.
.

(Bottom of [AircraftData] codes)

Component[011]=LeftWingVortex1
Component[012]=LeftWingVortex2
Component[013]=LeftWingVortex3
Component[014]=LeftWingVortex4
Component[015]=LeftWingVortex5
Component[016]=LeftWingVortex6
Component[017]=LeftWingVortex7
Component[018]=LeftWingVortex8
Component[019]=LeftWingVortex9
Component[020]=LeftWingVortex10
Component[021]=LeftWingVortex11
Component[022]=LeftWingVortex12
Component[023]=LeftWingVortex13
Component[024]=LeftWingVortex14
Component[025]=LeftWingVortex15

Now with the reference codes you proved, use it for LeftWingVortexXXX.  Here is an example:
NOTE:  I recommmend you to do one LeftWingVortexXXX a time to test it in-game and adjust it before moving to next one.
 

// Wing Vortex ---------------------------------------------------------

// 1 = Position=-1.0,0.74,0.45
// 2 = Position=-1.4,0.27,0.43
// 3 = Position=-1.8,-0.20,0.41
// 4 = Position=-2.2,-0.75,0.39
// 5 = Position=-2.6,-1.0,0.37
// 6 = Position=-3.0,-1.21,0.37
// 7 = Position=-3.4,-1.42,0.37
// 8 = Position=-3.8,-1.63,0.37
// 9 = Position=-4.2,-1.84,0.37
// 10 = Position=-4.6,-2.05,0.37
// 11 = Position=-5.0,-2.26,0.37
// 12 = Position=-5.4,-2.47,0.37
// 13 = Position=-5.8,-2.68,0.37
// 14 = Position=-6.2,-2.89,0.37
// 15 = Position=-6.6,-3.10,0.37
// 16 = Position=-7.0,-3.31,0.37
// 17 = Position=-7.4,-3.52,0.37
// 18 = Position=-7.8,-3.73,0.37
// 19 = Position=-8.2,-3.94,0.37
// 20 = Position=-8.6,-4.15,0.37

//--------------------------------

[LeftWingVortex1]
ParentComponentName=Fuselage
ModelNodeName=LeftWing
DestroyedNodeName=
ShowFromCockpit=TRUE
DetachWhenDestroyed=False
DamageRating=DISABLED
MassFraction=0.0
HasVortexEmitter=TRUE
VortexEmitterName=A-6VortexEmitter1
VortexPosition=-1.0,0.74,0.45
//VortexG=5.0


Note how I added // to VortexG=5.0.  We don't want to enable that just yet until you perfect your wing vortex.

6) In SF2, it is ideal to change the option (Start in Air, near enemy), so you can be in the air quickly with sufficient airspeed to accelerate and do hard turning for wing vortex effects testing.  Remember when stating that the vortex should be directly above the wing?  You will see it when pulling hard, the vortex would move down and it should touch the surface of wing. 

From there, you keep tweaking both aircraft effect file and the position of it in aircraft data ini.  At first it may seem tendious but it will become a second nature to you. 

img00091

img00092

 

After tweaking and flying several times, the first left wing vortex is now done.

img00093

 

In the code, re-anble VortexG=5.0 by removing '//'.  Now you have a first working wing vortex.  You are ready to move on the next one.   When you finish working with the rest of  LeftWingVortexXXX, doing the RightWIngVortexXXX is not that difficult.  All you have to do is copy the entire LeftWingVortex list and codes, then rename it to RightWingVortex AND remove '-' sign for 'X' position in all vortex position.  Then  you are set!

Hope this tutorial will help anyone who struggle to work with the wing vortex effects.


Eagle114th

Edited by Eagle114th
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..