Graphics

 View Only
  • 1.  Can you link to a material outside of the material manager?

    Posted 10-29-2015 15:38
    I'm not sure where I saw (heard about) it, but is it possible to link a quad to a material on the PC and outside of the material manager?

    Nu


  • 2.  RE: Can you link to a material outside of the material manager?

    Posted 10-29-2015 16:37
    Follow up question, if I replace the 'Material Face' with an image file that resides on the PC, are there any problems associated with it that I should be aware of?

    Nu

    #XPression


  • 3.  RE: Can you link to a material outside of the material manager?

    Posted 10-30-2015 14:04
    As far as I'm aware, you need to have a material assigned, but you can change the image shader on that material. We do it here via scripting, specifically for elections. Each candidate has a photo on a drive in a specific location, saved as their last name as a .png. We then just use a script to grab their last name and add it to a filepath that will pull the picture and assign it to the shader.

    dim pictag as xpTextObject

    dim filepath as String

    dim pic as xpBaseObject

    dim picmat as xpMaterial

    dim picshad as xpBaseShader

    dim i as Integer

    for i = 1 to 2

    Self.GetObjectByName("Last " & i, pictag)

    filepath="D:/!CURRENT/ELECTIONS/HEADSHOTS/" & pictag.Text & ".png" 'sets the filepath

    Self.GetObjectByName("Pic " & i, pic) 'gets the quad object

    pic.GetMaterial(0, picmat) 'gets the quad's material

    picmat.GetShader(0, picshad) 'gets the quad's material's shader

    picshad.SetFileName(filepath) 'sets the shader's filepath to the above filepath

    next i


    #XPression


  • 4.  RE: Can you link to a material outside of the material manager?

    Posted 10-30-2015 19:19
    It's possible to assign an image directly to quad without using a material by using the script function xpBaseObject.SetVolatileTextureFile. This function creates a temporary material in the background that automatically gets disposed of when no longer needed.

    #XPression


  • 5.  RE: Can you link to a material outside of the material manager?

    Posted 11-04-2015 14:17
    Thank you Dan and Brian, that's what I was hoping to hear. Much appreciation!

    Nu

    #XPression