Page 1 of 1

How To Create and Add Child Objects

Unread postPosted: Sun Mar 27, 2016 5:13 pm
by ZekTheKid
Not sure if this is the right place, but I'm trying to edit the radiators of the Kuju GE ES44AC and add some child objects as well, but I'm completely clueless.

Anyone know a tutorial/way on what to do? !**conf**!

Re: How To Create and Add Child Objects

Unread postPosted: Sun Mar 27, 2016 10:41 pm
by jalsina
I do it by duplicating an existing child of the same type I want to get. It is just hacking using RW_Tools bin editor (xlm).
Basically the matrix is to displace, scale and rotate the object. The child points to a xml that at the same time calls a textured GeoPcDx.

There are children of several types (lights, particles, cargo component, objects, sounds, etc.). In your case it is about adding objects children in your engine bin (xml).

If the Geo is yours you could add children in the Geo too.
I think you better take a look to this tutorial to manage the matrix, that I started to use with the Abrams tank:
http://railworksamerica.com/index.php/learning/tutorials/item/159-manually-editing-object-position

This is a typical child for an object (the Abrams tank). This one required rotation because the model was oriented to the X axis:

Code: Select all
                  <cEntityContainerBlueprint-sChild d:id="3873">
                     <ChildName d:type="cDeltaString">Tank 02</ChildName>
                     <BlueprintID>
                        <iBlueprintLibrary-cAbsoluteBlueprintID>
                           <BlueprintSetID>
                              <iBlueprintLibrary-cBlueprintSetID>
                                 <Provider d:type="cDeltaString">DTG</Provider>
                                 <Product d:type="cDeltaString">FlatCarPack01</Product>
                              </iBlueprintLibrary-cBlueprintSetID>
                           </BlueprintSetID>
                           <BlueprintID d:type="cDeltaString">RailVehicles\Freight\Flatcar\Default\Vehicle\Tank.xml</BlueprintID>
                        </iBlueprintLibrary-cAbsoluteBlueprintID>
                     </BlueprintID>
                     <Matrix>
                        <cHcRMatrix4x4>
                           <Element>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F0BF" d:precision="string">-1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="00000060561AF23F" d:precision="string">1.13143</e>
                              <e d:type="sFloat32" d:alt_encoding="000000A099991D40" d:precision="string">7.4</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                           </Element>
                        </cHcRMatrix4x4>
                     </Matrix>
                     <ParentNodeName d:type="cDeltaString"></ParentNodeName>
                  </cEntityContainerBlueprint-sChild>


Basically it has a name, a xml address (bin) and the matrix where you will be able to position your object (and rotate or scale it if you need to).
If you duplicate it, change slightly the id number.

If you model the objects to be added with the Z axis orientation (along the engine) you won´t need to rotate but only displacing which is made with the last 3 values.

This is a matrix that doesn´t need rotation but only translation:

Code: Select all
                  <Matrix>
                        <cHcRMatrix4x4>
                           <Element>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000A0B506F23F" d:precision="string">1.12664</e>
                              <e d:type="sFloat32" d:alt_encoding="0000008007FF0840" d:precision="string">3.12453</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                           </Element>
                        </cHcRMatrix4x4>
                     </Matrix>


I hope this can help you a little bit. !!*ok*!!

Re: How To Create and Add Child Objects

Unread postPosted: Mon Mar 28, 2016 4:37 pm
by ZekTheKid
Link is broken.

Re: How To Create and Add Child Objects

Unread postPosted: Mon Mar 28, 2016 7:47 pm
by jalsina
ZekTheKid wrote:Link is broken.

Fixed *!rolleyes!*