the-butterfly-effect / tbe

The Butterfly Effect, a realistic physics simulation game
http://the-butterfly-effect.org
GNU General Public License v2.0
95 stars 13 forks source link

Linear interpolation for textures. #276

Open cryham opened 8 years ago

cryham commented 8 years ago

It's really visible to me that you're using point (closest) interpolation for textures. IMO looks bad, makes the textures clearly obvious (or just different) while there are many nice smooth gradients in the game.

Especially visible on concrete, brick walls that are very stretched (long or big). E.g. level 16. A better solution would be to use some texture repeat (higher U or V for such cases).

cryham commented 8 years ago

Also the move icon (arrows crossed) has this. And worse IMO is that it doesn't keep the aspect ratio, I think it should stay square.

Wuzzy2 commented 8 years ago

Agreed. See also #216. Note that TBE uses SVG images for many images so scaling is not too bad sometimes. See the birch wood texture. But floors and walls and a few other things use still raster graphics, we want to replace them with SVGs, too.

That doesn't solve the general problem, of course, see #216.

I guess in the second comment cryham meant the overlay on objects when you move them, not actually the icon. Yes, here the stretching is horrible, especially for long objects. This also affects rotation and scaling.

I think a simple texture overlay just won't cut it here and won't be solved by simply keeping the aspect ratio, it is IMO a core feature of the game to allow scaling objects without keeping their aspect ratio. One spontanous first idea would be to make a simple-colored general overlay for moving/scaling/rotation and another icon-based overlay on top of it with a somewhat fixed size and/or aspect ratio. I.e. the movement overlay arrow could be centered, as well as the rotation thing. Scaling would be a bit trickier, as this requires 2 or 4 arrows.

kaa-ching, what do you think?

kaa-ching commented 8 years ago

Texture interpolation can be implemented better once we switch to the new QQuickView, which is what I'm working on right now. See http://doc.qt.io/qt-5/qml-qtquick-image.html#fillMode-prop for more details on what the programmers API looks like, I'll still have to make it into a TBE property somehow.