Re: Newbie questions about textures, meshes and lights

From: ZMan (news-replies_at_thezbuffer)
Date: 05/02/04

  • Next message: Ivan: "Intersection coordinates?"
    Date: Sun, 2 May 2004 16:40:08 -0700

    1. Its hard to debug this without any more information. Do you have normals
    defined, is the light bright enough, is the triangle facing the light, is
    the material of the triangle set up. What vertex format are you using.

    2. Meshes probably rely on you having lights set up. Try turning on an
    ambient background and see.

    3. When you make it doesn't have any texture coordinates set up as
    you suspected. You need to change the mesh to have texture coodinates. This
    means using mesh.clone to make a new mesh with the right vertex format, then
    filling them in correctly. Correctly means different things depending on the
    effect but for a box it best to start with the same texture on each face so
    walk through the vertices and work out which one is which face then just set
    the coordinates to either 0,0 or 1.0 . This is hard to explain without
    drawing it for you. Good luck. Alternativly you might be able to find a box
    mesh in .x format that already has these set.


    "Jose A. Gonzalvo" <> wrote in message
    > Hi,
    > I have some problems with textures and lights.
    > 1. I can render a texturized triangle, but if I turn on lights the
    > goes black.
    > 2. I can render a texturized triangle with lights off, but if I render a
    > 'mesh' it goes black (the triangle).
    > 2. How can I apply texture to a mesh created like this myObj =
    > Mesh.Box(device, 1.0f, 1.0f, 1.0f). I execute device.SetTexture before
    > render the mesh, but I guess I should define the texture coordinates to
    > mesh, how?
    > Thanks in advance and excuse my poor english.
    > Jose

  • Next message: Ivan: "Intersection coordinates?"

    Relevant Pages

    • Re: Can Microsoft people answer my last post, please?
      ... Problem rendering a list of triangle ... and a mesh. ... chapter of a book to disable texture colores and alpha. ... State the basis of your problem, i.e. when rendering a triangle list ...
    • Re: Topmodel2 (BACK ON TOPIC)
      ... > most of the triangles are textured with green grass - OK. ... apply various attributes such as colour and texture. ... the triangle remains textured as ... > I then create a triangle with Edit and Join Selection. ...
    • Re: HARDWARE: Open-Source-Friendly Graphics Cards -- Viable?
      ... more than a fuzzy texture. ... The other more pressing reason is that the host interface ... puts a very low upper-bound on your triangle rendering rate. ...
    • Re: Foods I could eat every day and NEVER get tired of
      ... I have problems with texture in clothing. ... worse if I am having allergy or asthma problems. ... High pitched noises drive me insane (the hum of lights, ...
    • Re: Lights and Alpha
      ... What I see there is that lights work fine until I call Device.SetTexture at ... rotating cylinder hovering above a flat plane. ... When I uncomment the SetTexture command, the flat plane gains the texture ... /// Render the cylinder ...