Bump Shader

Help
gaita
2011-02-18
2013-03-15
  • gaita

    gaita - 2011-02-18

    Hi, I'm trying to use the TGLBumpShader on an object but it's giving me wrong textures.

    What I'm doing is this:

    I have an object .obj with its respective materials -> A.obj and A.mtl
    I use a freeform to load it
    and a MaterialLibrary on the freeform

    so that when I load the object it gets its tectures, but the problem is whe I set the shader on any of the textures:

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      FreeForm.UseMeshMaterials := true;
      FreeForm.MaterialLibrary     := MaterialLibrary;
    end;

    procedure TForm1.LoadDataClick(Sender: TObject);
    var
      Temp: TGLLibMaterial;
    begin
      FreeForm.LoadFromFile('A.obj'); -> loads the object and textures to the MaterialLibrary;
      Temp            := MaterialLibrary.Materials.GetLibMaterialByName('Texture1');
      Temp.Shader := Bump;
      FreeForm.LoadFromFile('Sprites\b.obj'); -> reload the object so to apply changed textures, is there a better way that this?
    end;

    But this way isn't working the current texture gets all gray without any bump

    The project is here:
    http://download843.mediafire.com/22z87bn1vfag/vs2wxir1c97iwd3/Bump2.zip

    can someone please help
    I really apreciate this

    thks

     
  • gaita

    gaita - 2011-02-18

    I really need help on this

    thks again

     
  • Esteban Manuel Cruz Seoane

    Sorry, but my version mismatch with your… I can't check the error, but i watched the texture, the problem i think is the method of fixing the texture.

    Outside of 3D Modeling APPs i don't know how to set it correctly too, i'm making libraries…

    In a quick search i found about the LightMaps, i have not time and my native language is not the english… i don't know if the next page can help at 100%, but… *sighs*
    http://www.gamedev.net/topic/461152-glscene-lightmaps-from-3ds/

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks