Jump to content

Eric

Members
  • Posts

    30
  • Joined

  • Last visited

Posts posted by Eric

  1. Ok once I have the Yaw Angle.. Which I Do... How do I use the AddBodyTorque and CalcBodyOmega to turn the Model only on the Y Axis to face the calculated Yaw Angle...

     

    Nothing I seem to Try Works

    float Angle=atan2(Position.X-PreviousPos.X,Position.Z-PreviousPos.Z) * 180 / PI;
    AddBodyTorque(Model,CalcBodyOmega(Model,Vec3(0,Angle,0))*ModelMass,0);
    

     

    This is my latest try...but I'm getting something wrong.

     

    Is this the right way to Apply Torque only on the Y axis?

     

    Thanks,

    Eric

  2. You need the UV coordinates of the area that you want to draw, then you need the GL_TEXTURE_CORD_ARRAY state and you need to use glTexCoordPointer, and glVertexPointer and glDrawArrays to draw your image.

    You can use my little 2d library if you want, it gives alot of nice drawing functions, like frames of images like in blitzmax native 2d stuff, a fast image text system, and some other stuff that makes life easyer with 2d,bmx and leadwerks.

    PM me if you want it

     

     

    edit:ooops that thread is very old...

     

    Thanks... I sent you a message.

     

    Eric

  3. How can I select and draw a portion of an Image. I have a 1024 x 1024 Image that consists of various buttons and display parts,

     

    Currently I use this code to Draw and Rotate an Image, but I am unsure how to select a section of my image to draw.

     

    Function DrawAndRotateImage(itr:TTexture, Ax:Int, Ay:Int, Sx:Int, Sy:Int, Ir:Float)
           glMatrixMode(GL_TEXTURE)
           glLoadIdentity()
           glTranslatef(0.5,0.5,0)
           glRotatef(Ir,0,0,1)
           glTranslatef(-0.5,-0.5,0)
           glMatrixMode(GL_MODELVIEW)
           glEnable itr.Target()
           itr.Bind()
           itr.Clamp(1,1,1)
           DrawRect(Ax,Ay,Sx,Sy)
           glDisable(GL_TEXTURE_2D)
           glMatrixMode(GL_TEXTURE)
           glLoadIdentity()
           glMatrixMode(GL_MODELVIEW)
           glScalef(1,1,1) 
    End Function

     

    How can I add to this code to allow me to select a portion of the image.

     

    Thanks for any help.

    Eric

  4. If I create a Ball joint between two Bodies, The first body is a box with mass 1 sitting on the "Ground" I have another body that is moving past it and above it.

     

    When I create the joint how is it oriented in relation to the two Bodies? I assume the ends are at the parent and child but the Position of the "Pin" If I use Vec3(0,-1,0) Where does the pin get created? Is it local to the parent? I can't seem to get these things to work.

     

    Basically, I want the Child to kind of dangle below the Parent, allowed to swing .

     

    I hope I made sense.

     

    Any insight would be greatly appreciated.

     

    Thanks,

    Eric

  5. the lua script 'utilities.lua' shows how to get the parent/model of the mesh... or search for GetMeshModel in the forum search and you should find examples of getting the model/body from the picked mesh...

     

     

    I work in BMax.. and I can't seem to get this to work.

     

    Function GetMeshModel:TEntity(entity:TEntity)
    While entity <> Null
    
    	If GetEntityKey(entity, "class") = "Model"
    
    		return entity
    	End If
    	entity=entity.parent
    Wend
    End Function
    

  6. The heightmap and alphamap are saved to the same folder as the SBX file... MAPS. The textures used are kept in the Materials Folder under the Terrain folder.

     

    If you are wanting to paint details into your terrain then I would suggest that you use the editor.

     

    and the wiki has info for the Terrain commands, but all of this can easily be just achieved by just loading the scene/SBX file.

     

    Is there more overhead using a Scene/SBX file?

     

    The Textures are in the materials folder... Can I move these to my own project folder? I'm a little confused as to the layout of this.

     

    Thanks,

    Eric

  7. When I save the terrain from the editor..after adding a texture.. I get the SBX file... but where are all of the textures saved too?

     

    If all I want is a textured terrain, is it better to load the heightmap and add the textures in code or load the SBX file?

     

    How does all of this work.

     

    Is there a Manual for Leadwerks engine? I saw the editor manual. But I'm looking for a language manual.

     

    Is there a terrain tutorial?

     

    Thanks,

    Eric

  8. when in the modelviewer, click on the Surfaces shown in the treelist on the left. It will tell you what your material name is... if nothing is defined there then you do not have your textures set correctly in blender... open up a working model like the oildrum.gmf for comparison...

     

     

    Yeah there is nothing there... darn... now I need more time to figure out blender. Nothing is simple!! hahahah

     

    I just don't understand that the .mtl file exported with the .obj file contains the correct materials.

     

    Back the the drawing board.

  9. Try loading the gmf up inside the leadwerks model viewer and see if the material names show up. The main issue I had was the .mat wasn't matching the name of the material inside blender.

     

    If this doesn't make any sense, I'll check and post some screenshots of what I mean when I get home.

     

    I just get the model with no textures in the model viewer.. I check the .dds maker and it is set up properly with Mipmaps and DXTC5 formating.

     

    If you have been successful exporting Blender into LE I would appreciate any help you can offer.

     

    I tried again last night with a simple cube... No luck.

     

    Thanks,

    Eric

  10. Does blender accept the dds format? I had no luck with it, in fact I still can't figuer how to get a texture onto an object in Blender.

     

    Yes it accepts .dds files... I have been learning myself... I watch as many youtube videos as I can. I only started to use it a few months ago and I find it great now that it is in Version 2.5.

     

    Is the DDS in DXTC5 with mipmaps? Can you post the content of Cube.Mat?

     

    Here is the Mat File

     

    texture0="abstract::Untitled.dds"

    shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag"

     

     

    The Actual image is Untitled.dds not texture.dds ... I made a mistake on my earlier post.

     

    Thanks,

    Eric

  11. Is the DDS in DXTC5 with mipmaps? Can you post the content of Cube.Mat?

     

    OK I will have to do that when I get home later tonight.

     

    I know that I converted my original texture to a .dds using the Leadwerks tool.

     

    Thanks for responding.

     

    Eric

×
×
  • Create New...