Some Projects

Post your FREEWARE 'Works in Progress' here!

Re: Some Projects

Unread postby trainboi1 » Fri Jan 13, 2017 12:06 pm

mrennie wrote:In the "Control values" section of the car's "Wagon blueprint", you need two controls called "DoorsOpenCloseLeft" and "DoorsOpenCloseRight", minimum value 0 and maximum value 1. For each of those controls, in the "Interface elements", add an "Exterior animation" element with the "Anim style" set to "Toggle".

Animate the doors (left and right, or front and back) and export the animations separately for left and right (actually, my cars have end doors, so I open and close them both at the same time regardless of which side the platform is on, therefore I export the entire doors animation to a single .ia file).

In the car's Wagon blueprint, reference that animation in an "Animation" element in the "Anim set" within "Render component". For example, in my coach caboose, I added an element with "Animation ID" set to "Doors" and "Animation name" referencing "RailVehicles\Passenger\Coach\Default\Coach\Animations\CabooseCoachDoors.IA".

Then, in those control values ("DoorsOpenCloseLeft" and "DoorsOpenCloseRight"), set their "Animation ID" to the appropriate animation (in may case, I set them both to "Doors").

Thank you, Mike. I had figured out the wheels but this was a huge help.

buzz456 wrote:As far as the textures are concerned adding a darker alpha layer will get rid of the shine.

That's just it - no matter how light or dark I made the shine it appeared the same in-game. After changing the material from TrainBumpSpecEnv to TrainBumpEnvMask the shine disappeared altogether, both of them regardless of what was actually contained in the environment map. I suppose I could try TrainBumpSpecEnvMask or sommat...

I've also noticed that in QD there are coupling conflicts between my car and any other railway car. I'm messing with creating my own couplings to try and figure it out.
Last edited by trainboi1 on Fri Jan 13, 2017 12:55 pm, edited 1 time in total.
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby mrennie » Fri Jan 13, 2017 12:29 pm

The best shaders to use are TrainBumpSpecEnvMask.fx and TrainSpecEnvMask.fx.
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby trainboi1 » Fri Jan 13, 2017 1:44 pm

mrennie wrote:The best shaders to use are TrainBumpSpecEnvMask.fx and TrainSpecEnvMask.fx.

And for glass? I'm using TrainGlassWeatherEffects.fx and the glass looks perfect in the shadows, but it looks like this in the light:
Image
That is in QD by the way...the front coupler works; the rear coupler does not. The shine is (finally) under control - thanks Mike!
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby Bananarama » Fri Jan 13, 2017 2:31 pm

TrainGlassWeatherEffects.fx is for viewing out from a passenger/locomotive view. Use TrainGlass.fx for the exterior windows.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Some Projects

Unread postby trainboi1 » Fri Jan 13, 2017 2:58 pm

Hack wrote:TrainGlassWeatherEffects.fx is for viewing out from a passenger/locomotive view. Use TrainGlass.fx for the exterior windows.

No dice with that material either...
Image
At this point I feel I should show what my textures actually look like:
Image
I've tried lightening and darkening the environment map (anywhere from solid white to solid black) as well as screwing with the texture itself, neither of which met success. Is there anything else I should look for?

Oh, additionally, there's this problem:
Image
The coupler spawns in the correct position, but whenever I couple to anything, it shoots forward. I've found that the pivot is (as the wiki says) the controller for where the coupler spawns, but the receiving point is definitely NOT where the car couples because I've actually set it to the other end of the car to prove to myself just how it effects nothing. I have absolutely no idea how or why the coupler shoots forward on coupling, but it does.
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby mrennie » Fri Jan 13, 2017 3:08 pm

I use 3DCrafter, so the nomenclature for things is different from 3DStudioMax or Blender, but you might need to make sure that you've set the Transparency flag along with TrainGlass.fx. In 3DC, you have to write Transparency in the Tx Alpha field of the material's custom fields (it's right below where you write TrainGlass.fx). Have you put your texture file into the Specular Map slot as well as the Primary Texture slot, so that the alpha channel gets picked up?
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby mrennie » Fri Jan 13, 2017 3:11 pm

For the couplings, check out this page ... http://www.christrains.com/ts_faq_pivotcouplings.html
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby trainboi1 » Fri Jan 13, 2017 5:22 pm

mrennie wrote:I use 3DCrafter, so the nomenclature for things is different from 3DStudioMax or Blender, but you might need to make sure that you've set the Transparency flag along with TrainGlass.fx. In 3DC, you have to write Transparency in the Tx Alpha field of the material's custom fields (it's right below where you write TrainGlass.fx). Have you put your texture file into the Specular Map slot as well as the Primary Texture slot, so that the alpha channel gets picked up?

The alpha channel is getting picked up just fine; if you look closely, even in the sunlight you can see through the windows. I'm not sure what exactly a "transparency flag" would be but I'd assume that without it you couldn't see the interior as here:
Image
Image
Pardon me if you're not talking of the actual transparency, but that doesn't seem like the problem to me.

I read through that whole Christrains article, and while it was useful in re-evaluating my pivots and collision points, the coupling problem still persists. He writes of Buckeyes: "At this time I have not had a chance to research an easy formula for the pivot points for buckeye couplings." I tried the bar coupling formula, but to no avail.
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby mrennie » Fri Jan 13, 2017 6:49 pm

The transparency of the windows is very sensitive to the range of colours used in the texture file. I had to experiment a lot before I got to something that worked well enough. I'll send you the file I use with TrainGlass.fx so that you can try it out and see if it makes a difference.
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby mrennie » Fri Jan 13, 2017 7:10 pm

trainboi1 wrote:I read through that whole Christrains article, and while it was useful in re-evaluating my pivots and collision points, the coupling problem still persists. He writes of Buckeyes: "At this time I have not had a chance to research an easy formula for the pivot points for buckeye couplings." I tried the bar coupling formula, but to no avail.


Here's what works for me when using Buckeyes:

In the coupling blueprint ...

Pivot type = "Mid point".
Min distance = 0
Max distance = 0.1
Target distance = 0.05

In the engine blueprint ...

Make the longitudinal position of the coupling receiving point 0.772168 further from 0 than the coupling pivot. For example, if the rear coupling pivot is at -4.636209, the rear coupling receiving point would be -5.408377.

Make the (Back or Front) pivot X value 0.251833 nearer to 0 than the (Rear or Front) coupling receiving point.

Don't use the coupling gizmos in the 3D view to set the positions. Close the 3D view and edit the values in each Matrix instead. The longitudinal position is in the cell in column 2 row 3.

Also make sure that the Collision centre X and Collision Length are such that the collision box doesn't cover the coupling receiving points (actually I go even further and make sure it doesn't cover the coupling pivots either). That'll prevent any possibility of the cars flying apart explosively when they couple up.
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby trainboi1 » Fri Jan 13, 2017 9:01 pm

mrennie wrote:
trainboi1 wrote:I read through that whole Christrains article, and while it was useful in re-evaluating my pivots and collision points, the coupling problem still persists. He writes of Buckeyes: "At this time I have not had a chance to research an easy formula for the pivot points for buckeye couplings." I tried the bar coupling formula, but to no avail.


Here's what works for me when using Buckeyes:

In the coupling blueprint ...

Pivot type = "Mid point".
Min distance = 0
Max distance = 0.1
Target distance = 0.05

In the engine blueprint ...

Make the longitudinal position of the coupling receiving point 0.772168 further from 0 than the coupling pivot. For example, if the rear coupling pivot is at -4.636209, the rear coupling receiving point would be -5.408377.

Make the (Back or Front) pivot X value 0.251833 nearer to 0 than the (Rear or Front) coupling receiving point.

Don't use the coupling gizmos in the 3D view to set the positions. Close the 3D view and edit the values in each Matrix instead. The longitudinal position is in the cell in column 2 row 3.

Also make sure that the Collision centre X and Collision Length are such that the collision box doesn't cover the coupling receiving points (actually I go even further and make sure it doesn't cover the coupling pivots either). That'll prevent any possibility of the cars flying apart explosively when they couple up.

Thanks for all the effort you're going through with this; I really do appreciate it and I did exactly what you say, but unfortunately all it has done is shift the coupled mesh down:
Image
And yes, the coach coupler is moved back, but only because I physically moved it back in Blender. As you can see, the RS-1's coupler is still hard pressed into the pocket.
Who the heck knows what's going on at this point? I certainly don't. I assumed the "pivot X value" was Column 1 Row 3 because that's the only value in the pivots that wan't 0 or 1 other than the longitudinal position. Apparently that is not the case...or maybe I simply need to move the receiving position 0.251833 farther from 0 rather than the pivot value nearer? I honestly have no idea at this point.

Also, thanks for the PM'ed texture, although at first it didn't work, and then it did work, and then I took the texture out and it worked anyway. So now (for some reason) it works despite having the same setup as it originally did. !**conf**!
Image
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby mrennie » Sat Jan 14, 2017 7:44 am

trainboi1 wrote:I assumed the "pivot X value" was Column 1 Row 3 because that's the only value in the pivots that wan't 0 or 1 other than the longitudinal position. Apparently that is not the case...or maybe I simply need to move the receiving position 0.251833 farther from 0 rather than the pivot value nearer? I honestly have no idea at this point.


It's column 2 (second from the right, third from the left). Column 1 row 3 is the height.

trainboi1 wrote:Also, thanks for the PM'ed texture, although at first it didn't work, and then it did work, and then I took the texture out and it worked anyway. So now (for some reason) it works despite having the same setup as it originally did. !**conf**!
Image


Strange *!lol!*
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby trainboi1 » Sat Jan 14, 2017 11:39 am

mrennie wrote:It's column 2 (second from the right, third from the left). Column 1 row 3 is the height.

Okay, if you'd humor me with some clarification at this point...

The matrices look like the following

0 1 2 3
0 1 0 0 0
1 0 1 0 0
2 0 0 1 0
3 0 p q 1
Where as I understand it, p is the height and q is the longitudinal position.

So Column 2 Row 3 (as I understand it from an older post) should have the receiving point 0.772168 further from 0 than the pivot point. The question that remains for me concerns this:

mrennie wrote:Make the (Back or Front) pivot X value 0.251833 nearer to 0 than the (Rear or Front) coupling receiving point.


What, then, is the "X value" as described here? Certainly it's not row 2 column 3 because that is the longitudinal position as you described in that same post. Neither is it row 1 column 3, since that is the height, and I assume it's none of the fields with "0" entered because it's impossible to get 0.251833 nearer to 0 from 0. I know that Column 0 row 0 and Column 2 row 2 have to do with rotation, so it either has to be column 1 row 1 or column 3 row 3. The latter gets this:
Image
(I'd show you the coupled end but I can't actually find the coupler)
While the former gets this:
Image
(Again, couldn't find the couplers here)
So, then, I have no idea what else to test.
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

Re: Some Projects

Unread postby mrennie » Sat Jan 14, 2017 1:30 pm

trainboi1 wrote:Okay, if you'd humor me with some clarification at this point...

The matrices look like the following

0 1 2 3
0 1 0 0 0
1 0 1 0 0
2 0 0 1 0
3 0 p q 1
Where as I understand it, p is the height and q is the longitudinal position.


That's right. The matrix you've shown would be for the front coupling pivot. The rear coupling pivot would be almost the same except that it would have -1 in row0col0 and row2col2.

trainboi1 wrote:So Column 2 Row 3 (as I understand it from an older post) should have the receiving point 0.772168 further from 0 than the pivot point.


That's correct. So if the matrix for "Front coupling pivot" has the value q, the matrix for "Front coupling receiving point" should have q+0.772168.

Assuming the trucks and couplers are equidistant from the centre of the car, the matrix for "Rear coupling receiving point" should have -(q+0.772168).

trainboi1 wrote:The question that remains for me concerns this:

...Make the (Back or Front) pivot X value 0.251833 nearer to 0 than the (Rear or Front) coupling receiving point....

What, then, is the "X value" as described here?


It's not in any matrix, it's the elements that are just underneath the "Ease of derailment" element. To be clearer, they're called "Front pivot X" and "Back pivot X".

So, if "Front coupling receiving point" is q+0.772168, "Front pivot X" is q+0.772168-0.251833 = q+0.520335.
"Back pivot X" would be -(q+0.520335).


Here's an example taken from one of my cars:

Rear coupling pivot
-1 0 0 0
0 1 0 0
0 0 -1 0
0 0.9049461 -4.636209 1

Rear coupling receiving point
-1 0 0 0
0 1 0 0
0 0 -1 0
0 0.9049461 -5.408377 1

Back pivot X: -5.156544
Back pivot Y: 0.9049461
User avatar
mrennie
 
Posts: 3219
Joined: Wed May 30, 2012 12:22 pm

Re: Some Projects

Unread postby trainboi1 » Sat Jan 14, 2017 2:28 pm

mrennie wrote:It's not in any matrix, it's the elements that are just underneath the "Ease of derailment" element. To be clearer, they're called "Front pivot X" and "Back pivot X".

Bah, I keep forgetting those exist... *!embar*!
We have...some progress. Not working, but not bad either.
Image
Luckily I managed to get auto naming to work first time...

*Update*
Slightly improved messing and I get this:
Image
So, the question is how to make the loco(or adjacent car) coupler move out 18cm and pull the whole arrangement back about 30cm...I'm going to continue messing but so far this is the closest I've got.
trainboi1
 
Posts: 80
Joined: Tue Nov 29, 2016 11:06 pm

PreviousNext

Return to Freeware WIP

Who is online

Users browsing this forum: No registered users and 2 guests