Results 1 to 15 of 15
  1. #1

    Default Adding Character

    Hi,
    I am just trying to make my first complete game. So I am not using any of the UT scripts, but the "UDKGame" as parent for my scripts. Abviously there are some things to be done like a HUD and so on, but my primary problem is the character. But i can't find any tutorials that aren't using UT as parent.... I would be awsome if somebody would explain to me how to add a player character. A link to a tutorial would be great, too.

  2. #2
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,634
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UE4 Tutorials
    UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  3. #3
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Default

    Quote Originally Posted by Fragor View Post
    Hi,
    I am just trying to make my first complete game. So I am not using any of the UT scripts, but the "UDKGame" as parent for my scripts. Abviously there are some things to be done like a HUD and so on, but my primary problem is the character. But i can't find any tutorials that aren't using UT as parent.... I would be awsome if somebody would explain to me how to add a player character. A link to a tutorial would be great, too.
    I have done something similar, but not made any tutorials or anything.
    I don't use any part of the UT stuff, modeled, rigged my own lame character model to regular named biped, no uc family stuff, custom animation, custom animtree, implemented AimNode (still bugging on some stuff there), recoded the camera many diff ways including manual offsets,etc .. and made my own weapons classes, everything works.. no ut.

    I'm probably not as good as a tutorial on this, but I'd be glad to help if u have questions.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  4. #4

    Default

    Thank you both for your fast reply! the tutorial actually uses UT stuff, so it is not really that helpfull.
    Big thanks to nurosys for the offer! How would you like to be contacted?

  5. #5
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Default

    I'll subscribe to this thread and if you dont mind we can just post here, that way it can help other learners and people can help us if we get something wrong. Most of my techniques are just that, very 'not the way the book says'.
    I've started a new custom character, hoping to take this one all the way, so I will post the progress and how I'm doing it.
    I just finished the 'base' model I'm mainly concerned with making him work before focusing on looks.
    Also I'm a programmer first, so I get my jollies from seeing them working, then I go back to make them pretty.
    Hes also basic because I want to experiment with making him modular for dismemberment and changeable clothes/gear. Thats why I just painted his clothes on here, later I plan to give models a nude skin, and make all clothing from separate meshes, but for now I will be happy to give him a dirty shirt and get some animations, actions in place and functioning.
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    Next will be to rig him, create a basic animset and animtree, and create his player controller.
    I use nfringe +Vstudio2008 for making the classes and 3dsmax 2012 to model/rig/texture.
    If you want to know something specific are or stuck at a certain issue, just ask and I'll try to find an answer.
    Its lonely trying to do UDK the non UT way, so this should help us all alot, there is always a way even if we have to look at the UT code for hints (i try to avoid that).

    I'll show my progress as I go, it might be more productive to ask how far along you are with your character or which parts you feel uncertain about. If its just how to start, we start to really veer away from UT when we create the player controller, pawn, gameinfo,etc...
    Last edited by neurosys; 03-24-2012 at 05:23 AM.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  6. #6
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Australia
    Posts
    348

    Default

    Could someone tell me the benefit of not extending from UT? It just seems to cause alot of issues for people.

  7. #7
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Default

    Quote Originally Posted by Shindawg View Post
    Could someone tell me the benefit of not extending from UT? It just seems to cause alot of issues for people.
    I prefer to not use UT because I was never familiar with UT modding and scripting until UDK. With UDK I really never wanted to make anything similar to UT, but thats the example they use where another SDK type product might use a more bare example like we are used to. I feel like its a trade off of how I wanted to learn Unreal Engine and more control. I dont want to mimic or mod UT, I want to make something new using their engine and scripting language. UT code is great for an example, but a lot of times the way they did something is not how I would do it, or doesnt fit the gametype. Short run solution is to modify it and for many people that is probably the best way. We still use a lot of Epics structure at the 'extends UDK*' level, but it is less specialized for the most part.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  8. #8
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Australia
    Posts
    348

    Default

    Hmmm I think I see what you're saying. Certainly something for me to think about. Thanks for clearing it up, and sorry for momentarily hijacking the thread!

  9. #9
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Cool Progress On Sam

    I'm trying to hurry along to the coding parts, because I think even if mine aren't the best ways, I believe I've found many of the simplest ways to accomplish similar if not more versatile things.

    I just happened to be starting a new character at the same time I found this post and I thought we could benefit mutually by seeing all the little differences and groundwork a tutorial might cover. I'm trying to skim over the modeling part and I am thankful I am nearly ready to launch up VStudio and get things moving, I rigged him in about 50 minutes, I used to really suck at this but I guess I'm at least getting faster. Well Initial rigging, the bones are in place, I'm confident in this guys scale too because the default biped fit almost perfectly. Now I just have to make a few decisions that will affect how I can use him in engine, firstly whether to use Physique or Skin modifier to fasten the rig to the model. I have used both before, but had more success with Physique and would welcome ANYONES opinion or knowledge on the matter. I'm going to try it with skin and if I cant get it looking right I'll do it with Physique instead, thats how I did it in all the videos I made with custom chars before. I think skin makes it easier to addon clothing meshes. Anyhow here is a few pics, I need to give him at least an Idle animation and walk then I will create my new gametype code, player controller code and pawn code, based from UDK stuff not UT. Pretty simple really, some parts. Other parts I either see in tutorials or figure out from watching ut do it and reading over code posted to forums.

    New_Sam_Base-RigStart.jpg
    New_Sam_Base-RigBodyDone.jpg
    New_Sam_Base-RigBodyDone2.jpg
    New_Sam_Base-RigHandDone.jpg

    Ok, so like 5 hours later, I remember that rigging/skinning is harder that the lining the bones up bit.
    I am not terribly good at this part and it takes me forever to get minimum model ripping apart skinned.
    Dont worry, once we get to coding I wil start to shine :P I plan to hire modelers once I am a zillionaire.
    So I consider Sam yet another in a long line of crash test dummies.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    Now, I make idle loop and walk loop... then to udk ... finally....
    Last edited by neurosys; 03-26-2012 at 08:42 AM.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  10. #10

    Default

    Thank you very much, I am very much looking forward to your little coding tutorial!

  11. #11
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Default

    Quote Originally Posted by Fragor View Post
    Thank you very much, I am very much looking forward to your little coding tutorial!
    Cool, I'm glad you are into it. I'm gonna stay motivated and this will become my first ever tutorial.
    It's really about your question and the code involved but I figured I'd summary some of the other stuff as I go, since its usually of interest and not many places show the whole process. After all custom means from scratch Modeling and art stuff slows me down everytime. Also I had to go to court but further updates should be more frequent.

    It must be said, I *hate* animating walk cycles... at least I used to until I found this one ref image that saved my day.
    I'm not affil with this dudes site, I left his url in the image so he gets his due credit, also this is where I learned it.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    Anyhow.. that part is done. Idle loop is easy. Neither will be fantastic, but will allow us to put it in udk and get started coding. I've got to install ActorX real quick for max 2012 cuz I forgot to when I upgraded. I'm going to include the exported models and stuff in a pack so people can follow along if they want. The rigging is not very great and there is some obvious poly pulling at his joints, but again, hes just a mannequin dummy, I'd never try to use him as a real game model, and thats all art stuff I will focus on fixing laters. more today...
    Attached Images Attached Images
    Last edited by neurosys; 04-01-2012 at 05:28 AM.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  12. #12
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Exclamation

    http://udn.epicgames.com/Three/FBXPipeline.html
    Apparently I wont be installing actorx for 2012 lol.
    I've used FBX b4 though I dont think it will be an issue.

    Ok, I exported via FBX and all worked fine. Had to check 'convert dummies to bones' or the pelvis was all that got exported. I used physique(I fail @ skin modifier in max) and FBX didnt like that, got some errors about the eyespheres too. It worked though.

    On import, just did import mats, import animations, worked perfectly.
    UDK smooths out a lot of my mistakes and tearing in my mesh, but you can still see it.
    This is due to my sucky modeling and rigging skills.
    Here is a pic of him doing his walk cycle in UDK editor.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    So now for the script parts and getting this guy as our character.
    Good timing because the new UDK just came out so my folders are fresh.
    Each time I do this I dont copy my old code, I start over. This makes a great opportunity to show each step in the process from new scripts, overriding and ignoring all UT stuff, but still swiping what we need from UT sometimes (mostly logic since ours wont be compatible with unaltered UT code).
    I've got my demo asset and 1 animation, now to create a basic animtree, the gametype that starts the chain of definitions, the pawn and playercontroller and bind them all togethor. Thats next.

    I made a little default scene, with a wall for bouncing things off of and stuff.
    This wil be Sams training area were I will teach him to do stuff and test items.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    The rest of this assumes Visual Studio and nfringe for VS is installed and correctly configured to output to and reference the current UDK install, which should be current. More info on setting up VS + nfringe is here: http://wiki.pixelminegames.com/index...pt:UdkProjects (I use the 'long way' its so not long)
    Each time I upgrade UDK for the month, I install to a new folder UDK_MONTH_YEAR, this makes it easy for me to tell that I'm in the right one and that way I can always be sure where my VisualStudio/Nfringe Setup is pointing to.

    So here we go...
    1) make the project following the long way from link above, make sure folder shows up in VS by also creating classes subfolder and create a new empty file called DHGameInfo.uc. If there is no classes/*.uc files then VS will not display the folder. For mine this is: DementiaHills/Classes/DHGameInfo.uc

    2) My game/testzone/package is called dementia hills, so I named mine DHGameInfo.uc. This is where we start overriding.
    Contents of DHGameInfo.uc (For Now):
    Code:
    class DHGameInfo extends GameInfo;
    
    static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
    {
    	return Default.Class;
    }
    
    DefaultProperties
    {
    	bDelayedStart=false
    	PlayerControllerClass=class'DementiaHills.DHPlayer' //Define Player Controller... 
    	DefaultPawnClass=class'DementiaHills.DHPawn'
    }
    Its really short and simple, just defines the classes to use for pawn and playercontroller.
    Now to create those, Controller will extend from UDKPlayerController and manage stuff like player actions.
    The Pawn will control the camera stuff and model structure, lots of other stuff and is extended from UDKPawn.

    I'm putting this together as I write it from my old usages, and forum keeps timing out my logins and I gotta retype lol. may take awhile but I will get it all out.

    Here is the code that goes in DHPlayer.uc (for now, LOTS more coming):
    Code:
    class DHPlayer extends UDKPlayerController;
    
    //POSTBEGINPLAY()
    simulated event PostBeginPlay() {
    	super.PostBeginPlay();
    	`log(":DHPLAYER> Spawned Player Controller.");
    	SpeakTTS("I am Alive."); //You can remove this, if you want.
    }
    
    DefaultProperties
    {
    	CameraClass=class'Engine.Camera' //Define Camera
    	//I've noticed this worked even when I dont do it.
    	//I used to override the Camera Class Itself, but now I use CalcCamera.
    	//If there is something wrong with this anyone feel free to point it out.
    }
    Attached Images Attached Images
    Last edited by neurosys; 04-02-2012 at 02:59 AM.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  13. #13
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Cool Pawn codez

    Here is the (NOT YET COMPLETE) code for the new DHPawn.uc
    I am simply pushing in the code to get simple tasks done, then adding the obvious needs slowly.
    This code just gets our model in and linked to our animset. Still needs an animtree, some sockets and some camera love.
    You can see I'm already setting up the variables for that.
    Code:
    class DHPawn extends UDKPawn;
    
    var vector Loc;
    var rotator Rot;
    var float ZoomAmount;
    var name CameraStyle;
    
    DefaultProperties
    {
    	Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    		bSynthesizeSHLight=TRUE
    		bIsCharacterLightEnvironment=TRUE
    	End Object
    	Components.Add(MyLightEnvironment)
    	
    	Components.Remove(Sprite)
    	Begin Object Class=SkeletalMeshComponent Name=TotalSkeletalMesh
    		LightEnvironment=MyLightEnvironment
    		CastShadow=true
    		bCastDynamicShadow=true
    		bOwnerNoSee=false
    		BlockRigidBody=true
    		CollideActors=true
    		BlockZeroExtent=true
    		SkeletalMesh=SkeletalMesh'DHCharacters.Meshes.Sam_Pearly'
    		AnimSets(0)=AnimSet'DHCharacters.Meshes.Bip001'
    		Scale=1.6
    		BlockActors = true
    		BlockNonZeroExtent=true
    		//REMEMBER only scale the FIRST PARENT_ANIMcomponent (or else it multiplies)
    	End Object
    	Components.Add(TotalSkeletalMesh)
    
    	Mesh=TotalSkeletalMesh
        CollisionType=COLLIDE_BlockAll
    	Begin Object Name=CollisionCylinder
    		CollisionRadius=+0020.000000
    		CollisionHeight=+36.000000
    	End Object
    	CylinderComponent=CollisionCylinder
    
    	Health=100 //100% Health
    	GroundSpeed=150.0 //Walking Speed is 75 (GroundSpeed is really Run Speed(Stupid UT3))
    	WalkingPct=2   //75 * 2 = 150 = Run Speed <-- This Swaps Run for Walk (Shift Key = Run)
    	bPushesRigidBodies=true
    	ZoomAmount = 96.0f
    }
    Now in order for all this to take effect when I play/build I add the DefaultGame.ini and DefaultEngine.ini (ADD AS LINK) to my project and change the following sections, I've commented out the parts I've replaced.

    Changes and Additions to DefaultGame.ini
    Code:
    [URL]
    MapExt=udk
    AdditionalMapExt=mobile
    ;Map=UDKFrontEndMap.udk
    ;LocalMap=UDKFrontEndMap.udk
    Map=TestCube.udk
    LocalMap=TestCube.udk
    TransitionMap=EnvyEntry.udk
    EXEName=DHGame.exe
    DebugEXEName=DEBUG-DHGame.exe
    
    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    +EditPackages=DementiaHills
    Changes and Additions to DefaultEngine.ini
    Code:
    [Engine.GameInfo]
    ;DefaultGame=UDKBase.SimpleGame
    ;DefaultServerGame=UDKBase.SimpleGame
    ;PlayerControllerClassName=UDKBase.SimplePC
    DefaultGame=DementiaHills.DHGameInfo
    DefaultServerGame=DementiaHills.DHGameInfo
    PlayerControllerClassName=DementiaHills.DHPlayer
    ;------------------------------------------
    So now if we hit Build/Debug in VS, it compiles and launches and our custom model is in UDK and attached to our basic controller. (I had to look down because my models scale is still off and I haven't moved the camera yet.)... But he doesnt animate and hes still pretty useless.

    To make our custom camera (very simple version which I will add to later) we need 2 sockets for the way I do it.
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    Notice the sockets must be rotated or they will face the wrong way (up, to the side, etc)
    I used Roll 90 and Yaw -90 that made it look straight ahead.

    To make this work, I added two bits to the DHPawn.uc file:
    Code:
    simulated function name GetDefaultCameraMode( PlayerController RequestedBy ) {
    	return 'DH3P';
    }
    
    simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
    {
    	local vector  Loc2, HitLocation, HitNormal;
    	local Actor HitActor;
    	switch( CameraStyle ) {
    		case 'DH3P': //Third Person, Camera Synced To Pawn (DEFAULT)
    			Mesh.GetSocketWorldLocationAndRotation('NoseBridge',Loc2,Rot,);
    			Mesh.GetSocketWorldLocationAndRotation('CamOrigin3P',Loc,Rot,);
    			Loc-= Vector(Rot) * (ZoomAmount); //Zoom back
    			out_CamRot=Rot; //Actually Set New Rotation
    			HitActor = Trace(HitLocation, HitNormal, Loc, Loc2, FALSE, vect(12,12,12));
    			out_CamLoc = (HitActor == None) ? Loc : HitLocation;  //Actually Set New Location
    			break;
    		case 'DHFP': //First Person, Camera Synced To Pawn 
    			Mesh.GetSocketWorldLocationAndRotation('NoseBridge',Loc,Rot,);
    			Loc-= Vector(Rot); //Zoom IGNORED
    			Loc2=Loc;
    			Loc2-= Vector(Rot) * (16); //Setup to Check Collisions
    			out_CamRot=Rot; //Actually Set New Rotation
    			HitActor = Trace(HitLocation, HitNormal, Loc, Loc2, FALSE, vect(12,12,12)); //On Collision Push Back into HEAD (not THROUGH WALLS)
    			out_CamLoc = (HitActor == None) ? Loc : HitLocation;  //Actually Set New Location
    			break;
    		default: 
    			`log("NO Cam Active! WTF IS WRONG WITH YOU?");
    			CameraStyle = 'DH3P';
    			break;
    	}
       return true;
    }
    Works!!!
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version


    Here are the packages and map so far....
    DHCharacters.upk
    TestCube.udk
    DementiaHills-CodeSample-No1.zip
    Made with March 2012 UDK so I dont think they will load in anything earlier...

    I will post more as soon as I regain consciousnesses....
    Attached Images Attached Images
    Last edited by neurosys; 04-02-2012 at 06:21 AM.
    My blog for UDK stuff: http://udkoder.geekprojex.com

  14. #14
    MSgt. Shooter Person
    Join Date
    Jan 2011
    Posts
    426

    Default

    I strongly recomend that you read Mouglis tutorials, they bring up most of the basic stuff: http://www.moug-portfolio.info/index.php?page=tutorials

  15. #15
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Location
    San Diego, CA
    Posts
    167

    Default

    Quote Originally Posted by ankangronto View Post
    I strongly recomend that you read Mouglis tutorials, they bring up most of the basic stuff: http://www.moug-portfolio.info/index.php?page=tutorials
    I agree, I have used these as well as many others to come around to the way I create these features.
    Mine are usually a more stripped down version to build upon. Mouglis tuts are great though.

    Hey fragor, I wanted to ask if what I had posted helped you any?
    I was thinking about just creating a WIP Tutorial Thread, and keep going. I never got stuck(yet!) just been crazy busy.
    At any rate if you ever have a question you would like to discuss, feel free to pm me anytime, I'm not the best here by far, but I felt like we were kind of trying to do the same thing.
    My blog for UDK stuff: http://udkoder.geekprojex.com


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.