Tuesday, April 26, 2011

Link: Unity Things

Some stuff for Unity that looks pretty interesting and I may be writing an assignment about some of these..

Maya + Unity Grid: A MEL script and some interesting things about scale between Maya and Unity.

Level Builder: This thing's 141MB so it will eat your bandwith. It looks pretty interesting, I will be testing it out later. Edit: Okay, you get a demo version of the level builder that works in a strange way. It's interesting to play around with but for some bizzare reason is configured to work with joysticks.

UniLOD: A LOD system for Unity.

UnitySteer: Because I can't afford the Asset Store.

Monday, April 25, 2011

Wreckless Conduct: Prop Export Tool

My Export Tool has hit its final stage of development. I doubt I'm going to do more to it but suggestions are always welcome.

Here's a pictorial outline of how it works:

Important: This works best if you point the tool to a Custom Assets/Assets folder in your Unity project that should have folders for Models and Textures. I may look into adjusting it so you can just choose a project folder but that will depend on time constraints.

If you can see the tool, then you may notice the text boxes for Model and Texture Folders. They are default names but you can edit them as long as you remember to have a "/" at the front. Annoying but it's just the way I've set to code to deal with empty text boxes.

I've got a slight problem with importing to Unity and the generation of materials. If you look at the pictures below, it will generate a material from the imported texture file and import the Maya default lambert1. It's very likely I will need to play with Unity's Editor classes but we'll see how I go.

- Problems with exporting with/without the Collision node
- Hacky fixes for re-exporting and multiple Collision Nodes (you can have mulitiple Collision nodes but it ignore those nodes upon export)
- Collision volume names, it will now stop appending additional tags to the volumes' name

- Naming of multiple volumes, you can add the same tag to whatever's under your selection
- Folder Names as mentioned before
- Remove collision volumes from the Collision node

- You will need to assign another material to your object, Maya has a problem with renaming lambert1.
- It will still build an Export Node even if you haven't selected a mesh or when you exit out of the save dialog box. I may need to find a way to halt the procedure.

To Add:
- File Path refinement
- Extra pivot point options (maybe, I don't really need them but someone else might)

Thursday, April 21, 2011

Wreckless Conduct: Dem Dry Bones

The Wreckless Art Team's had some trouble with importing our animated rigs into the build. Tuesday night, Brie found the solution to our problem.

The solution involves an attribute found on joints known as Scale Compensation (or in Maya Segment Scale Compensate) which isn't supported by Unity. You just uncheck a checkbox found in the Attribute Editor and the rig will import correctly.

To save Brie the hassle of doing this 234 times (that's 39 bones x 6 models), I wrote a MEL script that does it for her. FUU-YEAH, Hadōken's a little hard to do but fixing pipeline issues like this is pretty good.

Monday, April 18, 2011

Wreckless Conduct:: Yellow Boxing

'Lo and behold, it's that time where I do an update. Expect much boring stuff to occur right now. Here's some screenshots of some progress with unwrapping the car to keep your eyeballs entertained.

It's essentially 1 solid mesh of a Lowrider and then over 18 separated parts that will break off when you crash it in game. It's going to take some time to get a nice and smooth UV happening so don't hold your breath. I didn't model it, you may thank the genius behind it by giving him cash.

I've been working on a MEL script/Export tool that's going to help me export props for Wreckless. It's getting close to an alpha stage so I'm going to write about it since it does more things than a half-unwrapped car.

It's a tool that's built to work with Matt's BuildCollisionOnImport for Unity and make exporting props to the Wreckless build simpler. A basic run down for skim readers:
- It will export an FBX to either my current folder or somewhere I choose
- It will rename my mesh and current material to the same name as my Maya scene.
- It will also copy the image file linked to the material into the directory I chose
- It can place collision volumes under a collision node
- I can tag collision volumes using this tool (more about that below)
- It does pivot point placement
- Everything is placed under a node called Export

Here's some shots of what it does and what problems I've come across. Note: This tool only exports as FBX, I could probably make it do other file formats but that's not necessary at the moment.

1. This is our substitute model, it has a clean construction history and an assigned texture. The export tool is that thing on the side, you will get a cleaner shot of it later.

2. Pivot Settings, move the pivot to particular places. It has general placements at the moment but I will be trying to include more expansive options. The pivot offset only works for above and below the model. It doesn't do x or z axes at the moment.
You may ask why not and I would have to explain why trying to move the pivot 0.2 meters below the prop is a little bit tedious. You may read that as "she's a lazy little thing" and you would be right.

3. The export buttons. Quick export will dump your FBX to the same location as your Maya scene. Export will place your FBX into the folder you direct it to. It will also copy the image file you're using to texture it into any folder marked "Texture" in the same directory as the FBX. Placement for lazy people will be coming up.

4. I hit a problem with trying to stick duplicated versions of the model under a Collision Node. In the top picture, you can see it completely missed the collision volume I had put in the scene.
Surprisingly checking where it was calling the function actually fixed it. The bottom shot shows what you're meant to get with the tool. If you have noticed, it will also rename your mesh and current material the same name as your scene. That's a good thing if your scene is "Vending_Machine" but bad if it's "R_204892-492". I might include extra bits that allow the user to set a name for the mesh and material.

Exporting into Unity looks like this:
If you're not familiar with Matt's script, basically it will look for a node called "collision", then look for anything that has an ID tag. Depending on which tag you use, the script will then make a collider where you put a volume and then delete the mesh you used to make that volume.

So in the above case, the "_Box" tag we stuck on our collision volume will make a Box Collider. Feel free to come bug me if you don't get that explanation, stabbing costs you extra.

There are a few things to fix with the current version of the tool.

It can't generate collision volumes, these need to be made by the user. However it does come with some options that make it easier to put collision under the right node. I started putting these in when I remembered that there are props which contain more than 1 type of volume.

It's got a problem with naming volumes, as you can see it'll keep appending the tag to the transform's name. Don't you worry, I will fix it soon.

The current GUI looks like this, most things are explanatory but you can ask questions and I may try to answer them.

To Do:
- Solve problems with the collision tags, and node.
- Refine the export function
- Refine the naming system
- Include additional pivot point options

If you have any suggestions or complaints, please fire them at my head. I'll be sure to get them in a most painful way.

Saturday, April 16, 2011

Unity Skyboxes

I've been fiddling around with a new skybox texture for Wreckless Conduct. As skybox texture creation isn't covered in the Unity manual, I did a hunt around for some tutorials/information.

Flat Images for Skybox (A Unity Answers diagram) and Creating a Skybox discuss the same method but works well if you're using a 2D app like Photoshop. See also this tute from CGTextures.

"As Unity uses a sphere to project the skydome it is best to use Maya or Vue to create the textures for the skybox as the spherical projection is hard to get it right within a photoeditor only." (From the Unity Forums)

I've been told Unity will blow the skybox textures up so high-res images are a good thing.

Here's some old attempts at the skybox:

Monday, April 11, 2011

Wreckless Conduct: Plastic Surgery

One of the tasks I've had for the last week was texturing the pedestrians modeled by Brie. So far there are only 3 but more are in the works. More can be done with these but I wonder just how much you'll see when you're plowing through them.

I've included the Texture maps and progress shots, just for the hell of it. Trying to paint wrinkles and stubble has got to be worth something, right?

You may or may not have noticed that the level had a HUGE scale issue that's been toned down (still a while to go). Here's some progress shots, there are still some things that need fixing but I'll get to them soon.

Monday, April 4, 2011

Wreckless Conduct: Hard Hat Area

What some people do not realise is that level and world building requires you to award yourself a faceted degree in architecture, urban planning and fun. If you observe the images below, you can be assured that I did not earn my degree.

Scribbles from my notebook:

On the left: What I had planned for the level
On the right: What the plan looks like when you realise the mini-map is orientated a particular way...
*Okay it's a seperate image because I forgot that no-one else will know how to read the damn thing. Yes, North is thataway:

The varying levels of brightness in these next shots relate to my using additional lighting in the scene so I could see what I was doing.

Timelapse screenshots:

Detail shots:

The pits are housed in little buildings of their own, I'd make the buildings high-risers but there are a few things about scale that need fixing.

Unintended driving in a city of giants. The map shouldn't be that big but it is.

To Do:
- Fix the entire world of Wreckless starting with pbcak and this little black duck
- Add in props (It's looking a little bare)
- Texture pedestrians
- Save the cheerleader, sorry the world. Like these fine, fine people. *
*That's the 90's BP logo right there, you might know it.