PEV tools for FBX ?

Hello,
I am just trying to move from IM file to FBX file...
Usually, we can add an attachment point to IM file with PEV's attachment maker tool.

And now, I started using Blender 4.2 (new as a Blender user) for better look of assets. I'm working on making a power plant with smoke from the chimney.
How do I put the smoke point {"a.chim0") ?

I have tried adding an "empty arrow" to the LOD0 container. I didn't include it in the next LOD.

But after exporting all LODs to Trainz, the smoke doesn't appear. Is there something wrong with my work?
Is there attachment maker to FBX file similar to PEV's ?

After searching, powerplants in DLC are still in IM format... I follow them for construct the config.txt only.
 
....

And now, I started using Blender 4.2 (new as a Blender user) for better look of assets. I'm working on making a power plant with smoke from the chimney.
How do I put the smoke point {"a.chim0") ?
Add an empty and give it the name a.chim0.
I have tried adding an "empty arrow" to the LOD0 container. I didn't include it in the next LOD.

That means the attachment will disappear when LOD1 is loaded and eventually the smoke will dissipate. You may consider leaving in those smoke attachments and drop them for the lowest LOD mesh.
But after exporting all LODs to Trainz, the smoke doesn't appear. Is there something wrong with my work?
Is there attachment maker to FBX file similar to PEV's ?

No. PEV stopped working on his tools just after FBX was introduced. He did some FBX work but couldn't obtain the structure for Trainzmesh files. You can still use the IM version and mix FBX with IM.
After searching, powerplants in DLC are still in IM format... I follow them for construct the config.txt only.
I guess they will catch up sometime. Most likely when authors want to make them PBR.
 
p.s. I like to use Blender containers for my LOD meshes and also a container for attachments. That makes it easier to export different LODs with or without attachments.
 
You may consider leaving in those smoke attachments and drop them for the lowest LOD mesh.
So, I should use a.chim0 in LOD0, a.chim1 in LOD1 and a.chim2 in LOD2 ?

I delete LOD3 because confusing about decimate rate number....
Chimney won't be able to reduce their polygons since poligons in LOD2 and LOD3 are the same amount with LOD1. This is why LOD3 get fault because still had numbers of polygons although I set to 0,001 rate.
 
So, I should use a.chim0 in LOD0, a.chim1 in LOD1 and a.chim2 in LOD2 ?

No. You export a.chim0 for each LOD. This is why I put those empties into an attachments container. An asset like a loco, traincar, or passenger station can have many attachments and the list in Blender will become a mess very quickly.
I delete LOD3 because confusing about decimate rate number....
Chimney won't be able to reduce their polygons since poligons in LOD2 and LOD3 are the same amount with LOD1. This is why LOD3 get fault because still had numbers of polygons although I set to 0,001 rate.
The number of polys should be at least 20% lower than the previous LOD. I generally start with a 50% reduction and watch the effects on the mesh in case distortions start to show. I also vary the reduction method sometimes.
 
0No. You export a.chim0 for each LOD.
Thanks for your guidance....


The number of polys should be at least 20% lower than the previous LOD. I generally start with a 50% reduction and watch the effects on the mesh in case distortions start to show. I also vary the reduction method sometimes.
I had set LOD1 as 0.75, LOD2 as 0.08 and LOD3 as 0.017 in Collaps decimate
But CM reported that polygons at LOD1=77% of LOD0, LOD2=76% of LOD1, and LOD3=90% of LOD2 ...

I found 0.08 rate will result in 76% ...

After checked, it is because the chimney tube won't reduce the polygons!
 
This my approach:
1. If I want 4 LODs, I make 3 copies of the original mesh, which is usually LOD0. Each copy goes in a Blender container with names like "LOD0 meshes", "LOD1 meshes", etc.
2. I start with LOD1 and, using the decimate modifier, I use the Collapse option and adjust the ratio so as to reduce the face count to less than 80% of the previous LOD mesh. Observe the mesh to ensure there are no unwanted distortions. This is particularly important at the higher poly LODs. Leave the decimate modifier in place and don't apply it.
3. Move to the next LOD and, starting with the ratio of the previous LOD, reduce by another 20% or more.
4. Repeat for remaining LODs. For the lower poly LODs don't get fussed about distortions because you will probably never see them in game.

Ideally, the lowest poly mesh plus attached meshes should be less than 300 triangles. That can be really hard for some models but there are techniques to help achieve that goal.

When exporting individual LODs, make sure the settings include the option to apply modifiers on export. That's in the Geometry sub menu. It's good practice to tick the Triangulate faces option.

Note that the Decimate modifier can cause issues that the conversion to Trainz mesh doesn't like. This can include loose vertices, loose edges, collapsed triangles, and the like. If that occurs you may need to apply the Decimate modifier for the affected LOD mesh(es) and use a Clean Up tool to fix some of those problems. There are several addons that do that.

My How to export from Blender using FBX tutorial on the Trainz WiKi has a Blender file (final) that demonstrates this. Its a Blender 3.2 file but should work for later versions.
 
Sorry Paul,
It still doesnt work for me....
I think this is because the chimney model have too many polygons although just tube 24 segments. Maybe I need to simplify it.

From SU I got warning have 18000 polygons while in Blender I got 11200 polygons.

To investigate, I tried without apply any modifier, just copy from LOD0 into LOD1 to LOD3. The result is :
VE107: The high-detail meshes total more than 10000 polygons. This may have a negative impact on performance: 0: 11208, 1: 11208, 2: 11208, 3: 6247, 4: 0
VE111: The meshes in LOD level 2 must total at least 20% fewer polygons than the next higher LOD: 0: 11208, 1: 11208, 2: 11208, 3: 6247, 4: 0
VE111: The meshes in LOD level 1 must total at least 20% fewer polygons than the next higher LOD: 0: 11208, 1: 11208, 2: 11208, 3: 6247, 4: 0

I didn't know why LOD3 has different number. maybe reduce automatically ...
 
Make sure to include the LOD level tag for each LOD mesh as well as the mesh-table-lod-transition-distances tag. Otherwise you may get odd results.
This is the example from my WiKi tutorial:

Code:
mesh-table {
  lod0n {
    mesh                                  "rock_lod0n.trainzmesh"
    auto-create                           1
    lod-level                             0
    mesh-season                           0
  }
  lod1n {
    mesh                                  "rock_lod1n.trainzmesh"
    auto-create                           1
    lod-level                             1
    mesh-season                           0
  }
  lod2n {
    mesh                                  "rock_lod2n.trainzmesh"
    auto-create                           1
    lod-level                             2
    mesh-season                           0
  }
  lod3n {
    mesh                                  "rock_lod3n.trainzmesh"
    auto-create                           1
    lod-level                             3
    mesh-season                           0
  }
}
mesh-table-lod-transition-distances       100,300,600,5000

In this case the transition to LOD1 takes place at 100 metres, to LOD2 at 300 metres, to LOD3 at 600 metres, and the asset is no longer rendered beyond 5000 metres.

You might also have a look at the size of the exported FBX files. They should be smaller for each LOD export.
 
Thanks for your guidance, Paul.

After try and try, I should use combination between COLLAPSE and PLANAR setting to reduce the triangles of chimney, not collapse or planar only.
To monitor how many trianglea we will get on trainz, I need to activate statistic at viewport menu.
Now I am going to next step for this industry, because smoke won't displayed.
 
...

1. Texture repetition does not occur
Is there still something wrong with my parameters in Blender ?
...

Not sure what you mean by texture repetition, but wraparound textures are defined in the texture.txt file with the Tile tag. Have you UV mapped your mesh correctly?
I don't recommend the use of JPG textures for PBR work and especially for the parameter texture. JPGs only support 24 bit colour and you need 32 bits to fully support a Trainz parameter format.

2. Smoke still didn't appear
You haven't mentioned smoke before, but the smoke container WiKi page describes how to use it.
This tutorial might have been a better choice.
 
Not sure what you mean by texture repetition, but wraparound textures are defined in the texture.txt file with the Tile tag. Have you UV mapped your mesh correctly?
I don't recommend the use of JPG textures for PBR work and especially for the parameter texture. JPGs only support 24 bit colour and you need 32 bits to fully support a Trainz parameter format.
Repetition what I mean is the image will show in many times.
I only had image which just red-white, but I want to draw it as red-white-red-white-red ... so on .... from bottom to top.
I use JPG because no need alpha channel. But no problem if I should convert to PNG with alpha channel = white color.


You haven't mentioned smoke before, but the smoke container WiKi page describes how to use it.
This tutorial might have been a better choice.
I had tried to follow smoke wiki page which guide me that axis should Y-UP...
The I add "empty arrow" and rotate the axis to confirm the guidance.

But in "how to using Blender FBX for trainz" as guided to me, the axis should set Z-UP. Is this the problem occur ?
 
Repetition what I mean is the image will show in many times.
I only had image which just red-white, but I want to draw it as red-white-red-white-red ... so on .... from bottom to top.
I use JPG because no need alpha channel. But no problem if I should convert to PNG with alpha channel = white color.

If you have a simple striped diffuse/albedo texture then your UV mapping should extend beyond the texture boundaries at right angles to the stripes. You should be able to see the results in the 3D window - Material View. I'd post an image but I don't have a image hosting service that isn't a pain to use.
I had tried to follow smoke wiki page which guide me that axis should Y-UP...
The I add "empty arrow" and rotate the axis to confirm the guidance.

But in "how to using Blender FBX for trainz" as guided to me, the axis should set Z-UP. Is this the problem occur ?

The smoke container page has a Direction tag that defaults to XYZ = 0,0,1 which means the smoke is emitted in the positive Z axis. Upwards. This may be relative to the attachment point but I can't recall ever testing it. I can't see anything on the page that suggests the direction is in the Y axis.

The Z up direction in the tutorial is about the mesh orientation and not smoke. Note that corona direction is different as well.
 
The old CCGs (Content Creation Guides) had the following information on the orientation of attachment points for smoke effects:
The attachment point should also be rotated so that its Y axis is pointing in the direction that smoke particles will be emitted.

Peter
 
Back
Top