Elvas Tower: New Route Editor for Open Rails - Elvas Tower

Jump to content

  • 208 Pages +
  • « First
  • 18
  • 19
  • 20
  • 21
  • 22
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

New Route Editor for Open Rails Build routes without msts Rate Topic: -----

#191 User is offline   vince 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,314
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 30 September 2015 - 12:10 PM

Thanks!
I looked under the dustbin and found I still have my old hex editor frhed.exe
Old? did I say old? Heh . . .part of the readme:

Quote

-----------------------------------------------------------------------
What is frhed?
Welcome to the "Free Hex Editor", abbreviated with "frhed". Frhed is a
free binary file editor for 32-Bit Windows platforms, like Windows 95,
Windows 98 and Windows NT.

Features include:
- Native 32 bit Windows application: long filenames supported,
editable file size limited only by available system memory.
- small program size (ca. 100K), loads fast. . . . . ect ect. ect.

Hmm . . . lets see now if the win 7 chokes the installer
best, vince

#192 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,364
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 30 September 2015 - 01:17 PM

You should download the OR source code and grep for terrtex or maybe microtex. Somewhere in that result should lead you to the correct sections of code to review. Two differences w/ MSTS RE that you will find are the ability to deal with multiple microtex files per tile as well as hold many more individual terrtex file assignments. MSTS (the sim) can deal with those but not RE. They are added to a tile by Mosaic.

#193 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 30 September 2015 - 02:57 PM

OR sources helps me complement my knowledge about msts formats for some time.

In OR see no difference with additional alpha terrain shaders or with no.
In MSTS only difference is that without alpha shaders half of materials is gone.

Here is an example how terrain shaders array looks:

[I] Materials count  7
[I] Material  0   "DetailTerrain"
[I] 2
[I] -  0   "terrain.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  1   "DetailTerrain"
[I] 2
[I] -  0   "vegetable29_extended.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  2   "DetailTerrain"
[I] 2
[I] -  0   "ploughedfield00_basic.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  3   "DetailTerrain"
[I] 2
[I] -  0   "pole.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  4   "DetailTerrain"
[I] 2
[I] -  0   "wheat00_basic.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  5   "DetailTerrain"
[I] 2
[I] -  0   "US2Farmland4.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  6   "DetailTerrain"
[I] 2
[I] -  0   "US2Farmland2.ace"   1   0
[I] -  1   "microtex.ace"   1   1
[I] 2
[I] +  0   1   0   0   0
[I] +  1   2   0   1   1107296256
[I] Material  7   "AlphaTerrain"
[I] 1
[I] -  0   "terrain.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  8   "AlphaTerrain"
[I] 1
[I] -  0   "vegetable29_extended.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  9   "AlphaTerrain"
[I] 1
[I] -  0   "ploughedfield00_basic.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  10   "AlphaTerrain"
[I] 1
[I] -  0   "pole.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  11   "AlphaTerrain"
[I] 1
[I] -  0   "wheat00_basic.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  12   "AlphaTerrain"
[I] 1
[I] -  0   "US2Farmland4.ace"   1   0
[I] 1
[I] +  0   1   0   0   0
[I] Material  13   "AlphaTerrain"
[I] 1
[I] -  0   "US2Farmland2.ace"   1   0
[I] 1
[I] +  0   1   0   0   0


Also I do not know what purpose is this + array. (terrain_uvcalc in OR sources)

#194 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,364
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 30 September 2015 - 03:44 PM

I'm pretty sure that both programs assume that microtex.ace is present at all times unless it has been replaced by something else (rather rare) in which case there would be a different file name for that.

The point I'm trying to make here is that alternative for the microtex file is not allowed by MSTS RE but is allowed by MSTS the sim. The alternative name is set by Mosaic.

Similarly, MSTS RE has limit on how many unique terrtex files can be specified (I don't recall how many but it is a lot fewer than 64. Again, Mosaic allows you to add more but you still cannot get to 64 (it throws a MSTS message at you.

The bottom line is a new RE should allow as many terrtex files, with unique microtex files as there are tile patches -- 64. It may not be wise to actually use that many but that decision should be made by the route builder, not the software coder.

#195 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 30 September 2015 - 08:42 PM

I did new track placing! Ewerything works just like in MSTS RE.

There are still small bugs, but it is infinitely better than the track placing in v501.

Elewated tracks:

http://i.imgur.com/ax9dVa7.png

View PostThat Genset Foamer, on 12 June 2015 - 03:53 PM, said:

I'm getting fairly decent results using this code. I'm certain all that's left to deal with is to force it to overcome rounding errors in the last couple stages.
[...]

Lemme know if this helps any!

Your code don't work for me. The problem is that it does a solution:
roll (-2PI, 2PI), pitch(-PI, PI), yaw(-2PI, 2PI)
but msts uses something like:
pitch(-2PI, 2PI), yaw(-PI, PI ), roll (-2PI, 2PI)

Finally I ended with solution based on transformating vector 0,0,10 by quaternion:

float qe[4];
float vect[3];
vect[0] = 0; vect[1] = 0; vect [2] = 10;
Vec3::transformQuat(vect, vect, q);
    
float pitch = asin(2*(q[0]*q[2] - q[1]*q[3]));
    
if(vect[2] < 0)
    pitch = M_PI - pitch;
else if(vect[2] == 0 && vect[0] < 0)
    pitch = M_PI/2;
else if(vect[2] == 0 && vect[0] > 0)
    pitch = -M_PI/2;

qe[0] = tan((vect[1]/10.0));
qe[1] = pitch;
qe[2] = 0;


Only pitch is calculated using quat to roll,pitch,yaw equation, but in rare cases something is wrong so I'll probably rewrite it to a vector transformation too.

#196 User is offline   That Genset Foamer 

  • Superintendant
  • Group: Status: Inactive
  • Posts: 1,459
  • Joined: 14-September 12
  • Gender:Male
  • Location:Somewhere on the ATSF 4th District
  • Simulator:OpenRails
  • Country:

Posted 30 September 2015 - 08:49 PM

 Goku, on 30 September 2015 - 08:42 PM, said:


Your code don't work for me. The problem is that it does a solution:
roll (-2PI, 2PI), pitch(-PI, PI), yaw(-2PI, 2PI)
but msts uses something like:
pitch(-2PI, 2PI), yaw(-PI, PI ), roll (-2PI, 2PI)

Only pitch is calculated using quat to roll,pitch,yaw equation, but in rare cases something is wrong so I'll probably rewrite it to a vector transformation too.


Wow...that explains why I was getting strange results when I tried using the original converter program. I'll see if I can carry your fix over to my original Python/MATLAB code! Thanks for sharing it!

#197 User is offline   conductorchris 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,345
  • Joined: 24-March 10
  • Gender:Male
  • Simulator:Open Rails - MSTS
  • Country:

Posted 01 October 2015 - 01:06 PM

Goku, what can we do to help your efforts?
I'm getting excited!
Christopher

#198 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 02 October 2015 - 12:52 PM

Examples of new ui:

- properties: transfer, left
- object placement tool, right

http://koniec.org/tsre5/0/tsregui1.png

- properties: static, left
- terrain tool, right

http://koniec.org/tsre5/0/tsregui2.png

Properties window can be hidden of course.

View Postconductorchris, on 01 October 2015 - 01:06 PM, said:

Goku, what can we do to help your efforts?

I don't know. How you want to help?

#199 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 02 October 2015 - 01:06 PM

I noticed that item tables in tdb and tit files have differences.
Is it only one difference or there are more?

Quote

SignalItem (
TrItemId ( 56 )
TrItemSData ( 398.534 00000002 )
TrItemRData ( 439.369 109.985 -1009.37 -5308 14962 )
TrSignalType ( 00000040 0 4.44213 PKP_SEM_5k_BC )
TrSignalDirs ( 1
TrSignalRDir ( 641.858 109.985 -953.275 -5308 14962 1.30055 )
)
)

SignalItem (
TrItemId ( 56 )
TrItemSData ( 398.534 00000002 )
TrItemRData ( 439.369 109.985 -1009.37 -5308 14962 )
TrSignalType ( 00000040 0 4.44213 PKP_SEM_5k_BC )
TrSignalDirs ( 1
TrSignalDir ( 597 1 0 0 )
)
)


#200 User is offline   vince 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,314
  • Joined: 18-June 14
  • Gender:Male
  • Location:West of the Contental Divide
  • Simulator:ORTS_Running MSTS_Editing
  • Country:

Posted 02 October 2015 - 01:35 PM

View PostGoku, on 02 October 2015 - 01:06 PM, said:

I noticed that item tables in tdb and tit files have differences.
Is it only one difference or there are more?


Speculation alert!

Possibly a signal with two heads?
Or two signal heads facing opposite directions. Note the 439.369 109.985 -1009.37
That looks like tilex, tiley and tilez coodinates. So both entries at same position.

++ Some more comparing TDB -TIT - World files may shed some light on the subject.

I'd respectfully suggest the default Marias Pass signals as worthy of a look as despite being ugly in the extreme they did work (mostly) and they do have double direction signals on a single mast.

nice progress Goku.
Make sure you link this thread in any job resume you send out. If I was running a software firm I'd hire you in a New York minute!
regards and
:sign_rockon:
vince
cute that the forum spell checker flags TDB but not TIT! :discuss_gathering:
ok i'm done . . . :pleasantry:

  • 208 Pages +
  • « First
  • 18
  • 19
  • 20
  • 21
  • 22
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users