Elvas Tower: Index was outside the bounds of the array - Elvas Tower

Jump to content

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

Index was outside the bounds of the array V2797 Rate Topic: -----

#11 User is online   James Ross 

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

Posted 18 January 2015 - 09:58 AM

View PostGenma Saotome, on 18 January 2015 - 09:05 AM, said:

Here it is. I'll provide Jeff some files later this morning after I've had my coffee and can figure out what to forward.

Attachment Open Rails - X2799 - 1.17.2015 9.49.36 PM.txt.zip


Thanks, that looks to me like it is a shape with no entries in shape.lod_controls - something we actually check for elsewhere in OR but wasn't checked for in this new code until X2801.

Like Jeffrey says, it is worth running it again in the latest version (at least X2802) to check it now loads everything okay and also to see what warnings are logged.

#12 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 18 January 2015 - 10:23 AM

View PostJames Ross, on 18 January 2015 - 09:58 AM, said:

Thanks, that looks to me like it is a shape with no entries in shape.lod_controls - something we actually check for elsewhere in OR but wasn't checked for in this new code until X2801.

Like Jeffrey says, it is worth running it again in the latest version (at least X2802) to check it now loads everything okay and also to see what warnings are logged.



And that makes sense for some of the failed items... I do set up a list of values I'm most likely to use but do not go back and delete those I have not used -- there's actually no function available to show me what was used vs. not used.

But I do wonder if there is something else going on as some of the shape names I notices do not have any LOD's set.

#13 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 18 January 2015 - 10:32 AM

Ok, ran the latest version, things display but there is a large number of warning messages... as best as I can tell they all take this form:

Quote

Warning: Missing UV index in vertex 94 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 95 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 96 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 97 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 98 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 99 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 100 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 101 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 102 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 103 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 104 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 105 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 106 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 107 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s

Warning: Missing UV index in vertex 108 in sub-object 0 in distance level 0 in shape e:\bin\open rails 1930-1952\routes\cal-p\shapes\sp_rba_1t_0090r01dc_nm.s




Here is the .s, .sd, and Sketchup file for one such item, provided for OR Team testing only:
Attached File  MSTS.zip (1.1MB)
Number of downloads: 149

#14 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 18 January 2015 - 10:58 AM

Looking at the SU file I believe it is safe to say that all instances of this problem are due to 1 to n untextured polys.

Which, of course, begs the question: How does a shape w/ untextured polys get placed in the world? The answer is via an editor. There is nothing magical about the contents of a UiD() entry in a world file and there are many, many situations where not only is it easier and faster to add such entries via an editor there are situations where it is the only means of adding an entry -- RE will fail when confronted with any shape holding > 10K polys.

Seeing as there is no texture there are also no UV entries and w/o any UV entries any index to same will be out of bounds.

For my two cents this is a "this can be ignored" situation. SU excels at producing faces w/o telling you; If you are a diligent modeler you use the provided function to track them down and either texture them or delete them... but it tends to be difficult when the face spans an area of 0.0001mm and the model covers 100k sq m. -- just ask Craig Kawahara (a.k.a. CKawahara here at ET) how many days in the past week have been spent trying to find and delete such things.

That said, there is always room for improvement and I believe a small tweek to the Ruby code is possible that would make finding and deleting such faces far easier. If there is any volunteer who will look at the code I can point them in the right direction.

#15 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 18 January 2015 - 11:14 AM

View PostJeffrey Kraus-Yao, on 18 January 2015 - 01:19 AM, said:

The checks I added for shapes were only expected to catch serious errors in shape files. If a simple 12-poly sign is causing these checks to not display the shape that means there are serious errors in the shape exporter for SketchUp. When I wrote these checks I had to intentionally create broken shapes since none of my default routes had broken shapes.

Could I get some of these broken shapes to examine? The source SketchUp files and the created .s files to examine? Also, what version of Sketchup are you using? I have the Ruby source code to examine included with the exporter. ..................snip.........................."


In the attached 12PolySign_ORBarf.zip is a clip from the OR Log where it barfed on the sign, a copy of the sign shape file and the single .ace file. If the entire log is wanted I'll be happy to attach the entire 355kb log text file.

I constructed the sign with SU 5 and exported it with version 2.0 of Pauls SU exporter.
I give permission to anyone who wants the enclosed sign shape to be be ripped, rapped, reamed, stolen, sold, peddeled, folded, spindled and mutilated by anyone who wants it.:rotfl:

Regards,
vince
edit add :sign_oops: the SketchUp source file.
v

Attached File(s)



#16 User is offline   Jeffrey Kraus-Yao 

  • Banned
  • PipPipPipPip
  • Group: Status: Fired
  • Posts: 282
  • Joined: 25-July 08
  • Gender:Male
  • Location:Madison
  • Simulator:Microsoft Train Simulator
  • Country:

Posted 18 January 2015 - 11:28 AM

Erased.

Attached thumbnail(s)

  • Attached Image: Int_View_Early_MP85B_Fwd as static.jpg


#17 User is online   James Ross 

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

Posted 18 January 2015 - 11:34 AM

View PostGenma Saotome, on 18 January 2015 - 10:58 AM, said:

Looking at the SU file I believe it is safe to say that all instances of this problem are due to 1 to n untextured polys.

...

For my two cents this is a "this can be ignored" situation.


Yes, this seems like the kind of thing we can likely ignore - especially if we can identify primitives that shouldn't have any UVs, as that would make the warning useful in cases where there's a mismatch between two bits of the shape.

#18 User is offline   Jeffrey Kraus-Yao 

  • Banned
  • PipPipPipPip
  • Group: Status: Fired
  • Posts: 282
  • Joined: 25-July 08
  • Gender:Male
  • Location:Madison
  • Simulator:Microsoft Train Simulator
  • Country:

Posted 18 January 2015 - 12:12 PM

Erased.

#19 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 18 January 2015 - 12:22 PM

View PostJames Ross, on 18 January 2015 - 11:34 AM, said:

Yes, this seems like the kind of thing we can likely ignore - especially if we can identify primitives that shouldn't have any UVs, as that would make the warning useful in cases where there's a mismatch between two bits of the shape.



Yes. General speaking if I notice a warning message about an "unknown shader name Diffuse" I know there is an untextured poly in that shape and should true void time be present I might do a search & destroy mission to get it. But having created > 5000 shape files I'm not likely to be very keen about digging up many old tasks for that purpose.

#20 User is offline   DRelyea 

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

Posted 18 January 2015 - 12:49 PM

Hi,

Some clarification on the Poly counts. The current Sketchup exporter will not export correctly anything with over 9900 polygons. This was inside some of the notes at the original developer's website. The S file is incomplete, and the MSTS RE will give a shape failed to load.

I've posted pics of Scott Brunners L&HR mountains sitting in the roundhouse at Warwick NY at Trainsim. I simply created a Ref file entry, then placed the shapes .s and ,sd into the Route's Shapes folder. The engine is almost 11,000 polys, IIRC. They arrived in the RE without a hitch.

At some point, possibly due to a change in OpenGL, SU models with an untextured face began arriving in the RE, Prior to this point, if I had failed to "highlight untextured", fixed it's issues, then removed that color from the SU palette, an exported model would also get a shape failed to load, since MSTS could not render the default white that Sketchup uses in the default templates for the primary face.

MSTS now renders that default white, which is why they show up in the RE. I found it when I saw a flicker of white on a shape that should not have had any white, let alone a light color. Back to SU, run highlight untextured, resolve the issues, purge the color from the palette, re-export.

Finally, a request if it doesn't take too much time. That would be to add the code to the SU exporter to create Animation as MSTS sees it. I have successfully exported shapes with groups (not components) and have had the textures render correctly in the MSTS RE, the MSTS game engine, and the ORTS game engine. Since I have XP, this is with Sketchup 8 and Sketchup Make 2013. Prior to Sketchup 8 Maintenance Release 5, the texture mapping of complex textures on groups was not correct, and groups could not be used. It can now.

The problem (I think) with components is the suborigin assigned to it. Despite what we see in Sketchup, those polys really aren't there. The Sketchup rendering engine is placing the polys where we see them on the model. In the Sketchup .skp file, there's probably only a suborigin with a reference to which component to place there, and in what orientation. The plugin would have to know what to do about that.

Doug Relyea

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