BVEStation Forums

BVE => BVE/OpenBVE Support => Topic started by: TJay1724 on March 13, 2011, 04:34:37 pm

Title: openBVE shading and color problems
Post by: TJay1724 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?


(http://img837.imageshack.us/img837/3905/shot1f.jpg)
Title: Re: openBVE shading and color problems
Post by: Simon on March 13, 2011, 04:35:51 pm
It's the time effect for openBVE. It simulates the sun lighting.
Title: Re: openBVE shading and color problems
Post by: TJay1724 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?
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 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)
Title: Re: openBVE shading and color problems
Post by: TJay1724 on March 13, 2011, 05:09:14 pm
Can that be done numerous times throughout the route or just once like in BVE4?
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 on March 13, 2011, 05:52:17 pm
I think it can be done in numerous areas.
Title: Re: openBVE shading and color problems
Post by: TJay1724 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
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 on March 15, 2011, 07:46:30 pm
Ah, that's great you figured it out. This might also help other developers.
Title: Re: openBVE shading and color problems
Post by: TJay1724 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.
Title: Re: openBVE shading and color problems
Post by: Gong Gahou 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.
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 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.
Title: Re: openBVE shading and color problems
Post by: TJay1724 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.
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 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.
Title: Re: openBVE shading and color problems
Post by: TJay1724 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.
Title: Re: openBVE shading and color problems
Post by: Bombardier01800 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.
Title: Re: openBVE shading and color problems
Post by: Simon on March 17, 2011, 05:41:27 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.

Odayku's plugin as well as stock openBVE simulates that. It has something to do with the ATS (or was it ATC), and has nothing to do with the simulator, but with the trains as its a plugin that is supposed to be utilized by the train.
Title: Re: openBVE shading and color problems
Post by: Rayvon on March 17, 2011, 07:01:01 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.

Odayku's plugin as well as stock openBVE simulates that. It has something to do with the ATS (or was it ATC), and has nothing to do with the simulator, but with the trains as its a plugin that is supposed to be utilized by the train.
it's all plugin based. A C++ argument in the plugin trips the train