2025-07-26 22:17 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003830Spring engineGeneralpublic2013-06-04 16:37
ReporterCarRepairer 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version94.1 
Target VersionFixed in Version 
Summary0003830: Texture for assimp models get inverted alpha from S3O
DescriptionI was told that when Spliff implemented assimp he purposely made it so the texture alpha gets swapped, because when people import models with normally opaque textures they might otherwise get surprised by their entire model being in teamcolor.

Could there be a modrules switch to make it so S3O and assimp are treated identically, please.
Steps To ReproduceLoad two models, one S3O and one assimp, with the same texture. S3O will apply teamcolor to opaque, assimp to transparent.
Additional InformationUnfortunately because I have both S3O and assimp models in my game I am having great difficulty working with Spring's GLSL shader file because of the alpha inversion. The shader file can't detect which kind of model it is so I can make it work only for S3O or only for assimp and not both at the same time.

Despite the fact that I can use jK's luashader gadget for some applications, it does not apply to: ghosted models, projectiles (which cannot be assimp, they may only be S3O), features, possibly more I'm unaware of. So I require the shader file to work consistently.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0010826

spliff (reporter)

Did you try invertteamcolor on the model metadata as described here?:

http://springrts.com/wiki/Units:Textures#Textures_-_Assimp_Model_Formats_.28DAE.2CMDL.2CMD3_and_others_except_OBJ.29

A value of false for invertteamcolor will stop assimp from inverting png/jpg textures.

<modelname>.lua
------------------------------
return {
  invertteamcolor = false
}
------------------------------
Another option is to use DDS textures for all models because assimp can't modify them anyway.

~0010828

jK (developer)

also the customshader gadget supports shader-flags and so easily differing between s3o & assimp shader.

~0010831

CarRepairer (reporter)

spliff: That's good to know, but I am trying to make a game in the most optimal way (it's time consuming enough as it is) so I am not using lua metafiles. I don't want to create 200 lua files to set this flag for each model I have. I'd prefer a one-off solution such as a modrules tag.

jK: In Additional Info, I said your shader gadget is not always applicable (2nd paragraph). I already modified it to recognize s3o vs. assimp, but that doesn't help me where the shader gadget isn't even applied, such as ghosted units, features, projectiles, and so on.
+Notes

-Issue History
Date Modified Username Field Change
2013-06-02 20:01 CarRepairer New Issue
2013-06-04 11:08 spliff Note Added: 0010826
2013-06-04 13:20 jK Note Added: 0010828
2013-06-04 16:37 CarRepairer Note Added: 0010831
+Issue History