AddATex View Facing TS2017
Been busy with TS2017 and 3dsMax 2016 adding objects for my own use that will help me develop my own route (near future) simply as a learning experience and personal hobby. Have a number of street lights and spot lights and wanted to add a glow around the bulbs. Went to the web, went through Derek Siddle's tutorial pages and tried AddATex following his examples. Was able to translate everything from Max 2009 (one used in his blogs) to 2016 (the one I am using). Everything works until I turn on view facing with AddATex. The objects (a plane--editable mesh [also tried editable ploys] centered on the appropriate axis) assigned AddATex with view facing on simply disappear. Everything else remains as is. With view facing off--I get the desired results--but obviously the glow does not rotate and looks weird from oblique angles. So tried BlendATex as an experiment to see if view facing broke in that--it did not. But BlendATex is a blending alpha, not additive alpha, so I do not get the lighting feature I want. Also tried TrainViewFacingUnlit which does work with view facing on but found that transparency there was absolute--at least in what I tried the alpha had to be either black or white with the transparency flag on--any shade of gray in the alpha resulted in the image disappearing. I can get some nice effects using TrainViewFacingUnlight for a light glow except the plane is solid--I cannot see through it as I can with AddATex.
So spent quite some time looking at other XML files especially in newer purchased routes to see if the option simply didn't work anymore with newer releases of Train Simulator (and to insure that it wasn't something in my graphics card setup that was misbehaving). Based on my work with the XML in the geometry files and taking a close look in TS2017 viewing those assets, AddATex used with view facing turned on works--looking at assets that appear to use that shader I can see the plane rotating to view and in most cases the geometry files show a simple 4 vertex quad assigned to that particular shader. I believe that AddATex with view facing on translates to PrelitViewSpaceOffset with FrameAlphaMode as ALPHA_MODE_ADD. Again I found a number of examples in newer routes using that option associated with lighting objects. Even tried changing my own object geometry XML files to match some options in those with no success.
So went through web and forum searches and found various answers--one that comes to mind is that AddATex with view facing "broke" in TS2015. Not sure I agree with that--I can see it working in other recently released routes in TS2017. Makes me wonder if what "broke" was the export process from Max to the IGS file. Or I wonder if I am missing something in my Max object that AddATex needs for view facing (though the same object will work just fine with BlendATex with view facing on).
That leads me to surmise that (1) I am missing something obvious (probable); (2) the export process for the AddATex shader with view facing on is broken; or (3) there is something missing in my 3dsMAX object required to allow the shader to work correctly.
For the record--TS2017, 3dsMax 2016 EXT2 (I have not upgraded further as I am frightened I'll break something else in the RWMaterial process), RWMaxPlugin Build Version TS2014 -v43.2a (only one that will work with the version of 3dsMax I am using) from the ~\RailWorks\Dev\MaxPlugins directory. Computer has more than enough horsepower--10 CPU's overclocked to 4 GHZ, 64 GB RAM, 2 GPU's, SSD. I don't think it's a computer issue--existing assets seem to display a view facing additive alpha plane just fine. What won't work are my attempts at recreating a light glow using AddATex with view facing on. Takes me back to the export or the object.
Insight and help appreciated. If I have missed something obvious or another resource, apologies--just point me in the right direction.
========================================
Matt
mksmitht