Mark Sibly

Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,431 total)
  • Author
    Posts
  • in reply to: How to program a Windows screensaver in MX2 [SOLVED] #9866

    Mark Sibly
    Keymaster

    Woah, nice!

    Was gonna give you a speech about ‘monkey2 isn’t really meant for that’ but if you can make it work go for it!

    in reply to: Texture with transparent pixel #9865

    Mark Sibly
    Keymaster

    Transparency isn’t supported yet, should be added soon!

    in reply to: Can't compile simple WinApi call #9858

    Mark Sibly
    Keymaster

    I’m thinking the struct needs to match the naming in windows.h or… ?

    Yes, defnitely, that’s why WINRECT__ didn’t work, there’s no such thing in windows.h.

    So yes, the naming is important, the compiler has to be able to find the definition of struct RECT or whatever it is somewhere.

    in reply to: Help creating my own meshes #9857

    Mark Sibly
    Keymaster

    Actually, for now at least, all meshes that use PbrMaterial are gonna need texcoords, normals and tangents. Will add a simpler non-bumpy PBR style material in future.

    in reply to: Help creating my own meshes #9856

    Mark Sibly
    Keymaster

    Ok, main problem seems to be that it lacked texture coordinates and normals.

    I’m not 100% sure why this is affecting shadows so much though. There is a bit of hack in the shaders that moves points ‘off’ surfaces in the direction of the normal when comparing shadow depth, but it should still work with no normals. Will eventually investigate.

    Alas there is no UpdateNormals() yet so you need to manually create them – easy in this case though as they are all the same, ie: 0,0,-1.

    Also, for UpdateTangents to work a mesh must have both valid normals AND texture coordinates. Tangents are only used for bumpmapping though, so not strictly neccesary in this case.

    Sorry I haven’t been able to spend more time on the 3d lately everyone. IAP is *nearly* finished so I should be back into it soon.

    Anyway, here’s a version that works for me….

    in reply to: Can't compile simple WinApi call #9850

    Mark Sibly
    Keymaster

    Never heard of struct WINDRECT__ before – try plain old RECT instead, works fine here:

    https://msdn.microsoft.com/en-us/library/windows/desktop/dd162897(v=vs.85).aspx

    Possibly time to start a win32 module?

    in reply to: Help creating my own meshes #9849

    Mark Sibly
    Keymaster

    Have you tried attaching code or zip of code?

    If that’s not working, can you email code to me? blitzmunter at gmail dot com

    in reply to: mojo3d: attempted box physics not working! #9845

    Mark Sibly
    Keymaster

    SetScale is an algorithmic entity scale factor used by the renderer. It does not affect actual mesh vertex positions (as stored in memory) therefore does not affect mesh bounds either. If there was an Entity.Bounds, it would probably affect that though!

    Mesh.TransformVertices and Mesh.FitVertices on the other hand *do* affect mesh vertex positions, so do affect  mesh bounds.

    In general, my advice for now would be to avoid SetScale if you’re using physics and build all your meshes at the right size in the first place. You can also use Mesh.FitVertices if you want to physically scale a mesh to a certain size etc.

    in reply to: mojo3d: attempted box physics not working! #9832

    Mark Sibly
    Keymaster

    I think the problem here is that SetScale doesn’t currently affect the physics, only the rendering, so the ground box looks big but is still only actually a unit cube as far as the phyics is concerned.

    I’ll have a think about how best to deal with this but for now thje BoxCollider size will need to be it’s ‘actual’ size.

    in reply to: Sprites in Mojo3D #9801

    Mark Sibly
    Keymaster

    Yeah, sprites are very primitive right now and there are lots of changes coming. I will definitely keep your questions in mind though and try to address them as well as I can.

    I just need to finish up the IAP mobile module this week, and then it’s back into the fun/interesting stuff!

    in reply to: Mojo3D(assimp) Importing Collada files. #9800

    Mark Sibly
    Keymaster

    Ha, Ok, found it.

    The problem is the model has quite a few bones, 67 in all, and the shader only handles 64. I upped the shader array to 96 and it worked fine, will push this change soon. I need to do more research on what a ‘reasonable’ max number of bones is here.

    Shame about the license. I am working on the assumption that ‘free for personal use’ models are a no-go, which is a bummer because there are a lot of good ones around!

    in reply to: Mojo3D(assimp) Importing Collada files. #9793

    Mark Sibly
    Keymaster

    Well, I’ve reproduced *something*! See attachment below….is this what you’re getting?

    Note that loading with Model.Load instead of Model.LoadBoned fixes it, but of course it can’t be animated.

    There are several issues with the model too – some vertices have >4 weights which is kind of a stock limit for GPU boning. I can fix this by normalizing bones weights which I will do, but animation will look a bit ‘stiffer’. Also, that particular model has what looks like some ‘errors’ in the weights in that a few of the weights are very, very small (eg: 1e-8) and will have little effect on boning.

    Anyway, still on the laptop which is driving me nuts. Will fix it when I get my real computer back (soon) but I’m sure it is fixable.

    Nice model too. Is it ‘free’ as in libpng/zlib license free? Can I add it to the monkey2 distro?

    Attachments:
    in reply to: prompt invasion 2 is ace #9785

    Mark Sibly
    Keymaster

    Note: I thought it might be github’s autocrlf feature, but chalky.fnt does actually appear to be stored at github with windows EOLs. Will experiment more when I get my real computer back!

    in reply to: prompt invasion 2 is ace #9784

    Mark Sibly
    Keymaster

    Never used to have any problems with Prompt Invasion, but am now also having problems loading chalk.png at home on the laptop.

    It appears to be trying to load chalky.png” (note extra quote at end) which is causing it to fail. This is in turn caused by the fact chalky.fnt has windows eol’s, so all lines actually end with “\r” after splitting by “\n”.

    Adding line=line.Trim() at line 53 in font.monkey2 fixes it here. Not sure why it sometimes works though.

    in reply to: Reading mojo decls… #9782

    Mark Sibly
    Keymaster

    Ok, the main issue here is that Color is a struct, and structs aren’t currently reflected (hence the error ‘not a class or interface’).

    This wasn’t an issue in bmx of course because it didn’t have structs, but I am yet to get them working properly with reflection in monkey2. I do plan to spend more time on reflection soon though and will be looking into this.

Viewing 15 posts - 571 through 585 (of 1,431 total)