Scout-kun is a lie... right?

[Released] Unreal HD Skins [UT] [227]

For discussion and promotion of Unreal Engine single-player campaigns, mapping projects and total conversions.

Moderators: ividyon, Semfry, zYnthetic

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 04 Oct 2016, 23:39

Remember that the code is executed only when the actors are spawned, so only the if's checking for pickup meshes will pass. Have you read the included mutator.uc?

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 04 Oct 2016, 23:59

Oh, I completely missed mutator.uc! I was writing new code based on imports.uc and slots.txt. I will modify the code right now and see if it works.

Edit: I have been using SpawnNotify for all the code, because it does not seem to cause any lag unlike using the mutator. Will your code work in SpawnNotify?
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 00:26

If the rest of your code worked then it should also work.

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 00:37

Everything now works flawlessly, except the RL1stHD mesh is invisible in-game. The RLPickup mesh appears fine, as does the 3rd person model. Nothing shows up for the 1st person model. The mesh is properly set to RL1stHD in the game, and all the skins are properly set. The model will appear just fine if I change it to RL1st. Maybe something is wrong with the Mesh itself, or the Mesh import code? Here is the updated code:

Code: Select all

//RTNP Rocket Launcher
else if(A.Mesh.Name == 'RLpickup')
{
   if(A.Skin          == none &&
      A.MultiSkins[1] == none &&
      A.MultiSkins[2] == none &&
      A.MultiSkins[3] == none &&
      A.MultiSkins[4] == none &&
      A.MultiSkins[5] == none &&
      A.MultiSkins[6] == none)
   {
      A.Mesh = mesh'HDSkinsMut.RLpickupHD';
      
      if(Inventory(A) != none)
      {
         Inventory(A).PickupViewMesh  = mesh'HDSkinsMut.RLpickupHD';
         Inventory(A).PlayerViewMesh  = mesh'HDSkinsMut.RL1stHD'   ;
         Inventory(A).ThirdPersonMesh = mesh'HDSkinsMut.RL3rdHD'   ;
      }
      
      A.MultiSkins[1] = texture'HDSkins2.HDJRL1st1';
      A.MultiSkins[2] = texture'HDSkins2.HDJRL1st2';
      A.MultiSkins[3] = texture'HDSkins2.HDJRL1st3';
      A.MultiSkins[4] = texture'HDSkins2.HDJRL1st1';
      A.MultiSkins[5] = texture'HDSkins2.HDJRL1st2';
      A.MultiSkins[6] = texture'HDSkins2.JRL1st4';
   }
}

//RTNP CAR
if(A.Mesh.Name == 'CARpickup')
{
   if(A.Skin          == none &&
      A.MultiSkins[1] == none &&
      A.MultiSkins[2] == none &&
      A.MultiSkins[3] == none &&
      A.MultiSkins[4] == none &&
      A.MultiSkins[5] == none)
   {
      A.Mesh = mesh'HDSkinsMut.CARpickupHD';
      
      if(Inventory(A) != none)
      {
         Inventory(A).PickupViewMesh  = mesh'HDSkinsMut.CARpickupHD';
         Inventory(A).PlayerViewMesh  = mesh'HDSkinsMut.CAR1stHD'   ;
         Inventory(A).ThirdPersonMesh = mesh'HDSkinsMut.CAR3rdHD'   ;
      }
      
      A.MultiSkins[1] = texture'HDSkins2.HDJnewcar1';
      A.MultiSkins[2] = texture'HDSkins2.JCar1st0';
      A.MultiSkins[3] = texture'HDSkins2.HDJnewcar3';
      A.MultiSkins[4] = texture'HDSkins2.HDJnewcar2';
      A.MultiSkins[5] = texture'HDSkins2.HDJCAR3rd1';
   }
}

//RTNP Grenade Launcher
else if(A.Mesh.Name == 'GLpickup')
{
   if(A.Skin          == none &&
      A.MultiSkins[1] == none &&
      A.MultiSkins[2] == none &&
      A.MultiSkins[4] == none &&
      A.MultiSkins[5] == none)
   {
      A.Mesh = mesh'HDSkinsMut.GLpickupHD';
      
      if(Inventory(A) != none)
      {
         Inventory(A).PickupViewMesh  = mesh'HDSkinsMut.GLpickupHD';
         Inventory(A).PlayerViewMesh  = mesh'HDSkinsMut.GL1stHD'   ;
         Inventory(A).ThirdPersonMesh = mesh'HDSkinsMut.GL3rdHD'   ;
      }

      A.MultiSkins[1] = texture'HDSkins2.HDJGL1st1';
      A.MultiSkins[2] = texture'HDSkins2.JGL1st2';
      A.MultiSkins[4] = texture'HDSkins2.HDJGL1st4';
      A.MultiSkins[5] = texture'HDSkins2.HDJGL3rd1';
   }
}
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 02:01

Code: Select all

#exec MESHMAP SCALE MESHMAP=RL1stHD X=0.00 Y=0.01 Z=0.01

Looks like UTPT crappity smacked it down to zero. Replace with this:

Code: Select all

#exec MESHMAP SCALE MESHMAP=RL1stHD X=0.005 Y=0.007 Z=0.01

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 02:15

Thank you for all your help, Yrex! Everything appears to work just fine now. In celebration, here are some screenshots. The Rocket Launcher was one of the toughest models to work with... The original skin was atrocious.

Image

Image
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 02:33

Hey Yrex, I actually just noticed that the positioning is also off for the Grenade Launcher. It appears at a different angle than before. Can you verify all the import codes in case there are any other errors? It would be hard to spot problems with the pickup models or 3rd person models without checking the code. Or, you can explain to me how to check...
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 12:58

Update these:

Code: Select all

#exec MESHMAP SCALE MESHMAP=RL3rdHD X=0.0675 Y=0.0375 Z=0.0675
#exec MESHMAP SCALE MESHMAP=GL1stHD X=0.015 Y=0.009375 Z=0.01875
#exec MESHMAP SCALE MESHMAP=GL3rdHD X=0.0625 Y=0.0625 Z=0.125

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 05 Oct 2016, 18:09

Thanks Yrex, I believe that fixes all the issues!

I did a few tweaks to the Rocket Launcher skin. Leo pointed out that the skin had no shine like the original, so I made it more faithful with this update:

Image
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 08 Oct 2016, 05:04

I've noticed a big issue with Oldskool and the gibs. I don't know why, but when using oldskool, creature chunks are not given the proper skin. For example, the predator head gib code looks like this with SpawnNotify:

Code: Select all

      if(A.Mesh.Name == 'PredatorHead')
         {
         if( A.MultiSkins[1] == None )
            A.MultiSkins[1] = Texture'HDSkins2.HDJGPredator1';
         if( A.MultiSkins[2] == None )
            A.MultiSkins[2] = Texture'HDSkins2.HDJGPredator2';
   }


When I place an actual 'PredatorHead' mesh in the level (using any actor), it works fine. However, when I gib a predator live in-game using OldSkool, the skins are wrong. I used the good ol' EditActor command in-game, and noticed that oldskool replaces the creature chunks with 'OlCreatureChunks', a new actor that I believe makes them stick around permanently. The OlCreatureChunk actor has the correct mesh, 'Upak.PredatorHead'. For whatever reason though, MultiSkins[1] is 'Texture'HDSkins2.HDJGCow1'', and MultiSkins[2] is not set at all. I have no clue why it would set this skin. There are a few meshes using this skin, but 'PredatorHead' is not one of them. The BigChunk1 & BigChunk2 meshes use this skin (also CowBody1-2) , which is replaced in this bit of code:

Code: Select all

      if( A.Mesh == LodMesh'UnrealI.BigChunk1' )
         {
         if( A.MultiSkins[1] == None )
            A.MultiSkins[1] = Texture'HDSkins2.HDJgcow1';
   }


Is it possible that OldSkool is somehow tricking the mutator in to thinking that the mesh is BigChunk1? Perhaps it spawns BigChunk1 first, then switches to the correct mesh like 'PredatorHead'? Here is the OlCreatureChunks code from OldSkool:

Code: Select all

// ============================================================
//The main oldskool package.
//Holds the mutators, singleplayer game, windows, Unreal I models and mappacks.
//olcreaturechunks. more decalz
// ============================================================

class olCreatureChunks expands CreatureChunks;
simulated function HitWall(vector HitNormal, actor Wall)
{
  local float speed, decision;
  local BloodSpurt b;

  Velocity = 0.8 * (Velocity - 2 * HitNormal * (Velocity Dot HitNormal));
  Velocity.Z = FMin(Velocity.Z * 0.8, 700);
  speed = VSize(Velocity);
  if ( speed < 250 )
  {
    if ( trail != None )
    {
      if ( Level.bHighDetailMode && !Level.bDropDetail)
        bUnlit = false;
      trail.Destroy();
      trail = None;
    }
    if ( speed < 120 )
    {
      bBounce = false;
      Disable('HitWall');
    }
  }
  else if ( speed > 350 )
  {
    if ( speed > 700 )
      velocity *= 0.8;
    if (  Level.NetMode != NM_DedicatedServer )
    {
      decision = FRand();
      if ( decision < 0.2 )
        PlaySound(sound 'gibP1');
      else if ( decision < 0.4 )
        PlaySound(sound 'gibP3');
      else if ( decision < 0.6 )
        PlaySound(sound 'gibP4');
      else if ( decision < 0.8 )
        PlaySound(sound 'gibP5');
      else
        PlaySound(sound 'gibP6');
    }
  }
  if (Level.NetMode != NM_DedicatedServer){
    if  (trail == None&& !Level.bDropDetail )
    {
      b = Spawn(class 'Bloodspurt',,,,Rotator(HitNormal));
      if ( bGreenBlood )
        b.GreenBlood();
      b.RemoteRole = ROLE_None;
    }
    if ((!Level.bDropDetail || (FRand() < 0.65)) ){   //from UT
      if (!bGreenBlood)
        Spawn(class'olBloodSplat',,,Location,rotator(HitNormal));
      else
        Spawn(class'GreenBloodSplat',,,Location,rotator(HitNormal));
    }
  }
}
simulated function Landed(vector HitNormal)
{
  local rotator finalRot;
  local BloodSpurt b;

  if ( trail != None )
  {
    if ( Level.bHighDetailMode && !Level.bDropDetail)
      bUnlit = false;
    trail.Destroy();
    trail = None;
  }
  finalRot = Rotation;
  finalRot.Roll = 0;
  finalRot.Pitch = 0;
  setRotation(finalRot);
  if ( Level.NetMode != NM_DedicatedServer && !Level.bDropDetail )
  {
    b = Spawn(class 'Bloodspurt',,,,rot(16384,0,0));
    if ( bGreenBlood )
      b.GreenBlood();   
    b.RemoteRole = ROLE_None;
    if ( !bGreenBlood )
      Spawn(class'olBloodSplat',,,Location,rotator(HitNormal));
    else
      Spawn(class'GreenBloodSplat',,,Location,rotator(HitNormal));
  }
  SetPhysics(PHYS_None);
  SetCollision(true, false, false);
}
function SetAsMaster(Actor Other)  //all
{
  Velocity = Other.Velocity;
  if (carcassclass==class'NaliCarcass'){
  Mesh=LodMesh'UnrealShare.NaliPart';
  TrailSize=0.500000;}
  else if (carcassclass==class'SkaarjCarcass'){
     Mesh=LodMesh'UnrealShare.SkaarjTail';
   TrailSize=0.500000;}
   else if (carcassclass==class'TrooperCarcass'){
   Mesh=None;
   TrailSize=0.500000;}
   else
    CarcLocation = Other.Location;
  CarcassAnim = Other.AnimSequence;
  CarcHeight = Other.CollisionHeight;
}

simulated function ClientExtraChunks(bool bSpawnChunks)
{
  local CreatureChunks carc;
  local bloodpuff Blood;
  local bloodspurt b;
  local int n;

  If ( Level.NetMode == NM_DedicatedServer )
    return;

  bMustSpawnChunks = false;
  b = Spawn(class 'Bloodspurt',,,,rot(16384,0,0));
  if ( bGreenBlood )
    b.GreenBlood();
  b.RemoteRole = ROLE_None;

  if ( !bSpawnChunks || (CarcassClass == None) )
    return;

  n = 1;

  while ( (n<8) && (CarcassClass.Default.bodyparts[n] != none) )
  {
    if ( CarcassClass.Static.AllowChunk(n, CarcassAnim) )
    {
      if ( CarcLocation == vect(0,0,0) ) CarcLocation = Location;
      carc = Spawn(class 'olCreatureChunks',,, CarcLocation
            + CarcassClass.Default.ZOffset[n] * CarcHeight * vect(0,0,1));
      if (carc != None)
      {
        carc.TrailSize = CarcassClass.Default.Trails[n];
        carc.Mesh = CarcassClass.Default.bodyparts[n];
        carc.Initfor(self);
        carc.RemoteRole = ROLE_None;
      }
    }
    n++;
  }

  if ( Level.bHighDetailMode && !bGreenBlood )
  {
    Blood = spawn(class'BloodPuff',,, CarcLocation);
    Blood.drawscale = 0.2 * CollisionRadius;
    Blood.RemoteRole = ROLE_None;
  }
}

state Dead     //permanent.
{
  function BeginState()
  {
    if ( bDecorative ||class'olCreatureCarcass'.default.PermaCarcass){
      lifespan = 0.0;
      bstasis=true;
    }
    else
      SetTimer(5.0, false);
  }
}

defaultproperties
{
}


Note that it is not just the PredatorHead that has this issue (I only used it as an example). Almost all gibs have this issue in Oldskool. If anyone could solve this issue, that would be wonderful. Keeping compatibility with UT oldskool is one of the highest priorities, and this project will not be released with any big issues like this!
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 08 Oct 2016, 14:04

Yeah.

Code: Select all

carc = Spawn(class 'olCreatureChunks',,, CarcLocation
            + CarcassClass.Default.ZOffset[n] * CarcHeight * vect(0,0,1));
if (carc != None)
{
   carc.TrailSize = CarcassClass.Default.Trails[n];
   carc.Mesh = CarcassClass.Default.bodyparts[n];
...


You can work around this by just disabling the mutator for olCreatureChunkses, eg.

Code: Select all

if(A.Class.Name == 'olCreatureChunks')
   return;


But I guess it's not the best solution (from end user's point of view). Fortunately there are other, although hackier ways. There's Tick() and Timer(), where you could iterate over all actors (at this time they should already have proper meshes). But I warn you - it may be slow.

So,

Code: Select all

function PostBeginPlay()
{
   SetTimer(0.1, true);
   Super.PostBeginPlay();
}

function Timer()
{
   local actor A;
   
   foreach AllActors(class'Actor',A)
   {
      if(A.Class.Name == 'olCreatureChunks')
      {
         // do skin replacement here.
      }
   }
}


You could improve the performance by enabling this hack only when olCreatureChunks are detected.

Code: Select all

var bool bHasOldSkool;

simulated event Actor SpawnNotification(Actor A)
{
   ...
   
   if(A.Class.Name == 'olCreatureChunks')
   {
      bHasOldSkool = true;
      return;
   }
   
   ...
}

function Timer()
{
   local actor A;
   
   if(!bHasOldSkool)
      return;
   
   foreach AllActors(class'Actor',A)
   {
      if(A.Class.Name == 'olCreatureChunks')
      {
         ...
      }
   }
}


Also, because you would have gib replacement code in two places (Timer for oldskool and SpawnNotification for other cases) you could separate it out to another function like ReplaceGibs(actor A).

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 08 Oct 2016, 19:43

Hmmm, I see. I will test this out and see if it causes any slowdowns. Another strange thought I just had. What if the mutator disabled olcreaturechunks right off the bat, then re-enabled it? Or, it could re-enable it using all new code. Would that not be technically faster? I have no clue how to write something like that, but maybe use your first bit of code to disable olcreaturechunks, then new code that re-enables it while setting the HDSkins.
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 08 Oct 2016, 21:48

I think you misunderstood what I said. None of my code stops creation of olCreatureChunks. The part
disabling the mutator for olCreatureChunkses
meant just disabling the skin replacement for olCreatureChunks actors.

Otherwise I don't know what you're trying to do now.

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1277
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 08 Oct 2016, 22:50

yrex wrote:meant just disabling the skin replacement for olCreatureChunks actors.


I figured your first solution (not the second) disabled OlCreatureChunks altogether, which would stop permanent gibs. Probably my last post made no sense from a coders perspective I guess. I just thought that OlCreatureChunks did something weird with the skins right off the bat, and that your second solution was to wait 0.1 seconds before running the HDSkin mutator for the gibs (I guess the skins are being changed twice). Like you said, I figured that would cause slowdowns. My (likely incorrect) logic was to disable the OlCreatureChunks mutator like your first solution does, then have the HDSkins Mutator add the skins while re-enabling permanent gibs. That probably doesn't make any sense...
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

yrex
Skaarj Warrior Skaarj Warrior
Posts: 55
Joined: 07 Oct 2015, 11:19

Subject: Re: High-Res Skin Project / Request for Skinners!

Post Posted: 09 Oct 2016, 13:11

Okay, I've just found a better way. Unlike the previous one, it shouldn't cause slowdowns. Although there's a limit of number of gibs getting spawned during one frame.

Code: Select all

var Actor PendingActors[64];
var int   PendingActorsCount;

simulated event Actor SpawnNotification(Actor A)
{
   ...

   if(A.Class.Name == 'olCreatureChunks')
   {
      if(PendingActorsCount<64)
      {
         PendingActors[PendingActorsCount] = A;
         PendingActorsCount++;
      }
      return;
   }

   ...
}

function Tick(float deltaTime)
{
   local int i;
   local actor A;
   
   for(i=0;i<PendingActorsCount;i++)
   {
      A = PendingActors[i];
      
      // Do stuff with A.
   }
   
   PendingActorsCount = 0;
}

Previous Next

Who is online

Users browsing this forum: No registered users and 4 guests