Removing Black or Blue Rectangles from behind Objects

View previous topic View next topic Go down

Removing Black or Blue Rectangles from behind Objects

Post by johnsinden on Wed Dec 28, 2011 5:54 pm

Hope you've all had a great Christmas and looking forward to the New Year. My query is simply this - how can you remove the annoying black, sometimes blue or dark brown rectangles from behind some of the objects (mainly trees, shrubs and bushes) particularly in BVE 4 Routes. Other annoying features are the grey rectangular shapes "behind" the tops of the catenaries. Have tried to do this myself, but either end up removing the whole object (tree, bush etc) or end up with a white rectangle which hides the scenery behind it. There must be a simple solution, any ideas???

Cheers,

John
avatar
johnsinden

Posts : 210
Join date : 2011-09-19
Age : 64
Location : Southampton, UK

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by lonelyinardwick on Wed Dec 28, 2011 7:14 pm

I presume this is a transparency problem, most catenary textures have a background (mostly blue, black, red, green, etc). They're there so that BVE uses RGB (red, green, blue) references to cancel out the background colours.

If this is the case, make sure the RGB references background colours are the same as the RGB reference in its object B3D or CSV file.

For example, if the background colour is blue (0, 0, 225), make sure the value/reference in the Transparent or SetDecalTransparentColor command in the object's B3D or CSV file is also 0, 0, 255

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by johnsinden on Wed Dec 28, 2011 9:26 pm

Thanks Wongie, but that's all gobbledigook to me, perhaps you could explain to me how you do that......?


Cheers,

John
avatar
johnsinden

Posts : 210
Join date : 2011-09-19
Age : 64
Location : Southampton, UK

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by lonelyinardwick on Wed Dec 28, 2011 9:52 pm

If you read more carefully, I've actually explained it what you need to do to solve the problem. Should you request in simpler forms, just ask. Smile

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by 92220 on Thu Dec 29, 2011 11:30 am

Each texture has a file related to it. The texture (image) should be in RGB mode for it to work properly.

So if the image background is black, after the image is loaded in a CSV file, it should say
SetDecalTransparentColor,0,0,0,

However in a B3D file it should say
Transparent 0,0,0

If the image background is blue the values are 0,0,255

One of the problems with old routes is sometimes one or more of the values is set to 256, and OBVE complains about this as an error.

The you get the texture that no matter what you do still presents a black square, in which case what I do is make it blackest black with my "paint program"; for example People17 is very annoying in certain routes.


Last edited by 92220 on Thu Dec 29, 2011 12:39 pm; edited 1 time in total (Reason for editing : Values corrected)
avatar
92220

Posts : 283
Join date : 2011-10-09
Age : 66
Location : Buckinghamshire, England

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by 92220 on Thu Dec 29, 2011 11:52 am

that's all gobbledigook to me,

This is to let "clueless newbies" know that the person using the "gobbledigook" is a "leet programmer". The fact that the "clueless newbie" might find it "weird and disturbing" doesn't filter up to their elevated level. Twisted Evil

You could try "The Eejits Guide to Object Building" available at GrayMac's site. This doesn't use "gobbledigook".

http://www.celtictrainsim.com/

P.S. For "weird and disturbing" read "cold, unwelcoming, and unfriendly to newcomers" and yet they wonder why there is nobody rushing forward to become developers.


Last edited by 92220 on Thu Dec 29, 2011 1:30 pm; edited 1 time in total (Reason for editing : Clarification)
avatar
92220

Posts : 283
Join date : 2011-10-09
Age : 66
Location : Buckinghamshire, England

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by thehoviskid on Thu Dec 29, 2011 12:13 pm

92220 wrote:
If the image background is blue the values are 0,0,225

*cough* 255, surely.....
avatar
thehoviskid

Posts : 134
Join date : 2011-07-09
Age : 39
Location : Heysham

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by 92220 on Thu Dec 29, 2011 12:37 pm

*cough* 255, surely.....

Yea. that's a great idea. Thanks for being awake. I'm obviously not. Need more coffee. Very Happy
avatar
92220

Posts : 283
Join date : 2011-10-09
Age : 66
Location : Buckinghamshire, England

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by graymac on Thu Dec 29, 2011 3:47 pm

And chips!!!!
avatar
graymac

Posts : 1740
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by LabRatAndy on Thu Dec 29, 2011 4:52 pm

This problem is only found in BVE4 era routes as the problem is due to the way that BVE4 can accept transparent "marker" colours that aren't quite the right shade of Blue, Black, Green, etc. No one really knows why this is the case, but that's irrelevant really.
To fix the problem, there are 2 options available to you.
1, Download the openBVE compatible version if there is one which, shouldn't have the issue.
2, If the route doesn't/ wont get and openBVE version. Your left with correcting the transparent "marker" colour yourself. It's complicated to explain but not actually that hard to do, just time consuming if their are lots of textures to do.

1, Navigate to the object folder for the route, found in the openBVE folder under "routes/objects".
2, Open a texture with a photoeditor like paint.net (its free to download), best to start with the first in the list.
3, If its got a transparent area (the blue, black or green etc) you need to change the colour to one of the following RGB values(Depending on the colour).
For Blue use RGB Value: 0,0,255
For Green use 0,255,0
For Red use 255,0,0
for Black use 0,0,0
4, Save the change and do the same for all the textures in that folder and any sub folders present.


LabRatAndy

Posts : 95
Join date : 2011-08-29

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by johnsinden on Thu Dec 29, 2011 9:04 pm

Thanks very much for all that advice - I'm going to have a go at this and will let you all know of the outcome.

Cheers,

John
avatar
johnsinden

Posts : 210
Join date : 2011-09-19
Age : 64
Location : Southampton, UK

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by vpodhola on Wed Jan 11, 2012 7:33 pm

I have modified many routes from BVE 4 to openBVE. I use the Czech programme Zoner Photo Studio (ZPS) which is able to show not only the image of the object but also appropriate file .csv or b3d. I open the file .csv and if the the colour is defined as 0,0,255 and you see blue colour which is not transparent, it means that the author used blue colour but a little darker or lighter. It is necesary to edit the colour. It means that I select blue colour 0,0,255 and replace with this correct colour not correct blue.
The problem is that it takes some time, I modified for example one route with many objects 3 hours, it needs "lead backside".
Sorry for my not perfect English!
avatar
vpodhola

Posts : 38
Join date : 2011-10-30
Age : 74
Location : Hradec Kralove, Czech Republic

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by busheyheath on Wed Jan 11, 2012 8:37 pm

Anyway, you got the hang of it now!
avatar
busheyheath

Posts : 294
Join date : 2012-01-05
Location : Netherlands

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by johnsinden on Wed Jan 11, 2012 9:33 pm


Thank You for your suggestions Vpodhola, which, given time, I'll have an attempt at solving. Your English is excellent and is much better than my Czech...!

Regards,


John
avatar
johnsinden

Posts : 210
Join date : 2011-09-19
Age : 64
Location : Southampton, UK

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by Dexter on Thu Jan 12, 2012 5:28 am

johnsinden wrote:
Thank You for your suggestions Vpodhola, which, given time, I'll have an attempt at solving. Your English is excellent and is much better than my Czech...!

Regards,
John

Nice. Very Happy
avatar
Dexter

Posts : 1824
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by Dexter on Thu Jan 12, 2012 5:33 am

Just to the topic - many older routes for BVE have the transparency problem because of the following: they use old *.bmp textures, which have 8-bit resolution. The transparency problem is a problem of conversion, since many of the textures were originally created as 16- (or 32-) bit and then converted to 8-bit. During the conversion, the blue color (255,0,0) is converted into 252,4,2 or something like that. The problem is analogical green or red color.
Therefore my suggestion is to detect the actual color with any graphic software and then ovewriting the line "SetDecal..." to the color you have found. It saves time. Smile


Last edited by Derryck on Thu Jan 12, 2012 12:12 pm; edited 2 times in total
avatar
Dexter

Posts : 1824
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by 92220 on Thu Jan 12, 2012 6:17 am

Thanks Derryck! If only I'd known that before I "fixed" the textures in Clarendon. Embarassed
avatar
92220

Posts : 283
Join date : 2011-10-09
Age : 66
Location : Buckinghamshire, England

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by LabRatAndy on Thu Jan 12, 2012 7:18 pm

Either way would work.
For me changing the colour makes more sense, I think it would be the quicker method but do whichever is easiest for you.

LabRatAndy

Posts : 95
Join date : 2011-08-29

Back to top Go down

Re: Removing Black or Blue Rectangles from behind Objects

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum