Elvas Tower: Where does OR find the settings for terrain object and/or shadows? - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Where does OR find the settings for terrain object and/or shadows?

#1 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Owner
  • Posts: 13,460
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 12 February 2019 - 01:53 PM

I prefer not to use the shadow everything option OR has because in most cases track does throw shadows worth the effort to produce them and roads don't shadow at all and so my *.ref file has a shadow setting on everything tall enough to have a shadow.

Where does OR find that?

Similar question... where does OR find the setting that something is a terrain object?

#2 User is offline   Eldorado.Railroad 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 802
  • Joined: 31-May 10
  • Gender:Male
  • Country:

Posted 13 February 2019 - 02:40 PM

View PostGenma Saotome, on 12 February 2019 - 01:53 PM, said:

...because in most cases track does throw shadows worth the effort to produce them and roads don't shadow...


Huh?

Unless Goku's editor has some automagic in it to do this, I have edited world files directly. About a year ago I was writing a program to selectively, from a list, enable/disable dynamic shadows in world files for certain objects. But it was rather hard to develop, and the version I tested with an editor was rather SLOW, especially if you have 100+ world files to process. In the process I lost interest. Yes would it not be wonderful if OR read the darn .ref file for this purpose. Maybe one day I will restart my work, but this winter is proving rather hard to deal with and I am quite tired.

#3 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Owner
  • Posts: 13,460
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 13 February 2019 - 06:01 PM

Where in the world file is the data for dynamic shadows on? Terrain Object?

#4 User is offline   DRelyea 

  • Conductor
  • Group: Status: Active Member
  • Posts: 306
  • Joined: 05-May 13
  • Simulator:ORTS
  • Country:

Posted 13 February 2019 - 06:58 PM

Hi Dave,

The Terrain object data is the line; StaticFlags ( 00040000 ) inside the object entry. It may (or may not) also be in the VDbId entry.

This is an entry for an object not set to terrain object:

Static (
UiD ( 138 )
FileName ( GreenAsh8fl.s )
Position ( -893.089 71.9004 -308.748 )
QDirection ( 0 -0.725373 0 0.688356 )
VDbId ( 4294967295 )
)

This is for an object I did toggle the terrain object box:

Static (
UiD ( 449 )
FileName ( 150m20d1x1.5_1trk.s )
StaticFlags ( 00040000 )
Position ( -806.439 73.2342 330.468 )
QDirection ( 0.0037235 -0.325153 0.00124767 0.945653 )
VDbId ( 4294967293 )
)

Note that beside the Static flag line, the last digit of the VDbId is different.

Track and roads appear identical with regard to the VDbId. Static flag is different.

TrackObj (
UiD ( 332 )
SectionIdx ( 33281 )
Elevation ( 0 )
CollideFlags ( 527 )
FileName ( A2t750r5d.s )
StaticFlags ( 00200180 )
Position ( -619.349 69.4921 476.333 )
QDirection ( 0 -0.126757 0 0.991934 )
VDbId ( 4294967294 )
StaticDetailLevel ( 0 )
)

TrackObj (
UiD ( 267 )
SectionIdx ( 19629 )
Elevation ( 0.00523598 )
CollideFlags ( 527 )
FileName ( JP2Rd151_5r05d.s )
StaticFlags ( 00200100 )
Position ( -779.808 73.581 575.363 )
QDirection ( 0.00260648 -0.0936698 -0.00024522 0.9956 )
VDbId ( 4294967294 )
StaticDetailLevel ( 7 )
)


Can't help with the dynamic shadows.


Doug Relyea

#5 User is offline   vince 

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

Posted 13 February 2019 - 08:14 PM

Hi Dave,

Shadow types are defined in the objects StaticFlags parameter.
Here from my notes:
I also could not find a way to set the Terrain object flag using the route reference file (.ref) or shape definition file (.sd).

The Animate this object flag can be set using AnimShape in the defintion.

Static (
Class ( "<Custom>" )
Filename ( OW_Pmp.s )
Align ( None )
Description ( "Oil Well Pump" )
AnimShape ( )
)

This sets a bit in the StaticFlags in the world file (.w).

Static (
UiD ( 52 )
FileName ( OW_Pmp.s )
StaticFlags ( 00080000 )
Position ( -122.686 1 -733.463 )
QDirection ( 0 0 0 1 )
VDbId ( 0 )
)

The shadow values are also set in the StaticFlags.

shadow
none:   	StaticFlags ( 00000180 )
round:      	StaticFlags ( 00002180 )
rectangular:    StaticFlags ( 00004180 )
treeline:   	StaticFlags ( 00008180 )
dynamic: 	StaticFlags ( 00010180 )

 The StoreMatrix element in the route reference file also sets a bit in StaticFlags 
but I don't know what effect this has on the simulator.
 
with
StoreMatrix ( )
StaticFlags ( 00000180 )

without
StaticFlags ( 00000080 )

Adding ESD_No_Visual_Obstruction () to the .sd file sets a bit, StaticFlags ( 00000080 ), also with unknown function.


Regards,
vince


#6 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Owner
  • Posts: 13,460
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 13 February 2019 - 09:10 PM

Well... isn't that interesting. Looks to me very much like TSRE appears to be ignoring them.



Oh... I see now... he ignores what I define as the default shadow setting in the ref file in favor of his program using a selection in the properties window as the default instead of an optional over-ride. Pretty G-D presumptuous of him.

This'll be a PITA to fix....

#7 User is offline   vince 

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

Posted 13 February 2019 - 09:54 PM

View PostGenma Saotome, on 13 February 2019 - 09:10 PM, said:

Well... isn't that interesting. Looks to me very much like TSRE appears to be ignoring them.



Oh... I see now... he ignores what I define as the default shadow setting in the ref file in favor of his program using a selection in the properties window as the default instead of an optional over-ride. Pretty G-D presumptuous of him.

This'll be a PITA to fix....


Dave,

The ref file is only used when placing an object setting the StaticFlags according to what is defined in the .ref file.

A route does not need a ref file present to run either in MSTS or Open Rails.
If display shadows are enabled in TSRE the data is read from the objects static flags parameter.

regards,
vince.

#8 User is offline   Genma Saotome 

  • Owner and Admin
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Owner
  • Posts: 13,460
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 13 February 2019 - 10:49 PM

Vince. perhaps I was not clear.... the .ref file has Shadow (Dynamic) set for a very large number of rows in this .ref file. I used TSRE to place them. The world file I am looking at right now for these objects does not include any Staticflag() lines for any Static object I placed w/ TSRE.

Here are some world file entries (n.b. I converted the world file from many lines per entry to just one so I can get it into excel):
	Static (	UiD ( 469 )	FileName ( WP_Orchard3_09x25.s )	Position ( 0 58.1276 342 )	QDirection ( 0 0.707107 0 0.707107 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 470 )	FileName ( WP_Orchard3_15x25.s )	Position ( 206 55.3541 512 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 471 )	FileName ( WP_Orchard3_11x25.s )	Position ( 76 57.3518 1024 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 472 )	FileName ( WP_Orchard3_07x25_Tri_R.s )	Position ( -16 58.1328 1024 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 473 )	FileName ( WP_Orchard3_11x25_Tri_R.s )	Position ( 198 55.7692 0 )	QDirection ( 0 1 0 0 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 474 )	FileName ( WP_Orchard3_25x25.s )	Position ( 18 57.4908 0 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 476 )	FileName ( WP_Orchard3_15x25.s )	Position ( -178 58.8587 0 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 533 )	FileName ( WP_Oak_26a.s )	Position ( -942.499 62.2323 29.4793 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)
	Static (	UiD ( 534 )	FileName ( WP_Oak_26a.s )	Position ( -697.634 61.8632 -58.8749 )	QDirection ( 0 0 0 1 )	VDbId ( 4294967295 )	)


and some ref file entries that include some of the above (nb: all my ref file data is one line per entry):
	
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_03x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 03x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_05x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 05x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_07x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 07x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_07x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 07x25 Triangle Left" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_07x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 07x25 Triangle Right" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_09x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 09x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_09x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 09x25 Triangle Left" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_09x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 09x25 Triangle Right" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_11x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 11x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_11x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 11x25 Triangle Left" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_11x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 11x25 Triangle Right" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_15x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 15x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_17x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 17x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_17x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 17x25 Triangle Left" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_17x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 17x25 Triangle Right" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 T1" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 T1" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 T2" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 T2" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_L.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 Triangle Left" ))
Static ( Class ( WP_Orchard ) Filename ( WP_Orchard3_25x25_Tri_R.s )		Shadow ( DYNAMIC )	Description ( "Orchard01, 25x25 Triangle Right" ))


Have I misunderstood something (won't be the first time)?

#9 User is offline   vince 

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

Posted 14 February 2019 - 09:19 AM

View PostGenma Saotome, on 13 February 2019 - 10:49 PM, said:

Vince. perhaps I was not clear.... the .ref file has Shadow (Dynamic) set for a very large number of rows in this .ref file. I used TSRE to place them. The world file I am looking at right now for these objects does not include any Staticflag() lines for any Static object I placed w/ TSRE.
....................................snip..............................................
Have I misunderstood something (won't be the first time)?

Gd morning Dave,
Maybe I'm not understanding . . .
I've been using using TSRE's multiple object select process to turn on Dynamic Shadows for selected trackside objects; gantries, vegetation structures and such. (Select object, right click, and choose 'Select Similar' 1x1 or 3x3) This works fine. Also the 'Copy Flags' button in TSRE works fine. Still can't set Dynamic Shadows for Forest Objects though through any method. This was true in MSTS also as I recall.

I've not experienced or checked if TSRE follows the ref file (and sets the StaticFlags parameter in the W file) when placing an object.
I agree it must but I have never checked if it does. oops.....I thought all Static Objects needed a StaticFlags parameter but that was an assumption . . . assumed because I never had a problem with shadows.I see now it needs a closer look.

I did do this long ago with MSTS and that's when I made those notes I attached to my post yesterday.
I'll dig a little deeper into this today and report back

regards,
vince

#10 User is offline   Goku 

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

Posted 15 February 2019 - 10:23 AM

View PostGenma Saotome, on 13 February 2019 - 09:10 PM, said:

Well... isn't that interesting. Looks to me very much like TSRE appears to be ignoring them.

TSRE does not ignore shadow flags. Enable option "MSTS Shadows" in Settings menu to see shadows only for objects that have Dynamic shadow enabled. MSTS "static" shadows are not visible, but you can choose them.

View PostGenma Saotome, on 13 February 2019 - 09:10 PM, said:

Oh... I see now... he ignores what I define as the default shadow setting in the ref file in favor of his program using a selection in the properties window as the default instead of an optional over-ride. Pretty G-D presumptuous of him.

Yes. Ref file loading was never fully finished.

  • 2 Pages +
  • 1
  • 2
  • 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