openBVE rendering issue.

View previous topic View next topic Go down

openBVE rendering issue.

Post by lonelyinardwick on Fri Nov 25, 2011 11:18 pm

I've made a floor from a single planar face, but I repeated the texture four times using the coordinates.
At first, it looks just as fine as in ObjectViewer, but the texture creates "transparent lines" in openBVE



Code:

;floor

createmeshbuilder,
addvertex,1.4,1.08,9.725,
addvertex,-1.4,1.08,9.725,
addvertex,-1.4,1.08,-9.5,
addvertex,1.4,1.08,-9.5,
addface,1,0,3,2,
loadtexture,..\textures\floor.png
settexturecoordinates,0,0,0
settexturecoordinates,1,1,0
settexturecoordinates,2,1,4
settexturecoordinates,3,0,4
The repeat is clearly seen in both screenshots,
but they have two different results, yet the code stands innocent.
What should I do?

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: openBVE rendering issue.

Post by Northern Line on Sat Nov 26, 2011 12:20 am

I had also realised this when I was making the platform in route building. More on this later gtg head off to bed in a bit
avatar
Northern Line

Posts : 281
Join date : 2011-07-12
Age : 24
Location : Tooting, London, England

http://www.bve-district.co.uk/

Back to top Go down

Re: openBVE rendering issue.

Post by Northern Line on Sat Nov 26, 2011 2:41 am

Ok well what I did wongie was move the vertexes closest together till the transparent line is no longer seen. But this problem was when I was making a route on openbve. On routeviewer there were no invisible gaps or transparent lines but I could see them well on openbve. Weird :s
avatar
Northern Line

Posts : 281
Join date : 2011-07-12
Age : 24
Location : Tooting, London, England

http://www.bve-district.co.uk/

Back to top Go down

Re: openBVE rendering issue.

Post by mrknowitall on Sat Nov 26, 2011 3:19 am

This has being mentioned umpteen amounts of time. The Wicked witch of the west cracks her whip and blames us, the developers. its a KNOWN issue to which she has no idea how to fix.
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: openBVE rendering issue.

Post by Dexter on Sat Nov 26, 2011 7:00 am

Well, in my case it helped to save the texture in Photoshop: Save for web and devices -> Untick "Transparency". png textures sometimes contain their own alpha channel and if you don't tell the software to remove it will create this sort of mess.

To answer a possible question; no you don't have to set anything in the csv file, the alpha is simply contained within the png texture file. See here to get more details.

Just a thought though, but it helped me solve my case, so you might want to try this.
avatar
Dexter

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

http://www.brnobve.eu

Back to top Go down

Re: openBVE rendering issue.

Post by graymac on Sat Nov 26, 2011 11:48 am

If the problem is suspected to be a hidden alpha channel, try substitutiing a bmp image temporararily. bmp doesn contain alpha, so if that clears the transparency you need look no further than doctoring you image file.
avatar
graymac

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

http://www.celtictrainsim.com

Back to top Go down

Re: openBVE rendering issue.

Post by mrknowitall on Sat Nov 26, 2011 12:10 pm

wongie may i ask on your location of your image just above your set textures you put two dots ( /../) why is this?
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: openBVE rendering issue.

Post by graymac on Sat Nov 26, 2011 12:22 pm

path to folder
avatar
graymac

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

http://www.celtictrainsim.com

Back to top Go down

Re: openBVE rendering issue.

Post by theflyingoreo on Sat Nov 26, 2011 12:34 pm

I've had the same issue and raised it to michelle on the forums and it turns out my texture sizes were wrong.

Maybe this is the issue?

theflyingoreo

Posts : 96
Join date : 2011-07-09
Location : Sydney Australia

http://www.facebook.com/sydneybve

Back to top Go down

Re: openBVE rendering issue.

Post by Dexter on Sat Nov 26, 2011 12:45 pm

Ah yes, the texture dimensions, each those has to represent a 2 powered... 64,128,256,512 pixels etc.


Last edited by Derryck on Sat Nov 26, 2011 9:58 pm; edited 1 time in total
avatar
Dexter

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

http://www.brnobve.eu

Back to top Go down

Re: openBVE rendering issue.

Post by graymac on Sat Nov 26, 2011 12:50 pm

I had an issue with a (borrowed) background image where I couldn't fathom out why a dark vertical line at he intersection presented itself and couln't be found on the image. That was due to size >2 fault, and resizing fixed it. I doubt if that is Wongies answer in this case as it is transparency appearing wrongly, and quite a wide band of it.
It is still worth inspecting, all the same.
avatar
graymac

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

http://www.celtictrainsim.com

Back to top Go down

Re: openBVE rendering issue.

Post by mrknowitall on Sat Nov 26, 2011 1:01 pm

i do that with my textures though through three folders and with only forwards slashed and no dots?
avatar
mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 25

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: openBVE rendering issue.

Post by graymac on Sat Nov 26, 2011 1:08 pm

Don't worry, MrK. The "load texture" code line is not part of the problem unless it is linking the wrong texture file to the mesh. I don't suppose Wongie would be that stu . . . . . . . . . No! No way.
avatar
graymac

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

http://www.celtictrainsim.com

Back to top Go down

Re: openBVE rendering issue.

Post by graymac on Sat Nov 26, 2011 2:12 pm

It might be noted that this topic is duplicated on OBVE. A satisfactory likely explanation was provided there by Michelle three and a half hours ago.
There is a limitation though that might cause this on some graphics cards: v1.3.1 still does not resize textures to a power of two, which leaves the graphics driver to do that job if it feels this is necessary. This can change alpha values in the texture which openBVE might have asssumed to be different. Please check if your texture is power of two and report back.
This implicates sizing and alpha together with certain graphics cards.
avatar
graymac

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

http://www.celtictrainsim.com

Back to top Go down

Re: openBVE rendering issue.

Post by lonelyinardwick on Sat Nov 26, 2011 2:39 pm

Derryck wrote:textures sometimes contain their own alpha channel
Nope, I don't have aphas channel in my texture, all 4 corners are covered..

graymac wrote:try substitutiing a bmp image temporararily. bmp doesn contain alpha
I have actually thought about that, BMP can be quite helpful at times, I'll do that soon..

mrknowitall wrote:you put two dots ( /../) why is this?
it allows to go back one folder, if the texture is not in the current folder or the subfolder within the current folder.
eg: my meshes folder contains all my csvs, but my textures folder contains all my textures,
how to i reference my textures if it's not in the current folder (if you can't go forward)?
easy, go backwards. that's why i put "..\" before putting "texture\" and then "floor.png"

Northern Line, mrknowitall, RachelBerryFan47, and graymac wrote:
  • I could see them well on openbve. Weird :s
  • its a KNOWN issue to which she has no idea how to fix.
  • It turns out my texture sizes were wrong.
  • That was due to size >2 fault, and resizing fixed it.
That's correct, Michelle said the texture may not be power of two. So I'll report back to both forums for the results.

mrknowitall wrote:with only forwards slashed and no dots?
fowards slash or backwards slash, it doesn't matter for openbve because it's still a slash. some use the japanese yen!

graymac wrote:I don't suppose Wongie would be that stu... No! No way
Oi, pack it in ya' git! Twisted Evil

graymac wrote:It might be noted that this topic is duplicated on OBVE.
That's correct. http://openbve.freeforums.org/openbve-rendering-issue-t2470.html

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: openBVE rendering issue.

Post by lonelyinardwick on Sat Nov 26, 2011 6:17 pm

Okay, I've resized the texture and can happily say it has fixed the problem Smile

lonelyinardwick

Posts : 375
Join date : 2011-07-24

https://about.me/lonelyinardwick

Back to top Go down

Re: openBVE rendering issue.

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