Mojo3d – Light not doing anything with custom meshes.

About Monkey 2 Forums Monkey 2 Programming Help Mojo3d – Light not doing anything with custom meshes.

This topic contains 2 replies, has 2 voices, and was last updated by  Ethernaut 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14074

    Pakz
    Participant

    I can not seem to get the lighting working. I tried placing it on different positions(even rnd in loop) and pointing it but the scene does not seem affected.  I am building my own meshes.

    #14075

    Pakz
    Participant

    I got it doing something. I think that DestroyAllEntities also kills the lights and that needs to be recreated,

    The shadows look a little bit broken though if I add the command : CastsShadow = True

    #14076

    Ethernaut
    Participant

    I think you may be missing information in the vertices. Try adding texture coordinates ( (0,0) for bottom left, (1,1) for top right ) and call UpdateNormals() to recalculate the normals on all vertices.

    Some good examples here:
    https://github.com/blitz-research/monkey2/blob/develop/modules/mojo3d/geometry/meshprims.monkey2

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.