Showing posts with label Scripting. Show all posts
Showing posts with label Scripting. Show all posts

Sunday, August 06, 2006

Progress Update

Here I am, hard at work.... well, not really - I pinched the picture from the Internet since I dont have any screenshots that I can post at the moment.

Im still working on things, but dont have a lot of progreess that I can show right now. Rest assured that Im working on it, and you will see the results sometime soon.

The main thing I have been doing in the last week or so is slowly piecing together all the small bits of script that I have collected, along with some of my own ideas, in order to produce a script that can drive all of the features that I have in mind.

For the moment, Im working on the basics - lights, drivers, doors etc. I will be able to use these functions in all of the traincars that Im currently working on - the 86 class, the Tangara, and even in the side project, which is still coming along slowly, with the animations done, and just a little tweaking of the mesh still to do, before I can finally finish it off with a little scripting.

Scripting doesnt lend itself too well to screenshots, so although I dont have much to show for the last couple of weeks work, I do have some code that is now beginning to take the shape which I had in mind. Bear with me, I'll have things to show you all again soon. Posted by Picasa

Thursday, July 27, 2006

Latest Ramblings

Ive been working with Gmax on and off over the last couple of weeks. I havnt managed to get back in to my obsessive, every day, gmax habit that I was in before, but Im in there at least a couple of times a week recently.

Im about two thirds of the way through my side project, so thats coming along, and Ive done some more on the Tangara in the last few days. I dont have any screen shots, because not much has changed, visually.

Im still working on getting the texture mappings right for the outer body, and have been doing a bit of hand optimising while Im at it. In the last few days I shaved around 50 or 60 polys off of the body. The body itself is around 2300 polys in total, so I think thats a significant saving. It also helps with the texture mapping.

I knew textures would be the hard part. I havnt even started trying to draw in any detail - Im still trying to get the basic shapes mapped out onto the bitmaps. Ive decided to break it down a little. Originally I was trying to map the body to a single 1024 by 1024 bitmap, but Ive now broken that down into two 512 by 512 bitmaps, and will see if that helps. One thing that does help is being able to see how others have done it, so along with all the Auran samples on the Content Creation Art CDs, the side project has also helped in that department.

Im still thinking about the scripting, but that is a while off - I wont be starting on that until I have the control trailer textured so that I can export it to Trainz and test out the scripts. The other reason that it has to be textured now is that once its done, I can begin copying it to create the other cars (9 in total). Since the first one will already be textured, the copies will have most of their textures already in place, and will only need a bit of tweaking, and customisation here and there. It saves me having to go through this frustrating exercise multiple times.

Ive been collecting bits of script for months, and searching the forums for tips and tricks, such as how to tell if you are in driver or surveyor, or how to tell if you're in DCC mode or Cab mode. All of these snippets have been tucked away, and Ive found a few great example scripts which I can use a few pieces from. Many thanks to everyone who releases unencrypted scripts with their freeware - it helps newbies like me learn the tricks and see how they're implemented.

I know there is quite a long way to go. After 9 months, I really wish it was all finished, but theres many more months left to complete all of my currently active projects, and there are many more projects that I want to get started on. Its looking like I'll never get around to some of them - but that is what prioritising is for.

Photo: Rotten Row at Redfern

Tuesday, January 17, 2006

Progress Report

I spent some time this weekend working on the Train Stop, since a couple of people asked about it recently. The model is finished, it has a rough texture, and now, the script finally works.

Trainz Script is even more painful than making textures. It has a hundred different ways to do similar things. You have to figure out which way is the right one for your situation, and despite one method name being similar to another (ie: inferring that they are part of the same method family) they work in completely different ways!.

Take SetMeshAnimationState() for example. I was alternating between that and SetFXAnimationState() since I was not sure which was the right one to use in my situation. Both come from the MeshObject class, but they work in slightly different ways. While SetMeshAnimationState plays through the whole animation once, either forward or in reverse (which is what I wanted), SetFXAnimationState starts or stops the animation loop (which I didnt want). I originally had the animation set up as an effect, but my example script (grabbed from the forums) was using SetMeshAnimationState. Naturally this combination wasnt working. When I finally figured out I needed the FX version of the method for an effect, the animation looped (not what I had in mind). I ended up having to reconfigure the model, in order to use the SetMeshAnimationState method, which is the one I wanted to use all along.

I spent many hours figuring that out, and now finally have it working properly.

A few final steps remain before its ready for the DLS. Im dying to get my green "DLS Contributor" flag, but before I can upload it I have to tweak the model to move its origin slightly, tidy up the script to remove a few unused functions, and redo the textures.

Trainz seems to always render the textures lighter than they really are, meaning that you have to make your textures darker for them to look right. Being slightly colourblind, Im already battling with getting the textures to look right, and on top of that I have to make them look too dark in Gimp. Its never easy.

At least its one step closer to the DLS now.

No real improvements on the Tangara this week. Im three file versions ahead of where I was last week, but thats not really much of a change. The Buffer model still needs finishing, although Im already using it in a couple of routes. That shouldnt take long. I'll probably get to that after I release the Train Stop. Hopefully by the time its ready, the current problems with uploads being rejected for no apparent reason, will be fixed. Posted by Picasa