anylogic

How to set a custom texture for a wall (Ped Library)


I was wondering if it was possible to import or use different textures outside of the default Anylogic selections. In particular, I wanted to import a chain-link fence texture for a wall. Looking at the Anylogic help page, there is the setColor() function, but I am unsure how I could use (not a huge coding-whiz) it to reference an uploaded or external texture downloaded off the internet.

My current solution was to just import a 3D object of a chain-link fence which works in the meantime, but I'd rather use the wall markup tool to save headache with scaling them to look better.


Solution

  • When you add a texture to the wall, you are using the Texture class in AnyLogic which has a set of predefined textures.

    Unfortunately, this class doesn't have a visible constructor and it doesn't have a function to use your own texture file.

    So I think it's not possible to do it. If you want a chain link fence, you need to import your own 3D object with the texture you want.