AddATex View Facing and 3ds Max 2016/TS 2017

Tips and discussion about scenery creation for RailWorks.

AddATex View Facing and 3ds Max 2016/TS 2017

Unread postby mksmitht » Fri Jan 13, 2017 4:05 pm

I am new to this website and forum and this is my first post--so apologies if this is posted in the wrong group--just point me in the right direction. Also apologies if this is an old topic that has already been worked through--again if you would point me to the correct location I would greatly appreciate it.

Working with AddATex view facing in TS2017 using 3ds Max 2016 EXT on a Windows 10 system, plenty of horsepower. Wanted to add some glow to the area around the lights in streetlights I created and followed Derek Siddle's tutorial from "The Art of Railworks" translating from Max 09 to Max 2016. Could not get it to work. If I turn off view facing everything works appropriately, but with view facing on, the plane simply disappears. Other objects in the 3ds Max file render just fine. Specific object in question is a 1x1 m plane, editable mesh, with appropriate UV mapping; texture file 128 x 128 pixel .dds (8.8.8.8 ARGB) created with alpha map using Photoshop and the Nvidia plugins. After an hour or so of nothing working with AddATex view facing, went into the TS2017 asset directories to see if perhaps it wasn't working there (and to eliminate issues with the TS install and/or my graphics cards). Took apart .geopcdx files and found what appear to be a number of examples using the PrelitViewSpaceOffset shader (which is how I believe AddATex view facing gets translated in the export from Max into the game). To me this says that AddATex view facing works in game and I can see it working in the game, which seems to rule out TS2017 and my graphics card setup.

Took apart the .geopcdx file of both my own and production examples in downloaded (payware) routes. Through careful work, found that the one difference that mattered was under the <VertexData> section related to the 1x1 m plane and the <d:blob d:size="128" section where 16 groups of 16 characters are defined that appear to represent hexadecimal information on how the object is drawn in game. As exported from my version of Max, the grouping is sparsely defined--lot of leading 0's with what appear to be only vertex position information on placement. When I looked at in game assets, those sections were populated with digits that were not 0, and I am guessing appropriately defined view and rotational aspects needed to make the plane view facing. So defined a simple 1x1 m plane centered on the xyz axes in Max 16, pivot point centered to the object. My blob section got even more sparsely populated. Again, worked fine with AddATex non-view facing, but disappeared with view facing selected. Managed to take that plane and get it correctly positioned so that I could match placement with an asset downloaded in the game that did work.

I then made one and only one change to my .geopcdx file--I pasted the 128 sized blob section from the working in-game asset into my development .geopcdx file. Only change made. And at that point, AddATex view facing immediately worked per Derek's tutorial--I could see it and it would render correctly. Rotated nicely around it's defined pivot point. I could also change the alpha mode from ALPHA_MODE_ADD to ALPHA_MODE_BLEND and turn it into what I believe is BlendATex that would also work correctly. Note that with BlendATex, I can always get view facing working, but it only renders black for the texture following the alpha map instead of colors as defined in my associated texture file. With the blob changed, I do get the colors from BlendATex as well.

Posted this over on Trainsim.com and was directed here as another source of information. My conclusion so far is that something is not exporting correctly from 3ds Max 2016 into the .IGS file. I am using the Max Plugins provided with TS2017 under ~\Railworks\dev\MaxPlugins (only plugin that will work for my version of 3ds Max on my computer is the RWMaxPlugin2015_x64).

I may be missing something obvious or something I simply overlooked in Derek's tutorial or the dev docs, so thought to ask here--but at this point my only other conclusion is that an issue exists with the export from Max 16 into the .IGS file using the RW plugin. Have come up with tolerable alternatives using other shaders but wondered if others ran into this problem and have found a way to address it.

Any help will be greatly appreciated and again apologies if this belongs elsewhere--I am new here and hope you will all understand if this is in the wrong place or a question asked and answered before. Thanks much.

=======================
Matt
mksmitht
mksmitht
 

Re: AddATex View Facing and 3ds Max 2016/TS 2017

Unread postby Derek » Sun Jan 15, 2017 7:42 am

Hi,

Sorry I missed this thread, I did however read it over on TS.com, so came back searching.

Autodesk helpfully keep changing code which requires a number of our plugins to be recompiled ever 3 versions or so.
I suspect that our plugin needs to be re released again.
I will follow this up with one of coders this week.

pm me and we I am more than happy to go through your source files and share mine to help get it working.

regards

Derek
User avatar
Derek
 
Posts: 392
Joined: Fri Feb 13, 2009 1:35 pm

Re: AddATex View Facing and 3ds Max 2016/TS 2017

Unread postby mksmitht » Sun Jan 15, 2017 9:14 pm

Thank you much for your reply. I did work out a temporary fix which is over on Trainsim.com though it requires modification to the .geopcdx file directly after exporting with references with view facing turned on. So did get view facing working but as I stated there, I am concerned about flipping 6 hex digits from 0 to F (which should translate to 24 bits if this is in fact hexadecimal code), though it does work and lets me use the shader with some very nice effects and does not seem to degrade frame rates severely.

I am not able to PM as I am new to this website and based on what I read when I registered need to post a bit more before permitted to do this, which is fine. I am open to other forms of discussion or code exchange if you wish--just let me know how you would prefer to do that.

Thank you again.

===========================
Matt
mksmitht
mksmitht
 


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 1 guest