Re: Re-skinning for beginners (that's me)
Posted: Thu Feb 06, 2014 10:43 am
I'll have to test this stuff more extensively when I get time. Had some more thoughts about the whole axle/offset thing.
I was wondering why the default models that use extra wheel layers didn't have lower levels of detail specified, since the game devs seem to have done that where possible. One possible glitch is the shift between instances. As I found when testing skins, the model can be using the A and B skins at the same time, even when the camera is quite close to the train. This would also apply to the B and C skins a bit further out, and so on. This could give problems wth dropping layers from the wheels, since changing the layer offsets will change the rotation speed. If one or more wheels on the same side are using the A skin and others are using the B skin, the drivetrain on that side may appear broken to some degree. Since the shift from A to B happens quite close in, when things are quite noticeable, this could be a problem.*
The most likely solution would be to specify 5 instances (which seems to be standard for body files, etc) and not start dropping layers until the third instance. That would hopefully delay any problems until they would not be noticeable (ie: camera zoomed out far enough). If they are still noticeable at the changeover from second to third instance, dropping layers could be delayed until the fourth. The game engine wont care if the first three instances are identical. It'll just render the code it's given. As long as the last instance has minimal detail (one layer only with no axles or whatever) then most trains in the game should be running at that level most of the time.
It also occurrred to me that the idea of faking quartering by using a different combination of offsets on the left and right sides could work without using axles or whatever to generate the difference in offsets. All that would be required would be to use a different X axis value for the rotation centres on each side. Even if all wheel/axle/whatever layers are mirror imaged on both sides, changing the X axis value for the rotation centres will still stagger the left and right side drivetrains.
IOW, usually it'd be (for example) +3 for the left side and -3 for the right side, which synchronises the two sides. If +3.5 was used for the left side and -4.5 was used for the right, the two sides would be out of synch and would look staggered most of the time. The difference between the two sides would be constantly varying from 0 to 180 degrees, depending on the distance travelled. If carried to excess, the difference in rotation speed would look stupid. If it was fairly subtle it could work quite well.
*This instance changeover thing would only be a problem for drivetrain wheels (if it's a problem at all). Other wheels like truck bogies would be fine since they aren't required to be synched to anything else. Provisional plan for those is to use four layers for the first and second instances (just so thing still look cool when using both first and second instance at close camera range) then drop the middle two layers for the third instance, then drop the innermost layer (the one that does the flange) for the fourth instance, leaving only the outermost layer to give the appearance of the wheel. It should work, AFAICT.
Also, to make the coding easier, I've figured out that the order of the points and faces should be outer layer first, followed by inner ("flange") face, then the two middle layers. Doing it this way simplifies coding the instances, since the last ones can be dropped without requiring any change to point numbering in the ones that are being kept.
I was wondering why the default models that use extra wheel layers didn't have lower levels of detail specified, since the game devs seem to have done that where possible. One possible glitch is the shift between instances. As I found when testing skins, the model can be using the A and B skins at the same time, even when the camera is quite close to the train. This would also apply to the B and C skins a bit further out, and so on. This could give problems wth dropping layers from the wheels, since changing the layer offsets will change the rotation speed. If one or more wheels on the same side are using the A skin and others are using the B skin, the drivetrain on that side may appear broken to some degree. Since the shift from A to B happens quite close in, when things are quite noticeable, this could be a problem.*
The most likely solution would be to specify 5 instances (which seems to be standard for body files, etc) and not start dropping layers until the third instance. That would hopefully delay any problems until they would not be noticeable (ie: camera zoomed out far enough). If they are still noticeable at the changeover from second to third instance, dropping layers could be delayed until the fourth. The game engine wont care if the first three instances are identical. It'll just render the code it's given. As long as the last instance has minimal detail (one layer only with no axles or whatever) then most trains in the game should be running at that level most of the time.
It also occurrred to me that the idea of faking quartering by using a different combination of offsets on the left and right sides could work without using axles or whatever to generate the difference in offsets. All that would be required would be to use a different X axis value for the rotation centres on each side. Even if all wheel/axle/whatever layers are mirror imaged on both sides, changing the X axis value for the rotation centres will still stagger the left and right side drivetrains.
IOW, usually it'd be (for example) +3 for the left side and -3 for the right side, which synchronises the two sides. If +3.5 was used for the left side and -4.5 was used for the right, the two sides would be out of synch and would look staggered most of the time. The difference between the two sides would be constantly varying from 0 to 180 degrees, depending on the distance travelled. If carried to excess, the difference in rotation speed would look stupid. If it was fairly subtle it could work quite well.
*This instance changeover thing would only be a problem for drivetrain wheels (if it's a problem at all). Other wheels like truck bogies would be fine since they aren't required to be synched to anything else. Provisional plan for those is to use four layers for the first and second instances (just so thing still look cool when using both first and second instance at close camera range) then drop the middle two layers for the third instance, then drop the innermost layer (the one that does the flange) for the fourth instance, leaving only the outermost layer to give the appearance of the wheel. It should work, AFAICT.
Also, to make the coding easier, I've figured out that the order of the points and faces should be outer layer first, followed by inner ("flange") face, then the two middle layers. Doing it this way simplifies coding the instances, since the last ones can be dropped without requiring any change to point numbering in the ones that are being kept.