Showing posts with label 3d. Show all posts
Showing posts with label 3d. Show all posts

Monday, 25 January 2010

Its Time For Chat

Well now the networking system is in, the first thing I wanted to turn to my attention to is a chat system.

Before I began creating GUI design for chatting, I started thinking back to some Second Life features. The ability to take a snapshot of the current view, without any interface components cluttering up the shot. The snapshot would have to be taken at the exact moment after the world display had finished rendering, but before any GUI elements had begun rendering.

With this in mind, I decided I needed one main UI manager class to handle all child overlay components, such as menu bar, task bar, chat bar and whatever else comes up in the future, to keep things clean and easy to manage.

I created a design I am happy with for the task bar and chat bar and their relevant classes and I created the UiManager class.

I am currently working on these components. That is my update. :)

Another post to follow ...

Wednesday, 20 January 2010

You could spend years learning that!

I have spent a couple of days working on character modelling in various 3D designers, including Poser 6, MilkShape 3D, Character FX, LithUnwrap and various other tools.

I know how to operate these tools and I can create basic models, but detailed, optimized and animated 3D characters is out of my league right now. I will continue to learn how to do it, but I think it is something that can take years to master, and I need avatars now.

My plan is to stop working with the 3D modellers and go back to the Globe code.

For now, an avatar will be represented by a human sized box, this way the project can still move forward whilst a solution is found to the avatar design problem.

I have contacted a 3D design company to enquire on costs of outsourcing the character design to them. I have a feeling it will be out of my price range, but its worth a try.

I have a couple of other ideas up my sleeve. I'll keep you posted.


Tuesday, 19 January 2010

Terrain, Bones and Avatars

Here I am again, it has been a few days since my last post and although I have still been working on Globe, not as much code has been written as in previous posts.

After my last update we had a skybox being rendered, some basic UI elements and asset and simulator server connectivity and data transfer.

My next step was to improve some of the the features I had already created, such as the camera controls. I came up with a mouse collision detection algorithm which provided pixel perfect mouse click collision detection with the control buttons. This was harder than it sounds because the buttons are a kind of cone shape. I also improved the camera rotation and positioning based on input from the camera control.

I improved the simulator server process, so it stays connected and constantly pumps data across, but having done a bit more research I will be switching this from TCP to UDP for performance reasons and broadcast features, so the code will need to change again. At this point I am thinking I will do this with native C socket functions, but I am also considering ENet which is a UDP networking library. http://enet.bespin.org/index.html

I added a terrain table to SQL and some data layer classes and wrote the code required for the simulator to serve the terrain data. The terrain requires 3 images to work. The heightmap, which defines the height of each face on the land. The terrain texture which is stretched over the entire landscape. The detail map, which is repeated many times over the landscape to create the effect of surface texture. So now terrain is being rendered.

As really the whole experience of a virtual world is based around the users avatar, I decided this was the next stop, the notorious time consuming character modelling and animation and the reason less code has been written this time around.

The Irrlicht 3D engine I am using for this project can handle 2 types of character animation, Morph Target and Skeletal animation. As we want maximum flexibility in allowing users to upload their own animations, this rules out Morph Target animation, we have to go down the skeletal route, so that animations can be applied to the bones instead of needing to rework the entire model for each individual animation. Irrlicht natively supports 3 skeletal animation file formats, .ms3d (Milkshape 3D), .b3d (Blitz 3D) and .x (DirectX).

I decided to go with Milkshape 3D files as the software is relatively inexpensive and easy to use and is packed with features.

So I set off on my mission of learning to model in MilkShape. I created several models to learn the interface and ways of doing things. I have used 3D Studio Max quite a bit, so that helped me pick it up quickly. When I was sure I had got to grips with it, I started creating a male human character. I hit a few problems with disconnected vertices and broken texture mapping, but by version 4 I had a nice looking nearly finished male avatar.

Tonight I plan to do the finishing touches on the male avatar model, and texture him with a default skin. The next steps will be to create a skeleton for him and a basic stand and walk animation.

When I have an avatar model ready, I will concentrate on creating the code necessary to serve it from the servers and render and control it in-world, and then simulator UDP networking support for other avatar positions and chat.

I'll post an update soon ...