Jump to content

Alistair

Members
  • Posts

    34
  • Joined

  • Last visited

Posts posted by Alistair

  1. There is no bug. You are trying to load the standard LE font, Arial9, using the abstract path. If you looked at your console log, you will see its not being loaded. And since your code is constantly trying to set a font that is not there, its bogging down the whole process. You need to use the 'incbin::' call to grab LE's embedded font.

     

    RegisterAbstractPath("")
    Graphics(400,300)
    fw=CreateFramework()
    font1 = LoadFont("incbin::Arial9")
    font2 = LoadFont("abstract::ComicSans_24_Bold_Italic_Shadow")
    while AppTerminate()==0 do
    
    fw:Update()
    fw:Render()
    
    SetBlend(1)
    DrawText("Standard LE font",0,60)
    SetFont(font2)
    DrawText("Custom Font",0,100)
    SetFont(font1)
    SetBlend(0)
    Flip(0)
    end

     

    ComicSans_24_Bold_Italic_Shadow.zip

     

    post-14-067046800 1289280381_thumb.jpg

     

    Ahh. lol. Stupid me.

     

    Thanks.

  2. You don't need to use SetFont() in each frame, do it only once before the main loop (or once when switching the font inside the main loop).

     

    What if I draw text for the hud or text above an enemy in various fonts?

    In this example it seems useless to set font each loop, but in my app I draw different text in different fonts in the same loop.

  3. I am having issues setting the fonts with regards to framerate.

    It seems that using SetFont even when the fonts are preloaded slows the system down to 1 or 2 framerates.

    How else would I get around changing fonts when I need to draw text using different fonts in 1 pass through of the code?

     

    Here is an example setting the font to the default each loop.

    In my code I need to change font in various locations, but this simple sample shows the issue.

    I get about 2 frames per second with this sample.

     

    Not sure if just a lua issue or not.

     

    require("Scripts/constants/keycodes")
    
    RegisterAbstractPath("")
    
    if Graphics(1360,768,0,60,0)==0 then
    Notify("Failed to set graphics mode.", 1)
    return
    end
    
    fw=CreateFramework() 
    if fw==nil then 
           Notify("Failed to initialize engine.",1) 
           return 
    end 
    
    SetGlobalObject("framewerk",fw) 
    
    font_arial9 = LoadFont("abstract::Arial9")
    
    ---------------------------------------------------------------------------------------------------------------------
    while KeyHit(KEY_ESCAPE) == 0 do
    
    fw:Update()
    fw:Render()
    
    SetBlend(1)
    SetFont(font_arial9)
    DrawText("test 1", 0, 40)
    SetBlend(0)
    
    Flip(0)
    
    end

  4. Not updated here either.

    I downloaded the 2.32r4 installer (http://leadwerks.com/werkspace/index.php?/files/file/145-leadwerks-engine-sdk-232/) and did a new install.

    I ran the updater and it updated almost everything, which made me think that it was reverting it to the previous version.

     

    Is there a new SDK Updater?

     

    Here is an image of the update I did today which only updated 1 file and a view of my version.txt.

     

    post-269-12747151006451_thumb.jpg

     

    I think the SDK Installer I used reverted it to the previous version?

     

    EDIT : Nevermind. I got the updated installer. Testing now.

  5. Is it possible to have a setting for the default height at which meshes are placed.

     

    What I mean is the meshes that you paint, not placing individual models.

     

    This way I could set them at a negative value and eliminate the issue where some trees have their base above the terrain on slopes.

     

    Not sure if this is a simple change to your engine.

    Can be a global setting that is applied to all meshes or individual mesh entries. Either way would work for me.

     

    Attaching an example of what I mean.

    post-269-12715149182105_thumb.png

  6. Yeah. I got UU3d Pro, but I am a programmer first, so was kinda hoping not to have to dig into that, but I guess I will have a play then cutting up the image.

     

    Image is 50/50 so easy to cut it and make 2.

     

    Murphy's Law I would choose the first one to convert that has an issue from 150 odd models I bought. lol.

     

    Thanks for help tho guys.

  7. All my trees from Dexsoft packs came with two textures .. one for the trunk and one for the leaves, so I'm not quite sure whats going on there. They sometimes provide an image of the whole tree to be used as a billboard for the final LOD.

     

     

    I bought the vegetation pack 1. http://www.dexsoft-games.com/bundles/vegetation1.html

     

    This is what I got as an example of oak2 folder.

     

    15/05/2008 19:28 355,480 oak1_bw.tga

    23/03/2008 10:35 1,358,741 oak1_c.tga

    25/03/2008 15:50 1,388,477 oak1_n.tga

    15/05/2008 19:28 142,014 oak1_o2.tga

    23/03/2008 10:54 142,014 oak1_op.tga

    15/05/2008 19:27 361,494 oak1_sp.tga

    15/05/2008 20:45 298,608 oak2_lod.png

    17/05/2008 11:43 100,997 oak2_lod.tga

    16/05/2008 11:16 40,654 oak_2.3ds

    18/05/2008 17:01 38,100 oak_2.b3d

    18/04/2009 11:04 87,091 oak_2.dae

    18/04/2009 11:04 203,408 oak_2.fbx

    18/04/2009 10:45 53,502 oak_2.lwo

    18/05/2008 17:59 2,839,580 oak_2.mdl

    18/05/2008 16:59 109,149 oak_2.ms3d

    16/05/2008 11:16 348 oak_2.mtl

    16/05/2008 11:16 102,780 oak_2.obj

    18/05/2008 17:00 137,024 oak_2.txt

    16/05/2008 11:15 156,754 oak_2.x

    16/05/2008 11:16 836 oak_2_lod.3ds

    18/04/2009 11:05 4,896 oak_2_lod.dae

    18/04/2009 11:05 19,376 oak_2_lod.fbx

    18/04/2009 11:05 1,338 oak_2_lod.lwo

    18/05/2008 18:01 348,676 oak_2_lod.mdl

    18/05/2008 17:06 965 oak_2_lod.ms3d

    16/05/2008 11:16 329 oak_2_lod.mtl

    16/05/2008 11:16 730 oak_2_lod.obj

    18/05/2008 17:07 937 oak_2_lod.txt

    16/05/2008 11:15 4,381 oak_2_lod.x

    15/05/2008 20:47 263,222 o_lod_o2.bmp

    15/05/2008 20:48 175,917 o_lod_o2.tga

    15/05/2008 20:48 55,855 o_lod_op.tga

     

     

    Contents of oak2.mtl and shows only the full image.

     

    #

    # Wavefront material file

    # Converted by the DEEP Exploration Deep Exploration 5 5.0.3.1555 Release

    # Right Hemisphere, LTD

    # http://www.righthemisphere.com/

    #

     

    newmtl oak1Mat

    Ka 0 0 0

    Kd 1 1 1

    Ks 0.0075 0.0075 0.0075

    illum 2

    Ns 22.6274

    map_Kd oak1_c.tga

    map_bump

    bump

    map_opacity

    map_d

    refl

    map_kS

    map_kA

    map_Ns

     

    The file oak1_c.tga is the full texture and when converting using obj2gmf it produces 1 surface looking for oak1_c.mat

     

    Also I notice if I convert using obj2gmf the tree is on it's side in the scene in model viewer, but correct when converting the fbx versions.

     

    Seems that some trees do have 2 textures, but others not.

    Not sure if others have come across these trees yet then I guess.

  8. Seems that the luac.exe has been flagged by Zone Alarm.

    Everytime I update, my antivirus quarantines this file and I therefore am pretty screwed.

    I have read 1 other post on the web that another person has this issue with another 3d app that uses luac.exe and avg anti virus.

     

    Anyone else had this?

     

    post-269-12677781201473_thumb.png

  9. How did you guys convert vegetation packs?

    The trees seem to have a single texture.

    I can convert these models ok to gmf, but with a single texture, the object doesn't work correctly as the shaders for the trunk and branchs need to be different.

     

    Is this the case?

     

    Do I need to split it somehow?

×
×
  • Create New...