Elvas Tower: Forest Enrichment - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 9 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Forest Enrichment Enhancing Forest Region Definition Rate Topic: -----

#11 User is offline   charland 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,516
  • Joined: 13-April 08
  • Gender:Male
  • Location:Brockville, ON, CA
  • Simulator:MSTS/OR
  • Country:

Posted 17 November 2015 - 01:52 PM

While we're discussing Forest Regions... can we double or triple the density without having to put two or three regions on top of each other? Northeastern forests are dense enough they corm a canopy over the ground, MSTS forests placed at 5000 threes per something aren't even close.

Paul :-)

#12 User is offline   SVRy_Steve 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,994
  • Joined: 07-January 04
  • Gender:Male
  • Location:Chiloquin, OR
  • Simulator:OR
  • Country:

Posted 17 November 2015 - 02:20 PM

See my post from way back when, http://www.elvastowe...__1#entry110394

Steve

#13 User is offline   eolesen 

  • Superintendant
  • Group: Private - Open Rails Developer
  • Posts: 1,546
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 18 November 2015 - 10:17 AM

View Postcharland, on 17 November 2015 - 01:52 PM, said:

While we're discussing Forest Regions... can we double or triple the density without having to put two or three regions on top of each other? Northeastern forests are dense enough they corm a canopy over the ground, MSTS forests placed at 5000 threes per something aren't even close.

Paul :-)



There's already a fix for that -- set a higher density per KM value in the .W file. ORTS *will* give you 100,000 trees per KM..... ;)

Just be aware that the RE will promptly overwrite that value to what it thinks should be a reasonable value.

#14 User is offline   longiron 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 3,179
  • Joined: 25-July 08
  • Gender:Male
  • Location:Manasquan, NJ
  • Simulator:Open Rails, MSTS editors
  • Country:

Posted 18 November 2015 - 10:59 AM

View PostJames Ross, on 17 November 2015 - 07:13 AM, said:

This is a unique syntax (the semicolons) so I'd like to avoid that, but the idea is principally sound - and has come up a few times before, IIRC. Same goes for the suggestion from disc to use shape files.

My intention was not to suggest a new syntax, only to create a discussion regarding ORTS enhancement to the current MSTS forest 'clone worlds"

#15 User is offline   Lutz_s 

  • Fireman
  • Group: Status: Active Member
  • Posts: 162
  • Joined: 31-January 10
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 18 November 2015 - 11:01 AM

Your suggestions having an alternate forest.dat in an Openrails subdirectory can't work unless the way a forest is handled would be changed. At the moment the forest.dat is only read by the editor. You place the forest region in the editor and it saves coordinates and population (how many trees) to the world file. After that, you can change the data in the forest.dat to whatever you want. You will get the same forest as before.
Here is a forest definition I found in a world file:

Quote

Forest (
UiD ( 112 )
TreeTexture ( NR_Gras_LN00.ace )
ScaleRange ( 0.5 1.5 )
Area ( 269 68.5 )
Population ( 619 )
TreeSize ( 3 3 )
StaticFlags ( 00100000 )
Position ( 544.33 186.834 -77.9452 )
QDirection ( 0 -0.105807 0 0.994387 )
VDbId ( 4294967295 )
StaticDetailLevel ( 0 )
)

As you can see there is only an ace-file which is read, the other things are flags, coordinates and so on. You can't even use the ace-file to find the correct definition in the forest.dat. There could be many definitions in the forest.dat, using the same ace-file, but representing different sizes of trees.

I don't know if one can add some Openrails-only parameters to a world file, without having MSTS complaining about that.
Dave posted the idea to use an additonal file, which tells Openrails to read a different definiton for an object in the world file. But this would mean, you have to know the UID of this object in the world file, to do that. So that's a task for the Openrails route editor. And then there is the question, if it's wise, letting the editor write to different files simultaneosly (world-file and world-file-extension-file). Take a look at the MSTS-editor what can happen if one does this. A knew world-file format would be better, I think.

Cheers Lutz

#16 User is offline   longiron 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 3,179
  • Joined: 25-July 08
  • Gender:Male
  • Location:Manasquan, NJ
  • Simulator:Open Rails, MSTS editors
  • Country:

Posted 18 November 2015 - 11:05 AM

View Posteolesen, on 18 November 2015 - 10:17 AM, said:

There's already a fix for that -- set a higher density per KM value in the .W file. ORTS *will* give you 100,000 trees per KM..... ;)

Just be aware that the RE will promptly overwrite that value to what it thinks should be a reasonable value.


My experience is RE will only overwrite the manual entry in the .W file if you click on the forest region and make any kind of change - size, location, etc - to that forest region.

#17 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,771
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 18 November 2015 - 02:45 PM

Then, for example, such replacement data could represent some extended syntax in e.g. a w-005348+014669.wor file:
{
    Forests : {
        26069 : {
            Area : [310.25, 1000.5]
            Population : 621,
            StaticFlags : 00100000,
            Position : [-736.422, 90.931, -909.693],
            QDirection : [0, 0.878681, 0, 0.47741],
            StaticDetailLevel : 0,
            Trees : {
                "weeds.ace" : {
                    UVmap : [0, 0, 1, 1],
                    TreeSize : [2.5, 3.5],
                    ScaleRange : [0.9, 1.1],
                    Probability : 30,
                },
                "US2autofir1.ace" : {
                    UVmap : [0.5, 0, 1, 1],
                    TreeSize : [12, 22],
                    ScaleRange : [0.9, 1.1],
                    Probability : 10,
                },
            },
        },
        26070 : {
            {
                ...
                ...
            },
        },
    },
}

Not too much programming work to make such an addition. Probably doing the same with carspawners would be also easy.

#18 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,488
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 21 November 2015 - 07:10 AM

View Postgpz, on 18 November 2015 - 02:45 PM, said:

Then, for example, such replacement data could represent some extended syntax in e.g. a w-005348+014669.wor file:

I'm torn between hacking it on like this vs the OpenRails subdirectory containing normal STF .W files. I don't feel that comfortable having a file this directly interacting with the MSTS data files be a new format. The car spawners might be a good place to start with defining a whole new format, though, to completely replace the MSTS format.

#19 User is offline   Genma Saotome 

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

Posted 21 November 2015 - 10:52 AM

View PostLutz_s, on 18 November 2015 - 11:01 AM, said:


Dave posted the idea to use an additonal file, which tells Openrails to read a different definiton for an object in the world file. But this would mean, you have to know the UID of this object in the world file, to do that.


No matter how you slice it and wherever you put the salami the fact is somebody will need to do a fair amount of typing in an ordinary text editor. That fact will remain true until such time there is a true OR world editor. It's not hard to do... in fact I estimate about half my route editing time is in a text editor and not RE.

#20 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,771
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 25 November 2015 - 02:22 PM

As an interesting experiment, I have implemented a json world file format with working forest and carspawner elements only. However they have extended functionality. It is possible to reference named carspawner sets in the experimental world file, defined in a separated carspawn.json file, with also adjustable probability of the individual cars in the set. Forests may consist of different type of trees with settable probability. Different trees within a forest can be set by either referencing a different texture, or by referencing the same with a different uv-map.

Changes to the software are in a patch file, recompiling is needed to test it.
Attached File  Exp-JSON-World-CarSpawn-file.zip (56.16K)
Number of downloads: 152

Sample json format world and carspawn files are attached in this zip: Attached File  Routes.zip (1.53K)
Number of downloads: 141
(I have commented the two world files to indicate where to start in USA2 Marias Pass route to test the changes.)

This small change is only an experiment. Without actual agreement within the community I don't really know how to proceed with such changes. Certainly I will not commit it to svn.

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