Oddworld Forums

Oddworld Forums (http://www.oddworldforums.net/index.php)
-   Oddworld Mods & Hacks (http://www.oddworldforums.net/forumdisplay.php?f=24)
-   -   How to modify NnT's camera to use Orthographic Projection (http://www.oddworldforums.net/showthread.php?t=24610)

Nemin 04-03-2018 09:56 AM

How to modify NnT's camera to use Orthographic Projection
 
Hi!
A few people from the OWF discord and myself spent a few hours today digging around in NnT's source code and we found a way to disable the dynamic camera and instead use a static one, which is more faithful to AO.

Preview:




Here are the instructions, how you can do the same:

1. Download dnSpy.
You don't need any of the Unity packages, just the "dnSpy.zip"

2. After unzipping open dnSpy.exe, press File -> Open.

3. Navigate to the Game's folder and then open "NNT_Data/Managed".

4. Select the four "Assembly-" DLL-s.

5. Open "Assembly-CSharp -> Assembly-CSharp.dll -> "-" (the hyphen) -> DynamicCamera".

6. Open the "Awake()" function.

7. Right click -> Edit Method and insert this two lines just below the first one:
:

this.cCamera.isOrthoGraphic = true;
this.cCamera.orthographicSize = 8f;


(Optionally: After finishing the other file, mess with the 8f to find the most desirable zoom level.)

8. In DynamicCamera find "LastUpdate()" function and Right click -> Edit Method. Scroll to the bottom of the file and just before the last line insert this:
:

base.transform.rotation = Quaternion.identity;

9. Press Ctrl+Shift+S, don't change any of the settings, press OK.

10. You're done! Start NnT.

[Disclamer: I don't know if the game can actually be finished using this projection, but it's a fun thing to try.]

Wircea 04-03-2018 10:00 AM

Should be mentioned that the perspective will get messed up due to the foreground and background bending. Some particles such as the electric gates and smoke will not render.
Also be warned the game will get trippy every time the camera rotates.

Only do this for some nice screencaps

Phoetux 04-03-2018 12:59 PM

I think this is the first mod ever made for NnT. As already said in Discord good job to both of ya :D

OWI_Alex 04-04-2018 02:09 AM

While obviously we can't support mods officially, this is quite interesting.

Varrok 04-04-2018 02:11 AM

I'd love to see Soulstorm like that

OWI_Alex 04-04-2018 03:09 AM

:

()
I'd love to see Soulstorm like that

I doubt DynCam would be so easy to break this time around, given we're not using it!

Varrok 04-04-2018 05:15 AM

I mean, with ortographic camera

edit: as in, by design

Samtastic 04-04-2018 12:45 PM

That is really cool! Someone was recommending I should use that camera for the bird portal for my fan Abe game. I could use it for one of the levels in the game maybe!

Varrok 04-04-2018 10:45 PM

I think it needs clarifying:
The camera in the mod is still dynamical, it follows Abe. It's just that it doesn't rotate in Z axis to keep the 2D view of the scenes. It's not as static as in AO/AE in a way that it quickly switches between "screens" when you reach an edge