Still Having Problems With My Bethgon

Discussion of rolling-stock creation & re-painting.

Still Having Problems With My Bethgon

Unread postby TheKman » Tue Dec 26, 2023 7:44 pm

In another post I mentioned I had designed a Bethgon.

The animated coal load I have not further dealt with since my last post.

Problem now is the auto numbering. First time I've tried this. It's kicking my little tushie!! **!!bang!!**

In the sim, the csv file is being read. In the window where you would uncouple the cars, I do see different numbers, but I can't see them on my model. Only the placeholders with numbers 3210 are there.

I'm going by two turotials. One is by Papa Express, the other is from Chris's Trains. Each shows a different method that is throwing me for a loop.

I made the place holders 64 X64 bitmaps like Papa Express did. It's a white number on a black back ground.

The car numbers were set up using Paint.Net. This might be where I'm having issues.

From what Papa Express states.

342. Dynamic numbering for locomotive starts out in your imaging program as four 64x64 bit mapped textures. These are place holder textures. They will be seen in the our modeling program, but will be replaced in the game by the actual locomotive numbers. I am using a 1-to-4 digit system, whereas the user can give the locomotive a number of any value between 0 and 9999. For this, I will use four placeholders. These should be named as shown in the photo.

343. You will also need to create 10 - 64x64 textures that will hold the numbers that will be seen in the game. I need two different numbers, one black for the number boards and one white for the cab, so I will be making both colors on each texture. These should be saved as a Targa file, and they should have a unique name followed by _0 through _9

343. Each number texture will get an Alpha Channel that is completely black, and the number printed on each color should be completely white. In the game, this will show up as a number with no borders.

344. Save each number as a unique Targa file, with 32-bits so that the Alpha channel will show up.


Here's what Chis states.

For each digit of the number, I suggest a TrainDecal.fx Kuju material be used. This allows 8-bit alpha in the texture which gives much more pleasing results than the 1-bit black/white alpha of stencils.
The materials must be named primarynumber_0 up to primarynumber_x where 'x' is the the number of digits in the serial number minus 1. So if there are four digits, the materials must be named from primarynumber_0 to primarynumber_3.

Each of these materials should reference a placeholder texture, and these textures must be named the same as the material name itself, prefixed with decal (a requirement of the TrainDecal.fx shader). ie. decal_primarynumber_0.ace up to decal_primarynumber_x.ace, again where 'x' is the number of digits in the number minus 1.

Pay attention to the case of the filenames - Train Simulator is very particular when it comes to case. decal_primarynumber_0.ace will work. decal_Primarynumber_0.ace will not.
Click on the image here to see the relevant values.Once all the individual placeholder materials are created, they must be assembled into a Multi/Sub-Object material with the same number of elements as there are digits in the number.

For a four digit number, this material must have four sub-materials. This material must be called primarydigits. The placeholder sub-materials must be applied to the polygons in the number object in reverse. ie. primarynumber_0 is the last digit. primarynumber_1 is the second to last digit etc.The TrainDecal.fx shader allows for 8-bit alpha channels in the number textures (256 levels of grey instead of just black and white). The Diffuse channel should be the required digit colour for the model - black, white, blue etc. The most appropriate size for these textures is 32x64. The placeholder textures can be any format as they are discarded in game and replaced with the digit textures.
There must be 10 textures corresponding to the 10 digits. Name these textures something logical like number_X_black.ace where 'X' is the digit.

The object containing the digits must be named 1_0128_primarydigits_4 or similar. The '4' at the end of the name denotes the number of digits. The '0128' is the range in metres that the numbers are visible. So for a 7 digit number visible to 256m, the name would be 1_0256_primarydigits_7.

I just have no idea at all what I'm doing wrong............
TheKman
 
Posts: 381
Joined: Sun Sep 25, 2016 6:01 am

Re: Still Having Problems With My Bethgon

Unread postby TheKman » Wed Dec 27, 2023 4:24 am

I've tried everything under the sun I can think of. I'm just not understanding the entire process. I think what's throwing me for a loop is making the alpha channel for the numbers. Placeholders saved as bitmaps, the numbers saved as .tga files. Everything has the correct names file wise.

I might also be doing the process wrong in 3DC.
TheKman
 
Posts: 381
Joined: Sun Sep 25, 2016 6:01 am

Re: Still Having Problems With My Bethgon

Unread postby GreatNortherner » Wed Dec 27, 2023 7:55 am

Hi,

Dan's and Chris' tutorials essentially state the same things, only that Chris' seems to be geared for Max or Blender and has some additional provisions in it which we can ignore in 3DCrafter.

I remember that getting my first number display working cost me quite a bit of hair, so I feel your pain.

Trying to simplify the process as much as possible, this below should be all you need.

Placeholder Textures

I recommend creating six of them as number ranges up to six digits are the most common. File naming is critical and must be exactly like this below:
decal_primarynumber_0.bmp
decal_primarynumber_1.bmp
decal_primarynumber_2.bmp
decal_primarynumber_3.bmp
decal_primarynumber_4.bmp
decal_primarynumber_5.bmp
These don't require an alpha channel and you can convert them directly to .ace for the final export. To help identify them on your model, I recommend painting each number (0-5) onto each respective texture.

Number Textures

For this, basically follow Dan's tutorial. You'll need one separate texture for each number or character that your rail vehicle should be able to display. So typically 0-9. You can name them anything you want, just use something that makes sense to you. For example
number_0_arial_white.tga
number_1_arial_white.tga
number_a_arial_white.tga, etc.

You need a tool which allows editing the alpha channel, my program of choice for this is still Martin Wright's DXT2BMP but there may be easier options.

The number textures' main channel defines the color, the alpha channel defines the font and number. So for example, put a light gray color into all number textures' main channel and then the white numbers over all black background into the alphas.

This zip file contains an assortment of Sans-serif font type numbers in light gray as an example:
numbers.zip


In your 3D model:

Naming of the numbering group is highly sensitive. The numbering group must be named "1_YYYY_primarydigits_X", where YYYY is the desired LOD range and X is the number of digits your car's roster numbers have. So for example, 1_0512_primarydigits_4 for a four-digit roster range that is visible up to 512 meters away. There must not be anything other than the number objects in the primarydigits group.

The number objects in your model must be painted with the placeholder textures, starting from the left with the one numered highest and always ending in 0. So for the four-digit car from our example, you'd apply the textures decal_primarynumber_3 + 2 + 1 + 0 to the four faces that make up the car number.

Use the TrainDecal.fx shader in the "Rail Sim" custom field for the above step and make sure that you have Translucency entered in the "Tx Alpha" custom field.

In the Blueprint editor

Here, you need mainly two things. First, is the csv file which contains all your possible roster numbers. Use one number per line, exactly in the format below:
0,0,[number1]
0,0,[number2]
0,0,[number3]
So always zero, comma, zero, comma, your number. I find it's best to create these files using a text editor rather than Excel or similar.

Make sure that the numbers you provide in the .csv match the actual number of digits present on the model's primarydigits object.

The other thing you need is the auto-numbering blueprint ("Named Texture Set Blueprint" in the editor). Here, create a new entry for each number/character you have created a custom texture for and link the relevant texture path. For example, enter "0" (without quotes) into the Texture Name field and link the number_0 texture in the Texture ID field below it (the one with the alpha, not the primarynumber!)

Note that this Named Texture Set BP is case-sensitive, so an entry with a name "a" is separate from "A" if your number list contains letters besides numbers.

And that should be everything. Link these two files in the wagon/engine blueprint and export.

Cheers,
Michael
You do not have the required permissions to view the files attached to this post.
User avatar
GreatNortherner
 
Posts: 1586
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic

Re: Still Having Problems With My Bethgon

Unread postby TheKman » Wed Dec 27, 2023 12:01 pm

GreatNortherner wrote:Hi,

Dan's and Chris' tutorials essentially state the same things, only that Chris' seems to be geared for Max or Blender and has some additional provisions in it which we can ignore in 3DCrafter.

I remember that getting my first number display working cost me quite a bit of hair, so I feel your pain.

Trying to simplify the process as much as possible, this below should be all you need.

Placeholder Textures

I recommend creating six of them as number ranges up to six digits are the most common. File naming is critical and must be exactly like this below:
decal_primarynumber_0.bmp
decal_primarynumber_1.bmp
decal_primarynumber_2.bmp
decal_primarynumber_3.bmp
decal_primarynumber_4.bmp
decal_primarynumber_5.bmp
These don't require an alpha channel and you can convert them directly to .ace for the final export. To help identify them on your model, I recommend painting each number (0-5) onto each respective texture.

Number Textures

For this, basically follow Dan's tutorial. You'll need one separate texture for each number or character that your rail vehicle should be able to display. So typically 0-9. You can name them anything you want, just use something that makes sense to you. For example
number_0_arial_white.tga
number_1_arial_white.tga
number_a_arial_white.tga, etc.

You need a tool which allows editing the alpha channel, my program of choice for this is still Martin Wright's DXT2BMP but there may be easier options.

The number textures' main channel defines the color, the alpha channel defines the font and number. So for example, put a light gray color into all number textures' main channel and then the white numbers over all black background into the alphas.

This zip file contains an assortment of Sans-serif font type numbers in light gray as an example:
numbers.zip


In your 3D model:

Naming of the numbering group is highly sensitive. The numbering group must be named "1_YYYY_primarydigits_X", where YYYY is the desired LOD range and X is the number of digits your car's roster numbers have. So for example, 1_0512_primarydigits_4 for a four-digit roster range that is visible up to 512 meters away. There must not be anything other than the number objects in the primarydigits group.

The number objects in your model must be painted with the placeholder textures, starting from the left with the one numered highest and always ending in 0. So for the four-digit car from our example, you'd apply the textures decal_primarynumber_3 + 2 + 1 + 0 to the four faces that make up the car number.

Use the TrainDecal.fx shader in the "Rail Sim" custom field for the above step and make sure that you have Translucency entered in the "Tx Alpha" custom field.

In the Blueprint editor

Here, you need mainly two things. First, is the csv file which contains all your possible roster numbers. Use one number per line, exactly in the format below:
0,0,[number1]
0,0,[number2]
0,0,[number3]
So always zero, comma, zero, comma, your number. I find it's best to create these files using a text editor rather than Excel or similar.

Make sure that the numbers you provide in the .csv match the actual number of digits present on the model's primarydigits object.

The other thing you need is the auto-numbering blueprint ("Named Texture Set Blueprint" in the editor). Here, create a new entry for each number/character you have created a custom texture for and link the relevant texture path. For example, enter "0" (without quotes) into the Texture Name field and link the number_0 texture in the Texture ID field below it (the one with the alpha, not the primarynumber!)

Note that this Named Texture Set BP is case-sensitive, so an entry with a name "a" is separate from "A" if your number list contains letters besides numbers.

And that should be everything. Link these two files in the wagon/engine blueprint and export.

Cheers,
Michael


OK I think I'm now setting up the numbers correctly in Paint.Net. Guess I'll find out. I understood what you did with the zip file you posted. I wasn't doing that. I named them wrong. Didn't include color of the number.

Now, Named Texture Set. Is that the primary and secondary texture sets in the blueprint? I hadn't done that in my blueprint.

So I'll give it another shot and see what I get. I really need to learn this. Hoppers cars like the one I made have over 500 numbers. 500 indvidual cars just makes no sense!!!
TheKman
 
Posts: 381
Joined: Sun Sep 25, 2016 6:01 am

Re: Still Having Problems With My Bethgon

Unread postby TheKman » Wed Dec 27, 2023 2:49 pm

Michael, primary named texture set. I looked at one of the bin files of your cars. Numbers-Arial-White.xml. How was the .xml generated? It may have been explained in your post above, I'll go read it again.

UPDATE: Figured it out. I need to make a blueprint for the primary named texture set.

I'm feeling a lot more confident this time around.
TheKman
 
Posts: 381
Joined: Sun Sep 25, 2016 6:01 am

Re: Still Having Problems With My Bethgon

Unread postby TheKman » Wed Dec 27, 2023 6:41 pm

Michael, I sent you a PM with some files enclosed. Sorry for so many attachments, only allowed two. Please look over what I sent, thanks.
TheKman
 
Posts: 381
Joined: Sun Sep 25, 2016 6:01 am


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 2 guests

cron