Mark Sibly

Forum Replies Created

Viewing 15 posts - 541 through 555 (of 1,431 total)
  • Author
    Posts
  • in reply to: alSourcefv help wanted #10042

    Mark Sibly
    Keymaster

    The ‘Data’ property of array also returns a pointer to the elements, ie: ‘blah.Data’ is same as ‘Varptr blah[0]’.

    in reply to: Lighting a 2D Image without bump? #10026

    Mark Sibly
    Keymaster

    Actually, I think I might be able to do this just by writing a new ‘light’ shader…will have a play!

    in reply to: Lighting a 2D Image without bump? #10024

    Mark Sibly
    Keymaster

    I just had a hack around with the simplelight banana, and it is possible for 2d lights to work without normal maps.

    Hoever, to make this work, I used a ‘default’ normal of 0,0,1. This is a massive cheat that may or may not look like crap depending on usage.

    I’ll leave this hack in (it just allows you to use Image.LoadBump without specifying normal/specular maps) but I think  you’ll get the best results kludging your own 2d blending approach together.

    To render lights you probably want to do something like using multiply blending to multiply light * scenes colors (result is lighting contribution) and then add this back to the original scene colors. This can be done by drawing the scene to one texture, lighting to another, and copying/drawing one texture to another using multiply/additive blending etc.

    in reply to: Lighting a 2D Image without bump? #10023

    Mark Sibly
    Keymaster

    Easiest way to do this is probably just to use some 2d blending effect (additive, multiply, both, experiment!) and drawing a yellow ‘spotlight’ image.

    in reply to: Tiled #10011

    Mark Sibly
    Keymaster

    There are several ways to do this, but the basic idea is to test the JsonValue type of each element.

    But I would have though the format for a tile map would use ‘known’ keys etc. Otherwise, kind of a PITA.

    in reply to: Tiled #10006

    Mark Sibly
    Keymaster

    Both JsonObject and JsonArray have GetString,GetNumber,GetObject and GetArray methods, JsonObject.GetBlah() is ‘keyed’ by string, JsonArray.GetBlah() is keyed by int index.

    in reply to: IAP module #10002

    Mark Sibly
    Keymaster

    It should work with the latest version on develop branch, mainly because this has support for ‘internal::’ storage which you’ll need to load/save purchases.

    I’ve been planning on putting together a new binary release all week but keep getting sidetracked – now firmly scheduled for Monday!

    in reply to: Tiled #9997

    Mark Sibly
    Keymaster

    That would be great!

    in reply to: How do you Destroy models? #9981

    Mark Sibly
    Keymaster

    Woah, sorry for being a bit slow on this one.

    Latest version in github develop branch now has a new Scene.DestroyAllEntities() method.

    This will call Destroy on all ‘root’ entities in the scene, which will cause children to be destroyed etc.

    in reply to: Mojo3D: Built-in VR support #9980

    Mark Sibly
    Keymaster

    The issue is apparently that DK2 (oculus dev kit V2) doesn’t work with the ‘open vr’ API (from valve).

    It should work with oculus APIs though so I’ll give that a crack at some point!

    in reply to: IAP module #9979

    Mark Sibly
    Keymaster

    Your welcome secondgear, and thanks for the bonus!

    I haven’t properly announced it yet, as it really needs the latest monkey release to be usable (ie: ‘internal::’ storage support for saving/loading purchases).

    I have tested it with google player/itunes connect and it appears to work as well as monkey-x IAP, but please feel free to let me know about any issue here or even at the itch.io forum!

    in reply to: Sprites in Mojo3D #9978

    Mark Sibly
    Keymaster

    Have a look at the sprites test.

    in reply to: Light rotating with model? #9977

    Mark Sibly
    Keymaster

    I think there is something about the introrim.dae model monkey2 doesn’t like. How was it created?

    If you replace it with the BirdieFly ‘bird’ model or a plain sphere via Model.CreateSphere() etc lighting behaves as expected.

    Actaully, looking at the model in Open 3D ModelViewer (which also uses assimp), some of the model normals appear to be ‘twisted’, ie: they are not pointing ‘out of’ the model but at odd angles to it, in same cases parallel to it. This will certainly make lighting look crappy.

    in reply to: Android screen resolution #9959

    Mark Sibly
    Keymaster

    You can use the letterbox layout if you want a fixed render size – see the viewlayout banana.

    in reply to: Sprites in Mojo3D #9958

    Mark Sibly
    Keymaster

    Just pushed some fixes and changs to develop branch.

    Sprites should now use depth buffer properly, and Texture.Flags setter now works.

    Also, as a bit of an experiment, I added a TextureRect property to Sprite. This defaults to new Rectf( 0,0,1,1 ) and describes the 4 ‘texture coordinate’ corners of the sprite, ie: you could theoretically use this to pick frames out of an atlas. A better approach might be to add the rects to the material, but this is would involve coming up with a ‘SpriteFrames’ class and/or ‘SpriteAnimations’ class etc. Have to think about this a bit more!

Viewing 15 posts - 541 through 555 (of 1,431 total)