Thursday, July 07, 2011

Battling the exporter

I managed to get an early draft of the 86 Class into Trainz for testing, and so that I could see what needed to be done to tweak the textures. This picture has a very rough texture on it for the moment.

So I started tweaking and moving things around, re-exported the model, and now it wont show up in any of Surveyor, Railyard, or Driver, in TS2009, despite showing up fine in Asset-X, Pev's Mesh Viewer, and even in CCP. There are no errors in CCP or even in the export process, and this has me stumped. All I can do is keep tweaking the textures and hope that the exporter begins to co-operate. I was even able to drive the one pictured here, but now - nothing.

Each time I've exported a model I've found the exporter to be very picky, especially about materials. At one stage it would just crash Max to the desktop if I renamed one particular texture to the standard .m.onetex naming convention. It exported just fine without that extension. Other times, it has crashed to desktop for no apparent reason, but every time it has been related to the materials.

These exporters have been around for over three years. One would think that Auran (N3V) would, from time to time, update the exporters - patching bugs such as these, but unfortunately Auran seem to be of the impression that you can release a piece of software once, then just forget about it. Not so with their flagship product though - they've released 3 or 4 versions of Trainz since the exporters were last updated. They seem to understand the concept of software development only when its directly connected to making them money, but without the exporters, where do they think the content would come from? Without content, JET is just an engine. It does nothing on its own.

Still, I press on. I keep tweaking the textures on the 86 Class, hoping that I'll hit that elusive magical combination that will cause the exported model to show up in Trainz - after all that's what its all about. In the mean-time, Im fiddling with a few side projects that are still in the modelling phase. I don't need to export them just yet so I can model happily without any problems.

Here is a shot from inside the cab. This is the low-res cab that is a part of the body mesh. You will see it through the windows in DCC mode. I tricked the camera to place it inside the cab on a multiple unit set. I've been trying to get the shiny stainless steel effect the way I want it, and I think its getting pretty close. The first thing that struck me about the real cab was how shiny it was. As you can see, there are still parts of the cab, and body that are untextured at this stage.

I've put the 86 Class aside for now and as I mentioned have been working on other things.  One of those things is a route. I want a route that is a) Unmistakably NSW, and b) appropriate for the 86 Class and the Tangara, so I've started putting something together. Ive always been impressed by the detail in the Wadalbavale line, and the sheer size of Pine Ridge, and Razorback, and I'm hoping to eventually come up with something inspired by all three.

I've started with the mountains - inspired by Lithgow being the former home of the 86 Class locomotives. At the highest point the rail is 600m above sea level, and Im gradually working my way down to sea level with some 2 and 3% grades to give a bit of a challenge, and to make good use of the dynamic regenerative braking in the 86 Class. This will be a coal run, down to the port at sea level.   I havnt started on any other sections but there will be other areas to explore as well, and of course commuter trains, which is where the Tangara comes in.

One major thing Im missing is decent Cityrail stations, so Im currently building one that I can throw in there for the time being. I'd like to expand on that and make a series of stations, but that is for the future.  I'd like to build something generic and have options available through scripting, similar to Andi06's station kit.

The Tangara is waiting to be converted to Max. I figure since TRS2006 is no longer supported there is no reason to keep it in Gmax.  The conversion process is a bit bumpy so I've been putting it off, but I hope to have an update on the Tangara in the next post (and some pics).

I'm not going to bother right now with the poly counts that I used to add to my posts, suffice to say the 86 Class in the pictures is about 18,000 polys and will use LOD by the time its ready for the final export.
Posted by Picasa

Tuesday, June 14, 2011

Updated Buffers on DLS

I've uploaded new versions of the NSW Wooden Buffers to the DLS, and they should be available soon. The good news is the flicker is Totally Gone!... the bad news is I couldn't get my new arrangement of the lamp working the way I wanted, so I went back to the old way (Two separate models).  I'd eventually like to script it and have just a single model portray both versions, with the lamp activated or hidden by a script, but that's a low priority right now.

I had a look at the NSW Train Stop (and the UK one I also did) but cant see whats wrong with it. In TS2009, the script seems like it isnt running at all. Weird.  I noticed that someone else has "fixed" the Train Stops as there is a new version on the DLS, unfortunately I cant download anything due to the servers being busy.  Its so annoying to not be able to retrieve a copy of your own content.

Anyway, when I get the updated Train Stop, I'll first see if I can fix its Trainz Build. These were intended for TRS2006, but someone has set it up for TC or above. Then I'll see if I can figure out why the script isn't running. Strangely enough, the object I modelled the script from, still runs fine with its original script.

I don't have any pics right now, but Ive spent some time texturing the 86 Class.   Its *so* close to being ready for export, but there is a lot of work to be done after that (scripting) so dont think that means its due for release any time soon.   I have the body about 70% textured, with just the small fiddly bits left to map.   Once its in Trainz, I can concentrate on the Tangara while I start putting the scripts together.

The 86 Class and Tangara will share much of the script (They're both Electric Multiple Units, so share similar functions) so both models will benefit. I expect the 86 Class will be on my test track for some time, while it gets all its scripting and other planned goodies. I anticipate the Tangara will be ready before it.

With the Tangara, Ive been thinking its time to upgrade it to 3DS Max. It was originally intended for TRS2006, but here we are at TS12.   I still have to catch up on my Trainz versions but I will get TS12 as soon as I can and probably aim the Tangara at TS2009 now.  At this stage, I havent started to convert it, but I have a fairly good process for exporting from Gmax to 3DS Max, so when I get started that part of it shouldnt take long.

I'll see if I can have some pictures of the latest work ready for next time.

Friday, June 03, 2011

Slow Progress

Well, its been some time since my last update. The last couple of years have taken me in different directions, but all the while, this project has been in the back of my mind.  I know I have (or had) a lot of people watching, and by now some of them may have given up, and I dont blame them, but the wheel has turned and I've found myself back here again.

For many years I've wanted to build a model railway, but never had the space for it. It occurred to me recently that these days, with the various rail simulators available, younger people would probably just build a virtual railway than use up an entire room for their hobby. Virtual railways have a big advantage when it comes to space. you can easily create a layout that is much bigger than anything you could build in a room, and a lot more interactive. I still plan on filling a room with trains one day, but recently I've started building my own virtual railway in Traiinz TS2009.

There are a couple of existing routes that I like. They're big. They're Australian, specifically New South Wales. They're full of NSWGR and SRA content, and they look and feel quite good, but they all have similar problems.  I considered updating one of them with better content, replacing thousands of signals with the NSW ones available on the DLS, replacing all the stations with better ones, etc, etc. About the only thing I didnt have to change was the scenery.

Add to that the problem of older content not working properly, or failing to load entirely, I came to the conclusion that I would have to build much of it myself, from scratch, right down to the 3D models, since a lot of the classic NSW content are progressive meshes which are no longer supported.

So I've decided to make this a long term project, like a physical model railway, that I work on when I have the time. Anything I produce will be available in some form or other, and I may even consider making them available for other rail simulators as well.

The first thing I need to do is fix my own content. The buffers have always flickered, and I have a new version without any flicker that I am putting some final touches on. I changed it a little and now attach the lamp to the buffer, and then the corona to the lamp, but Im having a little trouble getting the corona to attach to the right point. I'm not even sure at this stage that its possible. I'll figure it out eventually.

The Train Stop will be next. I only just realised that stopped working, and even worse, causes other signals on the route to fail.  Its a scripting problem, and I'll have that sorted out, and updated on the DLS as soon as I can.

Then its back to the Tangara and the 86 Class.  I really miss the real 86 Class and finishing off the model will at least let me see it running again.  I have another side project as well, but I cant talk about that. Im updating someone elses content, and will have to waiit until its done and I contact them again before I can announce it. Its not a big job, just a little time consuming.

Finally theres my route. That will be put together over time. Since the 86 Class were built for hauling coal and container trains through the mountains, naturally it features mountains. At the highest point the rail is 600m above sea level, and I plan to have a port at sea level too, so it's going to be big, with lots of gradients, and will have a city area for the Tangara and other commuter trains.

It sounds like Im taking a lot on, when its already taken me a long time to produce what I've already started, but I'm hoping that by combining it all together, and adding a route that I'll have the full package and that will motivate me to work on some part of it or other. One of the problems of just working on the 3D models is that when I get stuck, or need a break from modelling, I just stop. This way I'll have other things, like the route to go on with.

So thats the plan.  As soon as I have the buffer and Train Stops fixed, I'll add an update on my progress here. I also have some Tangara and 86 Class updates to write as well.

Tuesday, October 20, 2009

Heavy Duty High Speed Panto

Yes, I know Ive been away for far too long. It happens. The truth is that Im not really good with textures. The texture mapping is tedious and often needs to be done several times until you get a map layout which you're happy with - moving things around means moving where the images will be, so you have to change the image template as well as the UVW unwrapping. Im also not very artistic, so even with a good map, the final textures probably wont be as good as many out there (though they will be better than some Ive seen) but Im not comfortable giving my source models to someone else to texture for me.

After a while I get bored and frustrated with it, and leave it for a while, and thats when other things come along which take my time, and sometimes I dont get back to this as soon as I would like - there is also the dread of knowing that when I do start on it again, I will be faced with whatever problem caused me to put it aside in the first place.

Having said that, I do think about it a lot, and I do try to get some work done occasionally. Ive always said Im doing this for me, primarily, so unfortunately its going to have to be at my pace. You may not realise it, but I too am dying to see these models in Trainz! I have big plans for them, script-wise and that will take time itself, so the sooner the models are ready, the better.

Over the last few days, Ive been playing with the 86 Class. At first (as always happens) it took me a few hours to get familiar with the process, and with the model again. I tweaked some of the conversion I did previously (I had recently converted the 86 Class from Gmax to Max, to take advantage of the new TRS2009 features). After that, I started finishing up the external parts - pantographs and bogies. I still have about half of the bogie to texture map, and I also want to add a little more mesh to give it some more detail.

I converted my Heavy Duty Cross-Arm panto to Max and textured it. That was fairly easy since the texturing is very simple on such a small model, then I took a copy of the Tangara's light weight High Speed panto, and started converting it to the Heavy Duty version used on the 86 Class. The base is done - it hasnt changed much - and I just finished the contact assembly (photo). All thats left for it is the arm, and adjusting the piston and animation (also easy), and then a simple texture and test fitting it to the loco.

Ive set out to create a standard for Pantographs. There has always been confusion about this, and its not easy to determine exactly how high the wire should be. Briefly, the Panto base sits at 4M above the rail, the wire is 1.6M higher (at 5.6M) and the base mounts on a 2m x 2m area on the roof of the train. Using standard measurements like this seems to work well, and allows any of my pantographs to be interchanged with the others, and they all fit as they should on the train. This will make it easy to create both a cross arm, and a high speed version of the 86 Class (for example) since at times, both types have been used.

File Version: 03
Poly Count: 816

Note: The poly count shown here is for the Gmax model in progress. The count will generally be higher than that of the finished in-game model since it includes duplication, tools, jigs, and other pieces which may not be part of the final model. It may also include parts which are generally counted separately, such as pantographs, interiors, or bogies. LOD modelling will be used to further reduce in-game polygons.
Posted by Picasa

Tuesday, June 02, 2009

Reader Question: How do I do it?

Michaeltvs asked how I approach modelling - Do I use a lot of separate shapes, or do I start with one segmented box and twist/taper it into he shape I want?

3D Modelling is one of those things where there are often many ways to do a particular task. Ive been away from this project (and 3D modelling) for a few weeks (unfortunately other things often creep into my life) so my memory of exactly how I do it, may not be perfect. To see my personal approach to modelling, it may be better to browse through older posts.

I tend to start with a primitive shape that matches best to the piece Im trying to build - a plane or box for floors, cylinder for poles etc, and then adjust it to the size/shape I need. As for aligning it. I find the best way to get it exactly where you want it is to go around all of the vertices, and just move them to where they should be, one by one. For example, if one part ends at 6.350m from the origin on a particular axis, the adjoining vertices should be located at the same position - not at 6.355, or some other random point that the whole object "seems" to align at visually, then just weld the aligned vertices together.

As far as alignment goes. as I have said before, there is a mathematical harmony at work. If you use reasonable assumptions and then think like a construction engineer, things just seem to fit together. I have had a few alignment problems at times. Sometimes its as if things move slightly after I have placed them. I put this down to the precision of Gmax/Max not being what I expect it to be. I find I check things periodically when precision counts, and if its not right, I can spend hours tweaking it until it is!

Its hard to explain, but, its its pretty much just math, and having a good idea in your head of the 3D relationships between the parts, and then a lot of tweaking verticies!

To answer the specific question better, each piece is many distinct shapes all joined together. The stairwells for example... They're linked into a single object now, but they started as lots of seperate boxes, with chamfers added, faces removed, and then moved into position and welded together.

The interior and exterior started as boxes but now resemble a collection of planes more than anything else, since the boxes have been joined together and all the backfacing faces have been removed.

Thats not to say that everything needs to be welded into a single object. Its better to keep parts as separate as possible for as long as possible, so that they can be reused or modified, if needed. Of course, theres little point in reusing a box, but a set of stairs, or a chair, can be reused easily, without having to build a new piece. You can "save selected" parts to disk, and build up a parts library, that can be imported into any model! More advanced modellers may even reuse a part by referrence, allowing any changes made to the original piece to be automatically applied to each of the copies! This saves a lot of time with things like seating, where there may be hundreds of copies of the original object!

Once the model is complete, *then* you can save out a "final" copy, which can be joined together to form a single object ready for importing into Trainz!

The Tangara is broken up into several distinct objects. The main ones are the exterior, interior, stairs and upper deck, lower seats, upper seats, and other various small objects such as the drivers console, drivers chair etc. Naturally the doors, bogies and pantograph are separate pieces, as these will need to be exported separately to become attachments.