Blender to TSC

Blender to TSC

Postby bartsville » Wed Nov 06, 2024 2:17 pm

I want to show windows as lit at night and unlit during the day when exporting from blender to TSC via Briage. My windows still seem to be lit during the day, though. Any help appreciated

Barrie
bartsville
Engine Cleaner
 
Posts: 7
Joined: Sun Oct 25, 2020 9:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Blender to TSC

Postby ukrichb » Wed Nov 06, 2024 4:32 pm

Hi!

Have you created two objects, calling one with the suffix *_fx_day and another *_fx_night…and mapped the day and night textures, respectively?
ukrichb
General Shed Duties
 
Posts: 24
Joined: Fri Feb 09, 2018 11:43 pm
Has thanked: 0 time
Been thanked: 2 times

Re: Blender to TSC

Postby bartsville » Thu Nov 07, 2024 10:48 am

hi thanks for your reply. I am just using _day and _night. Is the fx required as well? Also do I use TEx Texdiff Trainglass for the shader. I have tried all combinations and getting nowhere.
bartsville
Engine Cleaner
 
Posts: 7
Joined: Sun Oct 25, 2020 9:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Blender to TSC

Postby AndiS » Thu Nov 07, 2024 2:21 pm

I would ditch TrainGlass for starters. You need not alter your model, just make a textured cube with day and night texture.

The manual is your friend, but my not so reliable memory suggests that you need Tex for a own quad that is your window lit at night and TexDiff or alternatively TrainDiff or something like that for the rest of the night texture and all the day texture.

TrainGlass is complex and expensive for use on vehicles and maybe a shelter on a platform. I would certainly make that two projects, getting night view to work and getting semitransparent glass to work.
AndiS
Top Link Driver!
 
Posts: 765
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 270 times
Been thanked: 316 times

Re: Blender to TSC

Postby bartsville » Thu Nov 07, 2024 3:59 pm

somebody suggested using an emission shader behind the window as the light source.I have yet to try that but thanks for the information
bartsville
Engine Cleaner
 
Posts: 7
Joined: Sun Oct 25, 2020 9:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Blender to TSC

Postby AndiS » Thu Nov 07, 2024 11:12 pm

People suggest a lot when talking about computer graphics and/or games. The real challenge is to achieve a lot with simple methods or else performance breaks down.

Emission shaders are for cab controls that shed light on their surrounding. The game computes at runtime, what gets lit. This may matter when there is a lever that gets lit in various ways depending on its position quite near to this light source.

But for windows, all you need is a Tex shader for the sill and the soffit to show it a little bit lit at night. No one will get near the window and be lit dynamically.
AndiS
Top Link Driver!
 
Posts: 765
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 270 times
Been thanked: 316 times

Re: Blender to TSC

Postby bartsville » Fri Nov 08, 2024 12:58 am

I am really pulling my hair out here. I feel like committing hari kari. I keep trying all sorts of combinations but a window will not export to TSC and be a transparent window during the day and a lit window at night. I have used texdiff and tex for the respective shaders but i either get it lit during the day or not lit at night. what am I doing wrong
bartsville
Engine Cleaner
 
Posts: 7
Joined: Sun Oct 25, 2020 9:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Blender to TSC

Postby AndiS » Fri Nov 08, 2024 9:24 am

Then it has to do with the naming convention. Have you done what Richard suggested here?

ukrichb wrote:Have you created two objects, calling one with the suffix *_fx_day and another *_fx_night…and mapped the day and night textures, respectively?


I have not first-hand experience with that. Or it was 100 years ago.

The computer scientist approach would be to make two cubes, name the green one cube_fx_day and the blue one cube_fx_night. You export them together in 1 .igs file, In Blender they are 2 objects. So you have to select them together, maybe, unless the exporter exports everything, if nothing is selected. Selecting one but not the other is one of the pitfalls on the way, I guess.

Use Tex on both because that is the most primitive shader ever and you will see the cube by day and night.

Then you create a scenery blueprint for this .igs and you place the scenery item in game and create two scenarios, one at midnight and one at noon and you start both (from the main menu, not from within the editor). You will not rest or focus on anything else until you see a blue cube by night (that will appear to be lit from inside) and a green cube by day that will look a bit dull but it will be green and the other one will be blue and that is all you need for the first step.
AndiS
Top Link Driver!
 
Posts: 765
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 270 times
Been thanked: 316 times

Re: Blender to TSC

Postby SteveP_trains » Fri Nov 08, 2024 3:50 pm

Just to confirm that the *_fx_day and *_fx_night naming convention is needed for this to work.
So two objects, ShedDoors_fx_day with a normal window image and ShedDoors_fx_night with a "lit" window image will swap between day & night according to the game environment.
Shader is simply TrainBasicObjectDiffuse.fx or similar.
The two objects are placed in the same location (one slightly behind the other to avoid Z-buffering) in the overall model

Below is the text from the Kuju Developer guide.
5.1.2 Windows
Some building types require a night-time effect, to simulate the lights being switched
on at dusk. This is done through node names where the node names themselves will
dictate whether they are visible in the day or at night.
· Node names ending with “fx_night” will only be drawn at night.
· Node names ending with “fx_day” will only be rendered in the d
Therefore the windows can have up to two nodes i.e. the windows in the daytime
and the windows in the night-time.
SteveP_trains
Full Time Fireman
 
Posts: 59
Images: 1
Joined: Mon Oct 05, 2015 6:16 pm
Has thanked: 2 times
Been thanked: 11 times

Re: Blender to TSC

Postby bartsville » Sat Nov 09, 2024 1:25 pm

hi thnx for the replies. got it at last thnx again
bartsville
Engine Cleaner
 
Posts: 7
Joined: Sun Oct 25, 2020 9:07 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Blender

Who is online

Users browsing this forum: No registered users and 1 guest

cron