Texturing models at creation question

About Monkey 2 Forums Monkey 2 Programming Help Texturing models at creation question

This topic contains 4 replies, has 2 voices, and was last updated by  EdzUp 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12140

    EdzUp
    Participant

    As you can see I create the relevant materials etc (I have tried them with New as well so New PbrMaterial etc to no avail). Is there a way to get the textures to load and be on the created sphere as currently I get a white sphere.

    I have attached a Backing.png file that was used for this text it goes into Assets/Models directory in the source directory. It is also a class for a much larger project and I call the initialise function at creation time to make a backing sphere for the game.

    Attachments:
    #12170

    EdzUp
    Participant

    anyone have an example of texturing a entity I have trawled through the bananas and examples but couldn’t find anything?

    #12173

    nerobot
    Participant

    At a first look there is a mistake in path to texture:

    PbrMaterial.Load( AssetsDir()+"Backing.png",...

    you missed Models/ folder:

    PbrMaterial.Load( AssetsDir()+"Models/Backing.png",...

    #12174

    nerobot
    Participant

    Look at example of PBR here: monkey2 \ modules \ mojo3d \ tests \ pbrspheres.monkey2.

    #12175

    EdzUp
    Participant

    Nah importing Assets/Models/ at the top.

    It was because I didn’t set the texture in a directory, MonkeyX2 requires ALL PbrTextures to be a directory containing the image files renames color.png etc.

    All I have to work out now is how to make a texture fulbright and I’m away 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.