BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Textures: Altering of the default load behaviour (Test please!)

3 posters

Go down

Textures: Altering of the default load behaviour (Test please!) Empty Textures: Altering of the default load behaviour (Test please!)

Post by leezer3 Tue Jan 17, 2017 2:44 pm

Today's build (17th January 2017) contains a small change to the way that some textures are loaded into the simulation.

First, a picture from 1.5.0.9:
Textures: Altering of the default load behaviour (Test please!) 1z6xg5j

Second, a picture from today's daily build:
Textures: Altering of the default load behaviour (Test please!) Sg1vyo

You can hopefully see that in prior builds, there's a visible seam between the different textures on this loco front. (SteveGR's Class 47s)

From my digging, this behaviour appears to have appeared in Michelle's v1.4.0.5, where non-static objects seem to have been changed to force RepeatRepeat as the texture repeat mode, which would appear to me to be a bug.
Testing, I can't see any downsides to the change I've made, but could really do with someone else looking to see if they can see any oddities.

I'd also like someone else to confirm using Steve's 47s (Or anything else that shows this!) that this has vanished for everyone Smile
Specifically, any changes will be visible on either train objects, or animated objects containing functions within the world.


One new command has also been introduced for .b3d and .csv objects as part of this change:
CSV:
SetWrapMode
B3D:
WrapMode

This may be set to RepeatRepeat ClampRepeat RepeatClamp or ClampClamp and controls the OpenGL wrap mode used for that texture/ face.
(It's very hard to explain simply what this does, but if you want to change it from the default, you should know how it works)

Due to the differences between the main program and the viewers, this is only supported in the main program.


Cheers

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Textures: Altering of the default load behaviour (Test please!) Empty Re: Textures: Altering of the default load behaviour (Test please!)

Post by call2 Thu Jan 19, 2017 11:44 pm

It looks fine now, Chris.

I've looked at several train externals, and there is no sign of any thin black lines now.

Tony

call2

Posts : 53
Join date : 2011-08-31

Back to top Go down

Textures: Altering of the default load behaviour (Test please!) Empty Re: Textures: Altering of the default load behaviour (Test please!)

Post by Marc Riera Fri Jan 20, 2017 3:10 pm

Thanks for this small tweak, it was very annoying in some case.

I wonder if there would be any side effects if this was applied to static objects too, because I have noticed it in static parts in a train I am developing. You can get the train here if you need it: http://bvebarcelona.tk/en/downloads/trains/3000-series/

In the screenshot attached to this message you will see what I mean. The transparency setting in OpenBVE is set to "Smooth".

Thank you!
Attachments
Textures: Altering of the default load behaviour (Test please!) Attachment
Texture_Error.png You don't have permission to download attachments.(66 Kb) Downloaded 9 times

Marc Riera

Posts : 28
Join date : 2015-12-21
Location : Barcelona, Spain

Back to top Go down

Textures: Altering of the default load behaviour (Test please!) Empty Re: Textures: Altering of the default load behaviour (Test please!)

Post by leezer3 Sat Jan 21, 2017 12:46 pm

Hmm....

The short answer is that I'm not sure that implementing a generic fix for this won't break something else, or at least make some stuff look worse Sad
Michelle's code is essentially determining the wrap mode based upon the entire model, rather than for each texture in turn, which would probably be the 'conventional' way of doing things.

The fix described in the first post just rolls back the behaviour to that prior to 1.4.0.5 , which introduced a (probable) bug whereby dynamic and static objects were treated differently.

To fix these seams with the current build:
Add the following code to the end of the texture declaration of any face exhibiting the issue (ParetCab.png, plus the handrail textures I can see)
Code:
SetWrapMode,Clamp,Clamp

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Textures: Altering of the default load behaviour (Test please!) Empty Re: Textures: Altering of the default load behaviour (Test please!)

Post by Marc Riera Sat Jan 21, 2017 2:45 pm

Thank you, the new command is very useful and I will use it from now on. As you said, it is better to stick to the command rather than breaking compatibility while trying to fix the issue from the program itself.

Marc Riera

Posts : 28
Join date : 2015-12-21
Location : Barcelona, Spain

Back to top Go down

Textures: Altering of the default load behaviour (Test please!) Empty Re: Textures: Altering of the default load behaviour (Test please!)

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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