Osm2city.py textures: Difference between revisions

Jump to navigation Jump to search
updated texture atlas restrictions
m (→‎Install texture and lightmap: reflect recent code changes)
(updated texture atlas restrictions)
Line 9: Line 9:
* 'provides' and 'requires' tags, e.g., a texture could require a black roof, while providing a commercial facade.
* 'provides' and 'requires' tags, e.g., a texture could require a black roof, while providing a commercial facade.


Osm2city uses a texture atlas. This improves performance, but has two drawbacks:
Osm2city uses a texture atlas to improve performance. But that places some restrictions:
# Textures can wrap around in at most one direction.
# textures can only wrap around in zero or one direction.
# Textures are scaled to one width (currently hardcoded 256 px)
# textures that don't wrap around must come in 2^n sizes (32, 64, 128px ...)
# textures that wrap around in one direction will be resized to (currently hardcoded) 256 px in that direction


== texGUI.py ==
== texGUI.py ==
Line 90: Line 91:
</syntaxhighlight>
</syntaxhighlight>


See roof examples starting around line 400. Note that also roofs need a lightmap.
See roof examples starting around line 400.<del>Note that also roofs need a lightmap.</del> They no longer need a LM.


Finally, run
Finally, run
153

edits

Navigation menu