Set wrap mode in material file


I’m wondering if it’s possible to define a texture’s wrapmode in the Material (j3m) file. It would make it easier to see an objects final appearance in jmp (and save some code).


It’s not possible, but it could be a good feature indeed.

@Momoko_Fan what do you think?

Could it be possible to add a flag behind the path in the J3m file

like m_DiffuseMap “my/path/texture.png” REPEAT

or a m_DiffuseMapWrapMode repeat parameter…but we would have to add it for each map, and it wouldn’t be used in the shader…

Already there:

m_DiffuseMap : Repeat my/path/texture.png

You can also specify Flip, but if you specify both Flip has to be before Repeat


Excellent! Thanks

Added info to wiki for future reference

Remember to reassign the material to the object after having added “Repeat”.

Repeat seems to work as expected, i can’t however get Flip to work, either with or without Repeat.

[java]m_DiffuseMap : Flip Repeat Textures/World/Building/[/java]

The material works, it’s just that Flip doesn’t seem to do anything.

On a side note: When assigning the material to the object, a new instance of the material is created. Does this happen in the engine when loading several instances of the same object, or several objects with the same material, or does the asset manager keep track of the materials to avoid excessive memory usage?

The textures and shaders are reused, the rest of the data is never “excessively” big.