BVEStation

Author Topic: openBVE shading and color problems  (Read 12314 times)

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
openBVE shading and color problems
« on: March 13, 2011, 04:34:37 pm »
What's up people? Can anyone help me? I have started a little demo project for openBVE and I can't figure out why objects on the left come out fine, but on the right they seem shaded or darkened and some objects display the wrong colors. Notice in the image, the right side texture of the trackbed is dark, but the left side is lighter. Does anyone know why?



Offline Simon

  • Conductor
  • **
  • Posts: 223
  • Gender: Male
  • BVEStation Member / Community Critic
    • View Profile
Re: openBVE shading and color problems
« Reply #1 on: March 13, 2011, 04:35:51 pm »
It's the time effect for openBVE. It simulates the sun lighting.
Kawasaki_Plant

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #2 on: March 13, 2011, 04:38:52 pm »
Oh I see!! So how can I remove that effect for the tunnels? Also, some objects such as cubes, I have a solid black color, but some sections display either white or yellow. What can I do about that?

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #3 on: March 13, 2011, 05:06:47 pm »
As for the direction of the light, you would have to take out the .light command in those areas... (My guess)
« Last Edit: March 13, 2011, 05:52:01 pm by joseto »
Jose
BVEStation Administrator

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #4 on: March 13, 2011, 05:09:14 pm »
Can that be done numerous times throughout the route or just once like in BVE4?

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #5 on: March 13, 2011, 05:52:17 pm »
I think it can be done in numerous areas.
Jose
BVEStation Administrator

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #6 on: March 15, 2011, 03:48:26 pm »
Thanks for the help guys. I figured it out. The Light.Direction command controls the direction of the sunlight. In order to cancel out that effect, I had to use the SetColor and SetEmissiveColor commands. Basically to get the objects to display without shading, there are 2 ways.

If for example your object uses a texture but not a color to change the color of the texture, there is no shading. But if your texture uses a color, say beige, I would set it this way,

SetColor, 0,0,0
SetEmissiveColor, 232,221,181

So you get the beige color without the shading.

 ;D

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #7 on: March 15, 2011, 07:46:30 pm »
Ah, that's great you figured it out. This might also help other developers.
Jose
BVEStation Administrator

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #8 on: March 15, 2011, 08:18:56 pm »
That can be used in combination too. For example, say you have an outside stretch of the route and you want the lighting effects. You simply just don't use the setemissivecolor command. But once you go underground, there is no sunlight. You just used the command for the underground objects.

I'm working on animated objects and custom animated NYCT signals the later of which will be available for all developers.

Offline Gong Gahou

  • Operator
  • ***
  • Posts: 258
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #9 on: March 15, 2011, 08:41:53 pm »
That can be used in combination too. For example, say you have an outside stretch of the route and you want the lighting effects. You simply just don't use the setemissivecolor command.
Of course there's that possibility that you don't just use the SetEmissiveColor command - I already considered that. But to emulate the lighting, that was the only command I knew at this point.
« Last Edit: March 15, 2011, 08:54:41 pm by Gong Gahou »
Previously known as pjiang6211

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #10 on: March 15, 2011, 09:07:47 pm »
That can be used in combination too. For example, say you have an outside stretch of the route and you want the lighting effects. You simply just don't use the setemissivecolor command. But once you go underground, there is no sunlight. You just used the command for the underground objects.

I'm working on animated objects and custom animated NYCT signals the later of which will be available for all developers.
Yea, I was thinking about that earlier. About your objects, I'm really interested in what you're whipping up here.
Jose
BVEStation Administrator

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #11 on: March 15, 2011, 09:21:42 pm »
I'm trying. Even though I am pro BVE, openBVE provides far better frame rates than BVE 2/4. Plus those london UK guys have had custom signals for what seems like forever and it's about time we have them too.

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #12 on: March 16, 2011, 09:25:56 pm »
I'm trying. Even though I am pro BVE, openBVE provides far better frame rates than BVE 2/4. Plus those london UK guys have had custom signals for what seems like forever and it's about time we have them too.
I agree with ya! They also have the trippers for the BVE4 version, but not the OpenBVE. However, if you run it in OpenBVE, it will work.
Jose
BVEStation Administrator

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: openBVE shading and color problems
« Reply #13 on: March 16, 2011, 10:13:00 pm »
They have animated trippers now. But anyway, the single aspect signal isn't too hard to do, I'm almost done with that. However, the double aspect signals and Timed signals are giving me a pain. OpenBVE supports timed signals to some degree. Set just the same as a regular signal.

Offline Bombardier01800

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 749
  • Gender: Male
  • Apple Certified Macintosh Technician
    • View Profile
    • MBTA and NJT Transit Forums
Re: openBVE shading and color problems
« Reply #14 on: March 16, 2011, 10:15:08 pm »
They have animated trippers now. But anyway, the single aspect signal isn't too hard to do, I'm almost done with that. However, the double aspect signals and Timed signals are giving me a pain. OpenBVE supports timed signals to some degree. Set just the same as a regular signal.
O yeah... Well, the trippers, they have them animated, but I meant functional as in running past a red signal and going BIE.
Jose
BVEStation Administrator