Elvas Tower: Terrain second texture wrong resolution. - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Terrain second texture wrong resolution. Usually microtex.ace Rate Topic: -----

#1 User is offline   Goku 

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

Posted 26 May 2018 - 12:19 PM

Found this bug here:

http://www.trainsimh...hp?f=33&t=17800

Open Rails ignores second texture scale defined in .T file:

https://i.imgur.com/3kmLW17.jpg

#2 User is offline   Goku 

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

Posted 03 June 2018 - 03:25 AM

The uv coordinate multiply value is defined in TerrainFile.cs, class terrain_uvcalc, int D;

This value should be used instead of fixed 32 value in SceneryShader.fx file:

litColor.rgb *= tex2D(Overlay, In.TexCoords.xy * 32) * 2;

It may be difficult to change because it requires new value send to shader file ...

#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 03 June 2018 - 06:29 AM

Goku,
I just made a check with route USA1 and I get either a value of 0 or a very high integer value for D.

#4 User is offline   Goku 

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

Posted 03 June 2018 - 07:39 AM

D is float not integer.

MSTS uses two values:

A B C D
1 0 0 0 for first texture.
2 0 1 32 for second texture (microtex.ace).

I don't know how these values work, but I think:
A maybe it's texture id, 1 or 2. It's always in this order, so this value can be ignored.
B don't know.
C 1 if uv multipler enabled and 0 if uv multipler disabled. Can be ignored.
D uv multipler in Float value.

MSTS has a lot of hidden features not possible to change using standard editors&tools.

#5 User is offline   Genma Saotome 

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

Posted 03 June 2018 - 07:43 AM

Dunno if it is relevant or not but the microtex file must be compressed; Maybe a MSTS only issue.

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 03 June 2018 - 08:52 AM

View PostGoku, on 03 June 2018 - 07:39 AM, said:

D is float not integer.

The OR code read it as integer. I have now read it as float and, yes, now OR alternatively reads a 0 and a 32.
The problem is now to link the 32 to the correct patch and to pass it to the shader. By the way OR doesn't use any of A, B, C, D.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 04 June 2018 - 12:14 AM

Hi Goku,
try these corrected files for x.4150

6/6/2018: File deleted because correction committed

#8 User is offline   Goku 

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

Posted 04 June 2018 - 03:22 AM

Seems to work fine:

https://i.imgur.com/on4o3Q6.jpg

Now you can reply in the Italian topic that he doesn't need to use custom textures for OR now.

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 04 June 2018 - 05:19 AM

Committed in x.4151, with a small change reducing memory space needed.

Page 1 of 1
  • 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