The Matrix: Rotations

Discussion of rolling-stock creation & re-painting.

The Matrix: Rotations

Unread postby SMMDigital » Thu Aug 16, 2012 7:22 pm

Does anyone have any idea what lines in the positional matrix of an assets .bin file govern rotation? I know that the last four lines govern x-y-z movement but im having no luck with the other. I have a light that i'm trying to point in the opposite direction by hacking the .bin file with RW_Tools.
SMMDigital
 

Re: The Matrix: Rotations

Unread postby Bananarama » Thu Aug 16, 2012 7:43 pm

I don't recall offhand which line it was. What I do is to export through the asset editor and rotate in the desired direction and angle (need not be perfect), and then adjust the values in the blueprint by hand.
Cheers!
Marc - 3DTrains

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

Re: The Matrix: Rotations

Unread postby Kali » Thu Aug 16, 2012 8:06 pm

This ought to go in a FAQ somewhere, I think.

http://forums.uktrainsim.com/viewtopic. ... 0#p1549720 - just read "top to bottom" instead of "left to right".

Quite easy to knock up a generic spreadsheet for doing single rotation, but if you want to do two angles together they need doing individually.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: The Matrix: Rotations

Unread postby Machinist » Thu Aug 16, 2012 9:40 pm

SMMDigital wrote:Does anyone have any idea what lines in the positional matrix of an assets .bin file govern rotation? I know that the last four lines govern x-y-z movement but im having no luck with the other. I have a light that i'm trying to point in the opposite direction by hacking the .bin file with RW_Tools.

I thought with a 3D Design tool was easy to rotate any object, it's a pain to do that by typeing matrix (as I use to do once I don't have basic model source). IIRC each five positions you have a direction, but the problem is the following 4 positions because if the values are wrong it results in a distorced object therefore it doesn't work. Once I got it indirectly placing a spotlight in a cenario and then checking its coordinates in the scenario bin, but took me hours, I opted to not repeat the experience again, isn't worth the effort... Maybe someday I'll give a try again (maybe is each four positions as Kali mentioned).
Who doesn't have dog, hunts with cat.
User avatar
Machinist
 
Posts: 1105
Joined: Fri Apr 02, 2010 1:02 am
Location: São Paulo, Brazil

Re: The Matrix: Rotations

Unread postby Kali » Thu Aug 16, 2012 10:58 pm

I wrote the post I linked, I know exactly what it is :p matrices like those are very common in 3d graphics, it's very easy to apply transformation matrices to them - basically you just use the top left corner of the overall matrix, and multiply it with a 3x3 transformation matrix - matrix work is practically all I can remember from my graphics programming modules. I couldn't really get it any more concise than that post anyway.

If someone wants to copy it all & stick it in a faq here, go ahead.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: The Matrix: Rotations

Unread postby PapaXpress » Thu Aug 16, 2012 11:12 pm

Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: The Matrix: Rotations

Unread postby Kali » Fri Aug 17, 2012 12:39 am

!!*ok*!!
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: The Matrix: Rotations

Unread postby Machinist » Fri Aug 17, 2012 8:29 am

!!*ok*!! Kali & Papa

@ Kali, by chance do you have (or could create) a spreadsheet for automatic calcs? I never did it in Excel. *!sad!*

Thanks,
Doc.
Who doesn't have dog, hunts with cat.
User avatar
Machinist
 
Posts: 1105
Joined: Fri Apr 02, 2010 1:02 am
Location: São Paulo, Brazil

Re: The Matrix: Rotations

Unread postby Kali » Sun Aug 19, 2012 12:46 am

I did somewhere, but only for single rotations ( and scaling ) - there's far too many combinations to do all of them in one sheet, it's totally unwieldy. I'm sure I gave it out to someone recently, but I don't know what I've done with it.

You can more or less literally put the formula from Wiki into a spreadsheet though.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 2 guests