Add structures #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
73 of 167 modeled structures have multiple textures, as computed with the following Python script:
Convert
.structo.objwith following Python script.Could check how many textures can be used in my computer GPU. That way, we could try passing all
Downloadstextures asuniforms. On the old VAIO we can have 16 textures, while on my computer we can have textures.Face this error message otherwise:
Maybe reversed map will be a problem for the structures display.
Old VAIO:
On the 191 textures of
Downloads/only 78 are used by structures, thanks to the following Python script:To remove textures that aren't made for structures, you can run:
Note that for instance
glass.svgis kept asglass.pngis used.Can use the following Python script to see textures in this case:
Note that this script returns
solarPowerplant,waterandglass.Well I adapted the ground rendering to fake 78 textures and I haven't retrieved this error on my computer so let's assume a single shader would do the trick. Used this Python script to generates the repeated code:
To generate respectively
STRUCTURES_TEXTURESandSTRUCTURES_TEXTURES_REVERSED:Computer:
Triangle strip won't help us on this one as we have to go from a polygon to the other and this time there is no way to do it cleanly and efficiently. However using an IBO might improve performances.
If I remember correctly there are about 2,000,000 structures instances and 1,000 different structures.
I am unable to generalize the uniforms creation. Which would be quite necessary for the structures as otherwise we need to hardcode their textures. The problem with
UniformsStorage::addis that it returnsUniformsStorage<'n, U, UniformsStorage<'n, T, R>>, but as the encapsulation level is pratically determined at runtime (even if defined in theory at compilation time) the type for the concatenation doesn't seem easily definible correclty. Only one person was having the same problem, according to Google, and he answers me. I should consider his answer.To make many instances of the same object at different places, let's have a look to glium examples. Maybe
,blittinginstancing,picking,shadow-mappingandsprites-batchingare be interesting.pickingseems to be the simplest one matching our needs. Note that none of these examples show how to display two different OBJs, so I guess we have to proceed one-by-one for the OBJs rendering.How to deal with SVGs (
basketball court,blackYellow,glass, note that the latest one is the only one using transparency), as they aren't supported as anImageFormat? Let's use JPG format after rasterizing SVGs, asglass.svgshouldn't exist. Don't forget to modify accordingly.mtlfiles (515.mtland528.mtlhere).Getting the following error when encountering a
.jpgthat is encoded as a PNG:The following Python script gives the textures incorrectly encoded, as their file extensions are accurate as they are more seen by the developer.
mogrify file.jpgencodesfile.jpgto an actual JPEG.Can't use spaces in texture names (notably
basketball court.jpgandiron bars.png), the list can be obtained thanks to the following Python script:Experiencing red borders with transparent texture such as
palm.png.