Graphic errors on the FT

Announcements and Discussion about Dick Cowen's BritKits Development

Graphic errors on the FT

Unread postby MadMike1024 » Thu Apr 07, 2011 1:30 am

Image

These errors are on the x-FTa-v-ndb freeware A unit, and appear on both my skin and on the default skin.

Is there an update or fix?
MadMike1024
Global Mod
 
Posts: 1730
Joined: Fri Jul 30, 2010 8:11 pm
Location: Vancouver, WA

Re: Graphic errors on the FT

Unread postby Trainguy76 » Thu Apr 07, 2011 1:37 am

Woah, no offence but the whole nose looks a little strange.
User avatar
Trainguy76
 
Posts: 630
Joined: Mon Feb 15, 2010 12:46 am
Location: San Bernardino, California

Re: Graphic errors on the FT

Unread postby MadMike1024 » Thu Apr 07, 2011 4:00 am

I bought the Xtra pack for the FTs and it sorted the graphics issue... the nose looks far smoother as well.
MadMike1024
Global Mod
 
Posts: 1730
Joined: Fri Jul 30, 2010 8:11 pm
Location: Vancouver, WA

Re: Graphic errors on the FT

Unread postby KCJones » Thu Apr 07, 2011 5:54 am

I Know it is a poor excuse, but that is one of the first models I did for Rail Sim almost three years ago. Though the payware part has been updated I need to revisit that one. In fact where I am on the learning curve now ALL those early models need work on them. I am still working through my MSTS library too!!! !*hp*!
I will get there some day.

My current project will be a re-skinning kit but with far more detail. Just finished the working ditch lights, doesn't look too bad. hopefully I will put out a video shortly. :D

Dick
User avatar
KCJones
 
Posts: 872
Joined: Fri Feb 13, 2009 4:05 pm
Location: UK Somewhere between Hereford and Shrewsbury

Re: Graphic errors on the FT

Unread postby MadMike1024 » Thu Apr 07, 2011 12:20 pm

KCJones wrote:I Know it is a poor excuse, but that is one of the first models I did for Rail Sim almost three years ago. Though the payware part has been updated I need to revisit that one. In fact where I am on the learning curve now ALL those early models need work on them. I am still working through my MSTS library too!!! !*hp*!
I will get there some day.

My current project will be a re-skinning kit but with far more detail. Just finished the working ditch lights, doesn't look too bad. hopefully I will put out a video shortly. :D

Dick


I you don't mind, could you point me in the right direction to lighting the lower headlight? The perfect setup would be a flashing (Mars type) light in the top, and a steady double in the bottom. Most of the Es and Fs wound up with a side by side double sealed beam lamp in the later years. As you might note, the upper on the SP E7 I did has red over lunar sealed beams in the top. Normal operation for those was lunar going forward in combination with the lower light, and red when reversed. You have done a great job of scripting the lighting through the locos, and an A-B-B-A lashup does reverse the lights properly.
MadMike1024
Global Mod
 
Posts: 1730
Joined: Fri Jul 30, 2010 8:11 pm
Location: Vancouver, WA

Re: Graphic errors on the FT

Unread postby KCJones » Thu Apr 07, 2011 5:06 pm

Lighting is not as simple as it was in MSTS !*hp*!

As far as I understand it, lighting is provided by specially named polygons in the model. At the moment you can have forward on/rear off, rear on/forward off or both off. This is also affected by where the loco is in the consist. The code for lighting is hard wired into the sim.
I noted the new SW1500 has ditch lights but they go on with the headlight. They do not flash. The number boards also illuminate. In modelling terms though all the parts that light up together are the same named part.

With my MP15DC (WIP) I have managed to get a close aproximation to flashing ditchlights but this is an animated part similar to the flashing becon on the BN and BNSF SW1500

Now to the lower headlight on my FT, Fs and E. As the Lower light is a "fitting", that is a child of the main model, I was not able to get them to light as, as far as I knew when I built them, any lighting had to be part of the main model.

When built the idea behind my kits was to get as much customisation as possible, but that meant many compromises. With diesels I was beguiled with the notion of "one shape fits all" Soon the reality hit me!!!! Steam locomotives which were individuals were replaced with diesel locos that became individuals as each road had it's preferences!!!! !*YAAA*!

So, for the time being, I am afraid you are stuck with what is there.

There are new developments coming with RW. Hopefully loco lighting will be part of it. If not, when I eventually get to updating my Fs and Es and adding a few more rivets. I will make a version with a permanent lower headlight.



Dick
User avatar
KCJones
 
Posts: 872
Joined: Fri Feb 13, 2009 4:05 pm
Location: UK Somewhere between Hereford and Shrewsbury

Re: Graphic errors on the FT

Unread postby Kali » Thu Apr 07, 2011 5:32 pm

You can turn parts of a child object on and off; if you so happen to make a node in the child headlight object that's a lit-up headlight ( called "glowing_headlightnode" here ), you can turn that on and off via the engine script. For a single ended engine that's basically

Code: Select all
if Call( "*:GetControlValue", "Headlight" , 0 ) == 1 then
   Call( "ExtraHeadlightChild:ActivateNode", "glowing_headlightnode",  1 )
else
  Call( "ExtraHeadlightChild:ActivateNode", "glowing_headlightnode",  0 )
end


It gets a bit problematic when you have double-ended diesels at each end of the train, because the lights get out of sync if the rear one is the wrong way round. Not managed to solve that fully yet.

If you want them on all the time, then just start with the node enabled, you can still turn them off from the script if you need to.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Graphic errors on the FT

Unread postby MadMike1024 » Thu Apr 07, 2011 7:49 pm

Could you possibly expand on that a bit? I've done nothing in the scripting (yet) and wouldn't have a clue where to start. for now, since we are doing single end locos, pairing them and turning them on and off would suffice. In fact, just turning on the lower would be enough for some roads.
MadMike1024
Global Mod
 
Posts: 1730
Joined: Fri Jul 30, 2010 8:11 pm
Location: Vancouver, WA

Re: Graphic errors on the FT

Unread postby Kali » Thu Apr 07, 2011 8:07 pm

That script segment is all you need; the issue is finding the name of the node in the child you want to turn on. Basically what you have is a headlight object which is a model of a switched off headlight, and inside that is an additional object which is a copy of the bits of the light that glow when they're turned on; this is the bit you switch on and off.

RW scripting variables that come from the internal engine are called Controls; you can read or set most of them, in this case we're using the "Headlight" control. That snippet of code lives in the function OnControlValueChange() in the engine script. Open the script up - the name will be at the bottom of the engine blueprint - and if it doesn't have that function already stick this in it:

Code: Select all
function OnControlValueChange ( sName, nIndex, gValue )
  if Call( "*:ControlExists", sName, nIndex ) then
     Call( "*:SetControlValue", sName, nIndex, gValue )

     if sName == "Headlight" then
        if gValue == 1 then
          Call( "ExtraHeadlightChild:ActivateNode", "glowing_headlightnode",  1 )
        else
          Call( "ExtraHeadlightChild:ActivateNode", "glowing_headlightnode",  0 )
        end
     end

   end
end


Change the name of "ExtraHeadlightChild" to whatever you called it in the blueprint, and "glowing_headlightnode" to whatever that is called ( that's the bit from the top of the post ), and... it will just work. Every time the value of the Headlight control changes, which means every time you do something with the headlights in game, it will check if it needs to do something with your extra headlight. Headlights have a value of 0 = off, 1 = forwards is white, 2 = reverse is white. We just turn the extra light on when the lights are on at the front.

There are other things you should do really, like make sure the lights are off when the engine initialises, but that's the basics.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Graphic errors on the FT

Unread postby KCJones » Fri Apr 08, 2011 12:58 am

Kali, his problem will be there is no lighted headlight node in the lower headlight model. When I originally built it my knowledge of scripting was non existant. BUT your post has given me a solution. I will produce a lightable lower headligh as a stop gap.
Any hints on scripting will be greatfully recieved as it is still a bit of a dark art to me. Thanks.

Dick
User avatar
KCJones
 
Posts: 872
Joined: Fri Feb 13, 2009 4:05 pm
Location: UK Somewhere between Hereford and Shrewsbury

Re: Graphic errors on the FT

Unread postby MadMike1024 » Fri Apr 08, 2011 2:38 am

For the moment, I created a graphic that makes the lower light appear to be lit all the time. I also made a graphic that makes the red over lunar appear as though the red is lit up. If you only equip a single upper lamp, it does a good job of looking like the red light is on when the light is switched off, and of course the lighted graphic obscures it when on.

Once you have a workable solution, I'll create patch files for the double light engines I've created.
MadMike1024
Global Mod
 
Posts: 1730
Joined: Fri Jul 30, 2010 8:11 pm
Location: Vancouver, WA

Re: Graphic errors on the FT

Unread postby KCJones » Fri Apr 08, 2011 5:50 am

Life is never simple,

The scripting idea does not appear work. I did try it with my MP14 ditch lights but had to resort to another method.

Dick
User avatar
KCJones
 
Posts: 872
Joined: Fri Feb 13, 2009 4:05 pm
Location: UK Somewhere between Hereford and Shrewsbury

Re: Graphic errors on the FT

Unread postby Kali » Fri Apr 08, 2011 6:17 am

I know the general principle works, because I have an external headlight strapped on a class 31; there are many many things that can go wrong, though ( not least the naming of parts ). Are there any extra light child objects I can have a look at? what they're attached to doesn't matter for the purposes of making them work.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Graphic errors on the FT

Unread postby KCJones » Fri Apr 08, 2011 7:35 am

OK here is the file to play with. It is for my F7. The light node is names lhlglow. I have also included it's bin file.

https://www.humyo.com/QbMmM/Temp/?a=nPqlYDjE0Is

I had this same problem when I built my shays. I had all my animations working at one stage, then after one of the infamous RW updates, some of them stopped responding. !*hp*!
User avatar
KCJones
 
Posts: 872
Joined: Fri Feb 13, 2009 4:05 pm
Location: UK Somewhere between Hereford and Shrewsbury

Re: Graphic errors on the FT

Unread postby Kali » Fri Apr 08, 2011 8:59 am

I'm not really much of a 3d modeller but the materials setup looks ok; can I make sure that the model parts in the lhlglow node are slightly in front of the rest of the model? I made that mistake when I changed someone else's light, and ended up pulling my hair out for a few hours. It was all actually working ok, but the lit-up bits were just being obscured by the rest of the model :) I doubt someone with your experience would do that, but it's always worth checking the obvious.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Next

Return to BritKits

Who is online

Users browsing this forum: No registered users and 1 guest