Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 8/3/12 23:16

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/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 9/3/12 2:43

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

Re: Playing with Unity3D

Make Oni to a mobile game?

Offline

#3 9/3/12 8:19

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

Re: Playing with Unity3D

Unity is great for browser games. smile

Offline

#4 11/3/12 17:15

Tracker
Member
From: Germany
Registered: 14/1/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 12/3/12 17:08

Samer
Member
From: Lebanon
Registered: 4/9/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 12/3/12 18:36

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

Re: Playing with Unity3D

Yes it is free.

Offline

#7 25/3/12 17:08

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/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 25/3/12 18:32

Jon God
Member
Registered: 17/1/07

Re: Playing with Unity3D

Runs pretty nicely.


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

Offline

#9 25/3/12 21:02

Lukas Kreator
Member
Registered: 7/5/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 25/3/12 23:55

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/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 26/3/12 5:45

paradox-01
Member
From: Germany
Registered: 14/1/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 26/3/12 9:56

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/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 26/3/12 13:41

Lukas Kreator
Member
Registered: 7/5/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 8/5/14 0:55

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 (8/5/14 1:30)


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

Offline

#15 8/5/14 5:43

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 (8/5/14 5:43)


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

Offline

#16 8/5/14 9:10

Iritscen
Moderator
From: NC, USA
Registered: 22/10/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.


byproducts are fine, but where's the beef?

Offline

#17 8/5/14 9:43

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 8/5/14 18:59

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 8/5/14 23:12

paradox-01
Member
From: Germany
Registered: 14/1/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 (8/5/14 23:14)

Offline

#20 9/5/14 3:02

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 9/5/14 6:32

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 10/5/14 12:47

6opoDuJIo
Member
From: Ukraine
Registered: 18/3/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 (10/5/14 12:50)


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

Offline

#23 10/5/14 15:37

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

Re: Playing with Unity3D

Does your Unity demo also work on a Mac?

Offline

#24 10/5/14 19:34

Jon God
Member
Registered: 17/1/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 11/5/14 1:27

paradox-01
Member
From: Germany
Registered: 14/1/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