Numberboard Child Objects

In this forum you can make SUGGESTIONS for repaints and/or other downloads. If you are suggesting repaints of something, please supply a picture of it. Make it easier for the painter.

Numberboard Child Objects

Unread postby LoganTMT » Thu Oct 22, 2020 12:57 pm

Hey all, I'm in need of help trying to get some new numberboards made for the RRMods GP40-2. I'm doing a private project but I can't seem to get any help on making child objects with autonumbering to be located in the correct locations They need to be... Can someone help me get them working for the locomotive?

Thanks,
Logan Thurman
LoganTMT
 
Posts: 50
Joined: Sun Feb 24, 2019 6:08 pm

Re: Numberboard Child Objects

Unread postby MaineLines » Thu Oct 22, 2020 3:03 pm

Not sure anyone has solved the child object with autonumbering problem yet.
User avatar
MaineLines
 
Posts: 622
Joined: Mon Sep 14, 2009 11:21 am

Re: Numberboard Child Objects

Unread postby EngineerJohn » Thu Oct 22, 2020 3:43 pm

The Tru-Rail guys have but they're a very secretive bunch. Sure you can get in their discord but good luck getting anything out of them as far as knowledge goes.
“A designer must always think about the unfortunate production engineer who will have to manufacture what you have designed; try to understand his problems.” - Raymond Loewy
User avatar
EngineerJohn
 
Posts: 374
Joined: Wed Oct 17, 2018 5:56 am
Location: New York

Re: Numberboard Child Objects

Unread postby Kali » Thu Oct 22, 2020 4:13 pm

If you search for "portable autonumbers" you'll find one of my old threads from about 2013 where I was talking about how to do this for TS2012 - unfortunately I very much doubt the examples from back then will load in the game now ( I have no idea, haven't fired it up in years ) but back then you set the number panels up on a child object as if it was the main object, and then use a script call ( SetText? I think ) to set the number for the child object - nothing more to it than that. I'm pretty sure there was an explanation of how to position them ( or at least I went into it a bit ). Things may have changed massively or not at all, but it might be some use.

Edit: thought I'd expand a bit - unless something significant has changed ( which would be a bit daft at this point ) child object location is a 4x4 matrix, pretty standard in 3d graphcis work; there's a thread here - viewtopic.php?f=9&t=6253 - which may or may not give links to useful tools, and there's a post I made at UKTS about it still extant - https://forums.uktrainsim.com/viewtopic ... 0#p1549720. There's also a Wikip page about matrix transformations.

As for actually locating the object I think I used to pull out the coordinate of the coupler if it was near the end of the vehicle, and then use some guesswork. You can do other things like make a child object of a cage with markings every metre or so, and attach that to the model origin as a giant 3d ruler.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Numberboard Child Objects

Unread postby kris120 » Sun Nov 22, 2020 10:07 am

Much easier, as you do not need to calculate:

Place an object in the editor (scenario editor is perfect as the object is inside the tile of the folder scenery inside the scenario).
Set the angle by which you want to rotate. Rotate the object (e.g. Headlight).
Save the scenario.
Decompile the scenery tile with serz.
Search for "cFarMatrix" inside the xml. You will find something like this:
<Height d:type="sFloat32" d:alt_encoding="0000008071E95F40" d:precision="string">127.648</Height>
Code: Select all
<RXAxis d:numElements="4" d:elementType="sFloat32" d:precision="string">0.9659258 -0.2588190 0.0000000 0.0000000</RXAxis>
<RYAxis d:numElements="4" d:elementType="sFloat32" d:precision="string">0.2588190 0.9659258 0.0000000 0.0000000</RYAxis>
<RZAxis d:numElements="4" d:elementType="sFloat32" d:precision="string">-0.0000000 0.0000000 1.0000000 0.0000000</RZAxis>


Just copy the values in your blueprint, line by line :
Code: Select all
<Matrix>
                        <cHcRMatrix4x4>
                           <Element>
                              <e d:type="sFloat32">0.9659258</e>
                              <e d:type="sFloat32">-0.258819</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0.258819</e>
                              <e d:type="sFloat32">0.9659258</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">1</e>
                              <e d:type="sFloat32">0</e>
                              <e d:type="sFloat32">0.4</e>
                              <e d:type="sFloat32">0.12</e>
                              <e d:type="sFloat32">-0.36</e>
                              <e d:type="sFloat32">1</e>
                           </Element>
                        </cHcRMatrix4x4>

This rotates your child 15° to the right.
Positioning here is 0.4m to the right, 0.12m forward and 0.36m down.
User avatar
kris120
 
Posts: 471
Joined: Mon Jul 22, 2013 3:19 pm
Location: Augsburg, Bavaria, Germany


Return to Model/Repaint Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest