Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 03/08/12 23:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Playing with Unity3D

https://store.unity3d.com/index.html

I got it and did a quick import of the Airport level into Unity 3D.  I was able to use the first person controller to move around the level.

Oni_Unity3D.jpg

Here are some tips for getting a level into Unity

1) Export the AKEV from a level, for example the lab level.
2) In Unity 3D create a new project.
3) Copy or Move the files lab_env.dae, lab_obj.dae and the folders images, markers into the Assets folder of the new project
4) Select the lab_env in the Unity program and select the following options Optimize Mesh, Generate Colliders and Generate Lightmap UV, then click Apply.  Do the same for the lab_obj file.

Lab_Unity.jpg

5) Drag the lab_env and lab_obj into the Hierarchy Tab.
6) Go to the GameObject menu / Create Other and add a Directional Light.
7) In the Project Tab, open the Standard Assets Folder / Character Controllers and drag either the First Person Controller or 3rd Person Controller in the Hierarchy Tab, so you can move around in the level.
8) To add a skybox, open the Standard Assets Folder / Skyboxes to see the various skyboxes.  Then go to Edit menu / Render Settings/  In the Skybox Material line, click on the button to the very right, it will open a new window called Select Material.  Search for the name of the skybox you want to use.

This is as far as I got, testing out the Unity 3D engine.  Hopefully, others will be able to do more.

Obviously, it will take a lot more work to get it looking right, such as glass, and making the markers for impassable and barrier invisible.

I doubt that we can use the Unity 3D engine for Oni2.  It looks like most games using this engine are FPS or 3rd person shooters, no melee.

At least, this is something to play around with.

Offline

#2 03/09/12 02:03

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: Playing with Unity3D

Make Oni to a mobile game?

Offline

#3 03/09/12 08:03

TOCS
Member
From: Denmark
Registered: 04/04/07

Re: Playing with Unity3D

Unity is great for browser games. smile

Offline

#4 03/11/12 17:03

Tracker
Member
From: Germany
Registered: 01/14/07

Re: Playing with Unity3D

It's awesome, that you was able to import the level into Unity 3D and that the first person controller works! smile


ONI is the best game in the universe!

Offline

#5 03/12/12 17:03

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: Playing with Unity3D

EdT i downloaded and installed it but it's asking for registration, it's free right ?


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#6 03/12/12 18:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Playing with Unity3D

Yes it is free.

Offline

#7 03/25/12 17:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Playing with Unity3D

You can walk through the Airport level in this web app: http://edt.oni2.net/Unity3d/oni_airport.html
Head to the front entrance and enter the building.

Note: You'll be asked to download the Unity Web player.

Offline

#8 03/25/12 18:03

Jon God
Member
Registered: 01/17/07

Re: Playing with Unity3D

Runs pretty nicely.


Jon-God.jpg
PSN: Jon_God
XBL: Ernie The Bear

Offline

#9 03/25/12 21:03

Lukas Kreator
Member
Registered: 05/07/10

Re: Playing with Unity3D

Again, awesome! I have been messing with Unity for some weeks, specially scripting.
I know I have been breaking deadlines and stuff... but tell me if I could help with anything.
Also, althrough the doors are really cool, I am having some problems with walking.

Offline

#10 03/25/12 23:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Playing with Unity3D

Lukas: What problems are you having?  Is it at a specific location?

I used iTween to script the doors: http://itween.pixelplacement.com/index.php

Offline

#11 03/26/12 05:03

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: Playing with Unity3D

If you toy with the doors they won't correct close. I think it's because they interrupt the opening sequence and then play the full closing sequence. The fences at the airfield seems to have a transparency problem. From inner view total transparent, from outer view they are visible with black background.

But besides that the level looks really nice. I was surprised by looking at HD textures. In Oni I don't often use HD level texture cuz I fear they somehow slow down the game.

Offline

#12 03/26/12 09:03

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Playing with Unity3D

Regarding the doors, I'm using basically an invisible cube as a trigger. When you enter the cube, it runs the script to open the door, when you exit the cube, the close door script runs.  The script moves the door by a set amount, so if you were to interrupt the script, that would cause the door not to close correctly.

For 2 sided objects like glass and the fence, Oni has a flag to render both sides. However, in Unity3D, it only renders one side.  For the glass I had to duplicate all the polygons with the glass texture and reverse the face.  So now you have 2 polygons for the glass each facing a different direction.

Therefore, to get the fence to look correct, I would have to do the same thing and assign the fence's texture as transparent.

Offline

#13 03/26/12 13:03

Lukas Kreator
Member
Registered: 05/07/10

Re: Playing with Unity3D

Actually, I can only walk sideways. If I keep looking to a door while I'm walking, I end up hitting the wall by it.

Offline

#14 05/08/14 00:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

paradox-01 wrote:

How much effort would it take to make Konoko a playable character in Unity?
Or, for the start, can you make her constantly move forward and left/right with keys?
Plains should be no problem, but how about ramps?

Making Konoko playable will be not very fast work - it have 666 animation clips (LOL ]:D) and, as i guess, near 400 of them is using during gameplay. Transitions, splitted animation loops, stuff's - i afraid, i can't handle them using only TRAM information, because i need do determine which animation from it's animation type will be needed - we got few animations for idling, standing, etc. So, this stuff would be hardcoded.
The more basic work (forcing it to constantly move) will be easier (ramps are not the real problem), but my first goal for next is dealing with markers and OBAN because i want to load level completely (without scrips, hehe) first, then make Konoko playable even for a bit. But still, i need to deal with art completely.

Last edited by 6opoDuJIo (05/08/14 01:05)


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#15 05/08/14 05:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

Btw, how these lights are placing in Oni? I got no any flags for them, only specifical object names. is it right thing? And how about light ranges, angles (for spotlights), etc?

Last edited by 6opoDuJIo (05/08/14 05:05)


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#16 05/08/14 09:05

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Playing with Unity3D

Not sure if I know what you're asking, but Oni doesn't really have any light data except for the way the textures on the "lights" are named.  The light data used to be in OBLS.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#17 05/08/14 09:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

OBLS is that thing i was searching for, ty. Now i need to deal with OBAN somehow, hehe.


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#18 05/08/14 18:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

Aw, this OBAN's. Are they linked to scene objects using only ID's inside of OBOA?


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#19 05/08/14 23:05

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: Playing with Unity3D

Search also for env_setanim in *.bsl files.
With this command, additional anims can be played on animated objects.

Last edited by paradox-01 (05/08/14 23:05)

Offline

#20 05/09/14 03:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

Hot helped, lol :
env_setanim 201 Losetruckwheel01
    env_setanim 202 Losetruckwheel02
    env_setanim 203 Losetruckwheel03
    env_setanim 204 Losetruckwheel04
    env_setanim 205 Losetruckwheel05
    env_setanim 206 Losetruckback
    env_setanim 207 Losetruckcab

but there is no any Losetruckwheel in scene. Only... truckwheel i found in AKEV.
hmm


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#21 05/09/14 06:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

Facepalm. Just got it:
env_show 201 0
    env_show 202 0
    env_show 203 0
    env_show 204 0
    env_show 205 0
    env_show 206 0
    env_show 207 0
im sry


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#22 05/10/14 12:05

6opoDuJIo
Member
From: Ukraine
Registered: 03/18/13

Re: Playing with Unity3D

It's alive!
[video=480,360]http://youtu.be/Vj947Q07lsA[/video]
And as any zombie, awkward and with slowed reaction.
Very rough version just to be sure it can work. Anyway, is there anyone who want an AE package to try this?

Last edited by 6opoDuJIo (05/10/14 12:05)


Implement Oni with Unity3D engine :
https://github.com/6opoDuJIo/Oni-Round2

Offline

#23 05/10/14 15:05

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Playing with Unity3D

Does your Unity demo also work on a Mac?

Offline

#24 05/10/14 19:05

Jon God
Member
Registered: 01/17/07

Re: Playing with Unity3D

EdT wrote:

Does your Unity demo also work on a Mac?

Unity is free unless you are selling a product.

It also should cross compile for Mac/PC/Linux.


Jon-God.jpg
PSN: Jon_God
XBL: Ernie The Bear

Offline

#25 05/11/14 01:05

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: Playing with Unity3D

So realtime skinning is just a test. How good is the performance in the real unity program?

Offline

Board footer

Powered by FluxBB