Tuesday 25 March 2014

Re-Familirasing Myself with the CryENGINE - Back To Basics

With the bulk of larger assets, the track for example! being modeled in 3D Studio Max, most of them at least at the white box stage, I need to start importing things into my chosen game engine (Crytek's CryENGINE) and begin the layout of the level. 

I haven't gone near the engine for well over six months now, the last time being during the second year group project, and unfortunately, even then, I didn't spend much time with the engine as I was mainly tasked with concept work, modelling and texturing. One skill taken from that project in relation to the engine though, was that I was able to confidently prepare the assets in 3DS Max, ready for exporting to the CryENGINE, something which the other group members seemed to struggle with on occasion!

First things first was to download the latest engine, which was CryENGINE 3.5.6. After opening the editor I wanted to start by just spending a few hours learning the basics again. I began by creating a new level and editing the terrain, experimenting with the height map resolution and meters per unit and the painting the terrain.

I decided that for now I would just fill the whole map with a terrain at the same height so I basically had just a complete flat map to begin building the level. 


Once I had this in place I wanted to import the circuit diagram I had made. I think I could put the diagram itself on the actual terrain so that as I modified the terrain the actual diagram would stay in place which would probably make it easier to keep the layout most accurate, but, I decided to just import the plane from 3DS Max, which was already the right size to just have the diagram applied as a texture. I could then hide it when I was using the diagram.

Before I could export the plane needed for the diagram, as with building the assets in 3DS Max, I had to ensure that the scale was correct within the engine, especially as this is what the player would interact with, it's important that everything is the correct size. The unit size of 3DS Max and CryENGINE also had to match, other wise, an object that was the correct size in Max may appear really huge or tiny once exported to CryENGINE if the units didn't match. 

This appears simple at first, but as you may know if you work with any of these programs, things never are. Changing the units in 3DS Max I exported the track model as you can see below;


Errrmmm?... pick one?!

Okay so things haven't gone right straight away. As you can see from the image above, altering the unit size in 3DS Max drastically affects the size of the model after exporting it into CryENGINE. One of these has got to be the right size though? surely? 

Okay, so I cant just pick one and hope for the best. I want the circuit to be exactly the correct size, and either way, once the engine is in game mode and you're able to use the player to explore the level its going to be immediately noticeable. 

There was only one way to be sure that the unit set up in my 3DS Max file. I did this by modelling a 1x1x1 meter box inside 3DS Max and exporting it into CryENGINE. I also built a 1x1x1 meter box in CryENGINE using the solid designer tool. Once these boxes matched, I knew that the units were set up correct inside 3DS Max and all of my models would be to scale once exported to CryENGINE. 

You can see in the image below the two 1x1x1 meter boxes side by side. They match!


Phew! take a breath! 

As you can see from the image above I also played about with some of the other basic CryENGINE tools such as player spawn point.

All I had to do now was export the plane from Max and apply the track diagram in CryENGINE as a texture. Converting the diagram to a CryENGINE texture, known as a Cry Tiff was a simple process using the Photoshop plug-in. The plug-in was already installed from last years group project and I had gone through the process quite a few times during that project.

Once this was done, the texture was applied in CryENGINE!


Erm, no, hang on, that's not right is it?! 

Okay, so the texture's applied, its the right scale, but its a little pink. Its not ideal but its a start! I could probably get on like this to be honest, but I'll eventually come to a point where I need to start texturing the rest of the level and in all honesty, I don't want a pink Stretton. 

Oh yeah, one other thing, when I zoom into the diagram now, which I need to do for the placement some of the smaller assets, this happens;


Lots of tiny diagrams!

Okay CryENGINE, something's not right, again if your familiar with these programs, there's always something not right, always something that just doesn't work right away, always something that needs fixing. Ahh I'm getting tired of this! Only a few more weeks to go!

And then it finally clicked, (after opening the material editor again).



I remember we had this problem with the group project. An important file called 'resource compiler' was missing from the CryENGINE download so the engine wasn't able to process the materials properly. Looks like the file is still missing! get it sorted Crytek! you see, its this kind of thing that I'm tired of!

Anyway, lets bring this blog to an end. After downloading the 'resource compiler' or 'rc' folder it seemed to work. For now! 



The next stage is to begin exporting the white box assets into the engine and begin laying out the level. 

No comments:

Post a Comment