Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / 'Scroll object texture' distortion after long time periods

Author
Message
Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 4th Jul 2011 02:15
What's in the title, so basically what i have experienced is that this command makes very little errors at every use. Little, but they are there.

I use a pretextured (in 3d editor program) plain which only shows a small part (12.5% to be exact) of the full texture, which in total is a sequence of an electric spark animation.

I used the 'scroll object texture' command to animate the object.

But i realized after playing my game for 10 minutes, that the texture was getting more and more pixelated, and after an other ten minutes, on the scrolled axis it was only one pixel, while the other axis still had its original 512 pixels resolution.

The scrolled axis's UV data jumped from 64 to 1 slowly but steadily!

After this, i started using the vertexdata commands, to manually scroll the texture, determining the UV coordinates from stable looped variables, now it won't do the distortion no matter how long i test it, so it IS the scroll object texture command's fault.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Jul 2011 16:49
Simple code plus media please.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Jul 2011 15:21 Edited at: 5th Jul 2011 15:22
I'd assume it's because it adds to the UV coords rather than setting their absolute values (causing a loss of precision or something to that effect). Might not be something that can be fixed.



Support a charitable indie game project!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jul 2011 13:23
Quote: "I'd assume it's because it adds to the UV coords rather than setting their absolute values (causing a loss of precision or something to that effect). Might not be something that can be fixed."


Yes, that's why I wanted to see some sample code.

If that is the cause then it should be easy to fix in code by wrapping around the calculated values (similar to the wrapvalue() function).

But the problem could be something else of course.

Let's see some code from Quel.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2011 00:35
Quote: "If that is the cause then it should be easy to fix in code by wrapping around the calculated values"

But what is the correct value to wrap at (taking into account texture scaling)?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2011 18:02 Edited at: 4th Aug 2011 13:25
Quote: "But what is the correct value to wrap at (taking into account texture scaling)?"


Something like this perhaps?



Why do you want to take account of texture scaling?

Edit Fixed minor bug in sample code - the "else" part needs to wrap and increment the scroll.

Edit2 And fixed another one . Hopefully I've got it right this time.

Login to post a reply

Server time is: 2024-03-28 08:26:48
Your offset time is: 2024-03-28 08:26:48