gfxgfx
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
gfx gfx
gfx
572363 Posts in 510035 Topics by 8218 Members - Latest Member: zaq003 May 25, 2025, 01:15:13 am
*
gfx*HomeHelpSearchCalendarLoginRegistergfx
gfxgfx
0 Members and 2 Guests are viewing this topic.       « previous next »
Pages: 1 [2] Print
Author Topic: Level Creation Standards  (Read 84789 times)
Morden Tral
Administrator
1337+
*

E-Cock: 128
Offline Offline

Posts: 9684



« Reply #15 on: March 12, 2013, 03:57:40 am »

I have no idea what she is talking about, I hope it isn't what it looks like because it already does that.
Logged

PuffCaKe
Adept
**

E-Cock: 2
Offline Offline

Posts: 155


« Reply #16 on: March 12, 2013, 09:32:45 pm »

I am talking about the potions stuck in the wall?
Logged
Morden Tral
Administrator
1337+
*

E-Cock: 128
Offline Offline

Posts: 9684



« Reply #17 on: March 12, 2013, 10:24:21 pm »

....That was never the issue
Logged

PuffCaKe
Adept
**

E-Cock: 2
Offline Offline

Posts: 155


« Reply #18 on: March 13, 2013, 10:05:59 pm »

Well... This is awkward... -_________________-
Logged
Imm0Rtal
Global Moderator
1337+
*

E-Cock: -17
Offline Offline

Posts: 3069


Shady@Noxhub.net


« Reply #19 on: March 14, 2013, 09:24:26 pm »

Well... This is awkward... -_________________-

God Dammit Misha. Just post on your regular name.
Logged


PuffCaKe
Adept
**

E-Cock: 2
Offline Offline

Posts: 155


« Reply #20 on: July 12, 2013, 07:42:22 pm »

I have a problem installing the svn.

I am kinda newbie so i already know you hate me, you don't have to say it I already know.

What I did was

1) In the "Nox2" folder of the udk I right clicked and did svn checkout. The dir was c:/udk and the folder i clicked was nox2 test

2) I changed the install dir from Nox2 testnew to nox2 test

3) I waited for it to install

4) I created a shortuct From "UnrealFrontend" to the desktop

4) I created a shortcut to "UDKLift"

5) I right clicked on UDKLift and added editor to the target

6) I was not sure what to do from there, the unrealFrontend thing did not have a "Make" button

7) I ran the program (Nox 2 Test) and it came up with a "Must rebuild message" or something like it was too old or something

Cool I notice that my characters name had changed from "Player" to my Gmail account name...?

9) nothing else changed, the same map, same models and same gliches... It should be mensiond that when it was rebuilding it had a bunch of errors like could not find player class and stuff

So please help me. I am utterly useless I guess so yeah....
Posted on: July 12, 2013, 03:40:15 PM
Also on the file folder "NoX2 Test" there is now a little red exclamation mark.
Logged
Evengard
Goon
Apprentice
*

E-Cock: 0
Offline Offline

Posts: 49


« Reply #21 on: April 01, 2014, 04:13:31 pm »

Morden, Hi. Can you please comment how actually the LOS system was implemented? Because I look at the code and I can't get how it works.
Logged
Morden Tral
Administrator
1337+
*

E-Cock: 128
Offline Offline

Posts: 9684



« Reply #22 on: April 01, 2014, 06:53:32 pm »

UDK doesn't support custom/deferred shadow mapping fully (Real time shading is slow as shit and a hack job), so to get any sort of LOS system at all I embedded custom LOSVolumes in the maps that would define an area to project the view frustum from. Then in the Canvas / HUD system I would project the Volumes location into the 2D space and draw polygons to define where the shadow is. This had the unfortunate side effect of being drawn after the geometry and thus not allowing proper depth rendering (cutting off players heads if they jump too high before I raised the walls, ect ect). It would have been decently good if the canvas element in UDK allowed for opacity in the textures but sadly it does not.


In UE4 it would be far simpler because you can just use a custom shader to manage a LOS/Fog of war system using deferred shadow mapping to project the real time shadows.

Also for the record, UE4 is fantastic.

I've pasted the LOS triangle loading function below, the code base was messy as hell but mostly functional. I didn't see a point in optimizing it as I dropped the project not that long after I had a working system. If you want to look at it more in depth the NoXPlayerHud.uc file in the source has the drawing loop and that function in it.

Code:
function DrawLOS(Canvas Canvas1)
{
local NoXPawn myPawn;
local NoXPlayerController myController;

local LOSVolume LOSVol;
local Vector temVec;

local Vector PawnLocation;
//local Vector2D PawnLoc;

local Vector One,Two,Three,Four,Five,Six,Seven,Eight;
local Vector OneLoc,TwoLoc,ThreeLoc,FourLoc,FiveLoc,SixLoc,SevenLoc,EightLoc;

local int CheckX,CheckX2;
local int CheckY,CheckY2;

local Vector screenLoc;
local Vector outLoc;
local Vector hitLoc;
local Vector hitNormal;
local Vector StartTrace;
local Vector EndTrace;
local Vector2D ScreenSize;
//local Canvas Canvas1;

if( !bDrawTrueSight )
return;

myController = NoXPlayerController(PlayerOwner);
myPawn = NoXPawn(myController.Pawn);

PawnLocation = myPawn.Location;
PawnLocation.Z = 0;
PawnScreenLoc = Canvas1.Project(PawnLocation);


ScreenSize.X = self.SizeX;
ScreenSize.Y = self.SizeY;
Canvas.Deproject(ScreenSize,screenLoc,outLoc);
StartTrace = (IsometricCamera(myController.PlayerCamera)).ViewTarget.POV.Location;
EndTrace = StartTrace + outLoc * 5000;
Trace(hitLoc, hitNormal, EndTrace, StartTrace, false);


CheckX = hitLoc.X;//myPawn.Location.X//+400; //500
CheckY = hitLoc.Y;//myPawn.Location.Y//+400;//500


ScreenSize.X = 0;
ScreenSize.Y = 0;
Canvas.Deproject(ScreenSize,screenLoc,outLoc);
EndTrace = StartTrace + outLoc * 5000;
Trace(hitLoc, hitNormal, EndTrace, StartTrace, false);

CheckX2 = hitLoc.X;//myPawn.Location.X//-300;//400
CheckY2 = hitLoc.Y;//myPawn.Location.Y//-300;//400

foreach AllActors(class'LOSVolume', LOSVol)
{



temVec.X = LOSVol.BrushComponent.Bounds.Origin.X + LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y + LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = LOSVol.BrushComponent.Bounds.Origin.Z + LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Two = Canvas1.Project(temVec);
TwoLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X - LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y + LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = LOSVol.BrushComponent.Bounds.Origin.Z + LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//One = Canvas1.Project(temVec);
OneLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X - LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y - LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = LOSVol.BrushComponent.Bounds.Origin.Z + LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Three = Canvas1.Project(temVec);
ThreeLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X + LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y - LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = LOSVol.BrushComponent.Bounds.Origin.Z + LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Four = Canvas1.Project(temVec);
FourLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X - LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y + LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = 0;//LOSVol.BrushComponent.Bounds.Origin.Z - LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Six = Canvas1.Project(temVec);
SixLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X - LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y - LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = 0;//LOSVol.BrushComponent.Bounds.Origin.Z - LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Five = Canvas1.Project(temVec);
FiveLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X + LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y + LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = 0;//LOSVol.BrushComponent.Bounds.Origin.Z - LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Seven = Canvas1.Project(temVec);
SevenLoc = temVec;

temVec.X = LOSVol.BrushComponent.Bounds.Origin.X + LOSVol.BrushComponent.Bounds.BoxExtent.X;
temVec.Y = LOSVol.BrushComponent.Bounds.Origin.Y - LOSVol.BrushComponent.Bounds.BoxExtent.Y;
temVec.Z = 0;//LOSVol.BrushComponent.Bounds.Origin.Z - LOSVol.BrushComponent.Bounds.BoxExtent.Z;
//Eight = Canvas1.Project(temVec);
EightLoc = temVec;


if((
(LOSVol.BrushComponent.Bounds.Origin.X > CheckX || LOSVol.BrushComponent.Bounds.Origin.X < CheckX2) &&
(LOSVol.BrushComponent.Bounds.Origin.Y > CheckY || LOSVol.BrushComponent.Bounds.Origin.Y < CheckY2) &&

(FourLoc.X > CheckX || FourLoc.X < CheckX2) &&
(FourLoc.Y > CheckY || FourLoc.Y < CheckY2) &&

(TwoLoc.X > CheckX || TwoLoc.X < CheckX2) &&
(TwoLoc.Y > CheckY || TwoLoc.Y < CheckY2) &&

(SixLoc.X > CheckX || SixLoc.X < CheckX2) &&
(SixLoc.Y > CheckY || SixLoc.Y < CheckY2) &&

(FiveLoc.X > CheckX || FiveLoc.X < CheckX2) &&
(FiveLoc.Y > CheckY || FiveLoc.Y < CheckY2)

))
continue;

One = Canvas1.Project(OneLoc);
Two = Canvas1.Project(TwoLoc);
Three = Canvas1.Project(ThreeLoc);
Four = Canvas1.Project(FourLoc);
Five = Canvas1.Project(FiveLoc);
Six = Canvas1.Project(SixLoc);
Seven = Canvas1.Project(SevenLoc);
Eight = Canvas1.Project(EightLoc);
//MatCanvas1.DrawColor = MakeColor(255,0,0,255);
//MatCanvas1.SetPos(MatCanvas1.SizeX/2,MatCanvas1.SizeY/2);
//MatCanvas1.DrawBox(4,4);

/*Canvas1.DrawColor = MakeColor(255,255,255,255);
Canvas1.SetPos(One.X,One.Y);
Canvas1.DrawText("One");

//Canvas1.DrawColor = MakeColor(255,0,0,255);
Canvas1.SetPos(Six.X,Six.Y);
Canvas1.DrawText("Six");

//Canvas1.DrawColor = MakeColor(255,0,0,255);  
Canvas1.SetPos(Eight.X,Eight.Y);
Canvas1.DrawText("Eight");*/

if( LOSVol.bIsWindow )
AddWashTriangle(One,Two,Three,Four,true);
else if( LOSVol.bIsDoor )
AddWashTriangle(One,Two,Three,Four,false,true);
else
AddWashTriangle(One,Two,Three,Four,false);

if( LOSVol.bIsWindow )
{
if((
((LOSVol.BrushComponent.Bounds.Origin.X-LOSVol.BrushComponent.Bounds.BoxExtent.X < myPawn.Location.X+80 &&
LOSVol.BrushComponent.Bounds.Origin.X+LOSVol.BrushComponent.Bounds.BoxExtent.X > myPawn.Location.X-80) &&
LOSVol.BrushComponent.Bounds.Origin.Y-LOSVol.BrushComponent.Bounds.BoxExtent.Y < myPawn.Location.Y+80 &&
LOSVol.BrushComponent.Bounds.Origin.Y+LOSVol.BrushComponent.Bounds.BoxExtent.Y > myPawn.Location.Y-80)
  ))
continue;
}


if( PawnLocation.Y <= SixLoc.Y /*&& PawnLocation.X <= EightLoMatCanvas1.X*/ || PawnLocation.Y/*-25*/ <= SevenLoc.Y /*&& PawnLocation.X >= FiveLoMatCanvas1.X*/)
{
// Side 2
AddViewTriangle(Four, Three, Eight, Five);
//AddViewTriangle(One, Two, Six, Seven);
}

if( PawnLocation.Y >= SevenLoc.Y /*&& PawnLocation.X <= SevenLoMatCanvas1.X*/ || PawnLocation.Y >= SixLoc.Y /*&& PawnLocation.X >= SixLoMatCanvas1.X*/)
{
// Side 1
//TriangleList.Remove(0,TriangleList.Length);
AddViewTriangle(One, Two, Six, Seven);
}

if( PawnLocation.X >= FiveLoc.X /*&& PawnLocation.Y >= EightLoMatCanvas1.X*/ || PawnLocation.X >= SixLoc.Y/* && PawnLocation.Y <= SevenLoMatCanvas1.X*/)
{
// Side 3
//TriangleList.Remove(0,TriangleList.Length);
AddViewTriangle(Four, Two, Eight, Seven);
//AddViewTriangle(Three, One, Five, Six);
}

if( PawnLocation.X <= FiveLoc.X /*&& PawnLocation.Y >= FiveLoMatCanvas1.X*/ || PawnLocation.X <= SixLoc.Y /*&& PawnLocation.Y <= SixLoMatCanvas1.X*/)
{
// Side 4
//TriangleList.Remove(0,TriangleList.Length);
AddViewTriangle(Three, One, Five, Six);
//AddViewTriangle(Four, Two, Eight, Seven);
}

// Now need to run the wall ends
// Wall only visual aspects

/* if( !LOSVol.bDisableAllCorners )
{
if( LOSVol.bEnableCorner3 && (PawnLocation.Y >= FiveLoc.Y && PawnLocation.X <= FiveLoc.X || PawnLocation.Y <= FiveLoc.Y && PawnLocation.X >= FiveLoc.X))
{
// Corner 3
AddViewTriangle(Five, Three, Five, Five);
}

if( LOSVol.bEnableCorner1 && (PawnLocation.Y <= SixLoc.Y && PawnLocation.X <= SixLoc.X || PawnLocation.Y >= SixLoc.Y && PawnLocation.X >= SixLoc.X))
{
// Corner 1
AddViewTriangle(Six, One, Six, Six);
}

if( LOSVol.bEnableCorner2 && (PawnLocation.Y >= SevenLoc.Y && PawnLocation.X <= SevenLoc.X ))
{
// Corner 2
AddViewTriangle(Seven, Two, Seven, Two );
}
if( LOSVol.bEnableCorner2 && (PawnLocation.Y <= SevenLoc.Y && PawnLocation.X >= SevenLoc.X))
{
// Corner 2
AddViewTriangle(Seven, Two, Seven, Seven);
}

if( LOSVol.bEnableCorner4 && (PawnLocation.Y <= EightLoc.Y && PawnLocation.X <= EightLoc.X ))
{
// Corner 4
AddViewTriangle(Eight, Four, Eight, Eight);
}

}*/
}
}
« Last Edit: April 01, 2014, 06:59:48 pm by Morden Tral » Logged

gfx
Pages: 1 [2] Print 
gfx
Jump to:  
gfx
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.023 seconds with 24 queries.
Helios Multi design by Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!