SMF - 3D collisions, animation, materials and level editor - Now works in HTML5!

Discussion in 'Work in Progress' started by TheSnidr, Feb 14, 2017.

  1. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    [​IMG]
    This badass logo was made by @Chris Goodwin

    Welcome to the topic about the SMF system. This system is entirely free and will always be free, and provides you with some of the basic tools you need for 3D games. It consists of two parts:
    1. The SMF model tool

    The SMF model tool is the core of the SMF system. It lets you import .obj model created in a model editor, and exports to the custom .smf format, which can be imported into GMS2.
    Before exporting, however, you can do all sorts of things with it. Here you can create many types of materials and apply effects like cel shading, rim lighting, normal maps and parallax mapping. You can rig, skin and animate your model. You can create collision buffers, place lights and add objects and 3D paths in the level editor.
    ...And the best part? It's all included in a single file. Models, textures, levels, animations, shaders and paths, easily imported into your own game. Once it's in your game, you can of course pick it apart again if you'd like, and even make use of internal sprites instead of loading them externally.
    2. The SMF import scripts
    The SMF import scripts let you import a .smf model file into your game, as well as so much more. They give you control over how models are animated, and even let you create animations on the fly. The drawing is automated, so that when you call smf_model_draw, the objects are drawn with the shaders and textures you defined in the SMF model tool. They contain scripts for colliding with and casting rays onto level models, and analyzing the result. They enable you to optimize your models and animations as best as possible, so that your games will run smoothly even if they look great.
    [​IMG]

    Downloads:
    Download SMF version 0.9.751
    Version 0.8.6 (Compatible with GMS 1.4)

    The collision system
    When creating a colision buffer in the SMF model tool, the model is split into a structure called an octree. Splitting up the model is necessary to perform efficient collision calculations, since you only really need to check the nearest geometry. An octree splits the model up based on geometric density, and so the size of the subdivisions can change throughout the model. Performing sphere-model collision checks is a fast and simple approximation for most applications, and the system also allows for ray casting onto the level model for more advanced collisions. Sphere-model collisions are currently the only available collision check/response.
    Here's an example of what a collision buffer looks like:

    [​IMG]

    The animation system
    The animation system is very fast when used correctly! Bones are stored as dual quaternions, which are efficient and less memory-consuming than matrices, but are limited in that they don't allow scaling. Interpolating between frames can be done with linear interpolation or quadratic interpolation. Animations can be changed in real time, as you can see below. You can pre-calculate your animations for even faster processing, but then you can't modify them in real time.
    [​IMG]

    Both the tool and the formats are still in progress, and there may be changes to the format while it's still being worked on.
    I'd love feedback! What do you think of the tool? What do you think about the difficulty level? Is there anything you'd like me to improve? Tell me here in the topic!

    Gallery:
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited: Aug 19, 2018
  2. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    Oh, very cool!
    I remember doing things in a grid like you described before, and did think of using octrees but never got to it... Very cool that you did.
    I did also make a quadtree system to improve sprite collision, but turns out its slower than the built in system if you want any accuracy.

    Aside from that, I haven't really seen any use of octrees in GM, for much at all, actually.

    I'll be more than happy to look at your code!
     
  3. Bingdom

    Bingdom Googledom

    Joined:
    Jul 1, 2016
    Posts:
    1,675
    Runs really well on a low-end laptop. I set it to unlimited FPS and got around 120-150. Usability in performance, so far YES!

    Specs:
    1.5Ghz
    4GB Ram
    Integrated GPU

    After a while, the screen would go completely blank. Could this be some sort of GPU issue?
     
  4. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Thanks for testing :D
    Yeah, I've run into this problem as well. It only happens when using the YYC, and seems to be because the player's coordinates somehow become NaN (which I assume means Not a Number). I'm currently looking into this!

    EDIT:
    Found the problem. There was a division by 0 in the player's collision script! D: Fixed it and reuploaded :D
     
    Last edited: Feb 14, 2017
    Never Mind and mariospants like this.
  5. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    Very impressive performance, Got ~580 FPS on a i74710HQ @2.5GHz. Both with YYC and VM. So i presume its GPU bound! (was running on IGPU, will have to export to try on dedicated card).

    having a look at the code now, will edit if i can find anything substatial.
    [edit]
    Well, there is a lot of code to go through, so as far as logic goes, i cant really comment.
    But I notice you use a lot of buffers. Did you know arrays tend to be around 2x faster or more? even with YYC. (or at least, they where in 1.4).
    So if you are up to the task, thats one way to speed things up.

    Though i guess if memeory usage is important to you, then buffers are the way to go.
     
    Last edited: Feb 14, 2017
  6. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Whaaat, really? I've never heard about this! I thought buffers were supposed to be the most efficient way of writing and reading data. At least it gives more control over memory usage!
     
    Never Mind likes this.
  7. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    Yes, i was supprised too.
    But they can be far more efficient that arrays, as you are only storing the data you need. (without all the wrapping GM does internally).
     
  8. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    Can I just stop for a moment and say that I love the art style? Love the painted textures.

    I unfortunately cannot really look into the GMS2 code myself, but throw some statistics at you.

    (desktop computer)
    {
    NVIDIA GeForce GTX 750 Ti GPU
    CPU Intel I5-4570 CPU 3.20GHz
    Windows 10 64-bit
    6gb RAM
    {
    unleashed FPS 1905
    real FPS 2052

    Limited FPS 30
    Real FPS 2103
    }
    }
    (Laptop)
    {
    AMD Radeon HD 8670M
    4 gb memory
    2.30GHZ intel i5 CPU
    Windows 10 64-bit
    {
    Unleashed FPS 173
    Real FPS 612

    Limited FPS 23
    Real FPS 723
    }
    }
     
    TheSnidr likes this.
  9. Apapappa

    Apapappa Member

    Joined:
    Jun 28, 2016
    Posts:
    115
    I get around 3900 fps when running unlimited.
    So performance doesn't seem to be a problem here! (I'm running the executable version)

    Specs:
    Intel i7-6700k 4.0 GHz
    Nvidia GTX1060 3GB
    16GB 2133MHz RAM
     
    TheSnidr likes this.
  10. RichHopefulComposer

    RichHopefulComposer Member

    Joined:
    Jun 20, 2016
    Posts:
    1,358
    It's Wind Waker, lol.
     
  11. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    whops... rip. Maybe I should play windwaker.
     
  12. RichHopefulComposer

    RichHopefulComposer Member

    Joined:
    Jun 20, 2016
    Posts:
    1,358
    You should! Amazing game. The Wii U version is one of the prettiest games ever made. The Gamecube version still looks fantastic, too. =)
     
    Pfap likes this.
  13. slayer 64

    slayer 64 Member

    Joined:
    Jun 26, 2016
    Posts:
    66
    Looks great. Ran fine for me. I'm still using Studio 1.4 so I can't see the implementation. I bet it's really good.
     
  14. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Hey, it ran at 23fps when set on 30 on my laptop too! I wonder what's causing that, when it has no problem running above 100 when the fps is unlimited..?

    Whoa, the legend himself tried it! :D Something like this is probably child's play for you
     
    Squisher, Never Mind and slayer 64 like this.
  15. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    interestingly yes there was no issue running higher in that case, unlimited it ran 173 fps but limited it went looooow. I was assuming it might be window's stupidity of using the integrated GPU instead of the AMD GPU.
     
  16. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    I'm gonna have to look into that!

    In other news, I morphed the level into a ball:
    [​IMG]
     
    Roa, Never Mind and Misty like this.
  17. Misty

    Misty Member

    Joined:
    Jun 22, 2016
    Posts:
    961
    Alls I do is use GM Newton for everything. Downside is it only works for windows. Plus side is you can get collision detection with no lag, I assume newton has some sort of bsp octree tech inside which optimizes everything.



    No buffers are the best way of reading and writing external data. Like savefiles and maps.
     
    Last edited: Feb 15, 2017
  18. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    Yes, but not internally. I havent spent much time looking at the code, but it does look like the octree is produced at runtime. Would produce better performance by having them be arrays.
     
  19. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    That's a good point though, saving and loading a buffer is much faster than saving and loading an array. The octree should only be created once, and the result can be saved and loaded quickly.
     
    Never Mind likes this.
  20. slayer 64

    slayer 64 Member

    Joined:
    Jun 26, 2016
    Posts:
    66
    lol, thanks. I haven't done a whole lot with octrees. If I remember correctly, they're fastest if you only have to set them up once, but if you had some enemies running around, updating their positions means reconstructing the tree.
    How did you morph the level into a ball?
    Since the ball has a basic shape, I wonder if another type of structure could store the triangles instead of a rectangular octree. Something with a shape that emitted from the center of the sphere.
     
  21. Schyler

    Schyler Member

    Joined:
    Sep 13, 2016
    Posts:
    32
    Fantastic work.

    It is so cool how the collisions are automatic.
     
    Last edited: Feb 16, 2017
  22. Never Mind

    Never Mind Member

    Joined:
    Oct 17, 2016
    Posts:
    212
    TheSnidr is using a shader he made for that. EDIT see below
    So I don't think you'd have access to the output vertex positions right? But that is a cool idea.

    TheSnidr thanks for making another cool project open to us!
    Oh dang.. looks like you can't import (.yyz) files in the free version of the beta.
     
    Last edited: Apr 1, 2017
  23. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Oh, I don't plan on updating it in real time, right now it only stores model vertices.
    I loaded the vertex coordinates as polar coordinates with the x and y values as angles and the z value as radius :D Perhaps a different structure would be more efficient for a sphere, but that's a convoluted solution to a very specific special case IMO!

    Oh, there's no shader trickery here, it actually takes place on a sphere. Perhaps this puts things more into perspective:
    [​IMG]
    You bought GMS2 just to try this? Maybe I should get paid by YYG for selling their product ;P
    It should be able to load .yyz files in its current state. At least I can do that!
     
    Never Mind and FROGANUS like this.
  24. Never Mind

    Never Mind Member

    Joined:
    Oct 17, 2016
    Posts:
    212
    Ahh that does work differently then I thought. I should probably buy things before I talk about them hehe :rolleyes:
    To answer your question, no I haven't bought GMS2 yet (ᴛʜɪɴᴋɪɴɢ ᴀʙᴏᴜᴛ ɪᴛ). I should have clarified that I was referring to the free version of the beta. Sorry about that.

    Then the radial octree idea could work! [​IMG] But sounds like it's probably not worth the effort. ᴵ ʷᵒᶰᵈᵉʳ ʷʰᵃᵗ ᵐᵃʳᶤᵒ ᵍᵃˡᵃˣʸ ᵘˢᵉˢˑ

    Sooo.. can I please use this in my own projects? I don't know whether I'll be able to contribute too much, but
     
    Last edited: Feb 17, 2017
  25. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Feel free to use it! But keep in mind that it's far from finished, there's a reason to why I'm posting in WIP. Also, I won't provide support if you have trouble using it; it's provided as is.
     
    Never Mind and Schyler like this.
  26. FROGANUS

    FROGANUS Member

    Joined:
    Jul 3, 2016
    Posts:
    217
    Cool and interesting. Here are some play specs:

    System:
    windows 7 pro desktop
    intel core i7 CPU 920 @2.67 GHz
    18 GB ram
    64 bit os
    NVidia GeForce GTS 250

    normal mode seems to run steady around 1200-1400 fps
    subdivision mode runs around 93-98 fps

    [​IMG]
     
    TheSnidr likes this.
  27. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Bleh, so everything I've made since I uploaded the last example is gone after a hard drive malfunction. Luckily I uploaded this to the forums, otherwise I would have lost everything. Time to make my skeletal animation engine from scratch again I guess...
     
    Never Mind likes this.
  28. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    AAAK! So manny HD failures happening recently. I guess the good thing is now you can remake it better :)
     
  29. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    I made a bare bones 3D skeletal animation system:
    [​IMG]
    This is my first attempt at creating a walking animation! The bones are stored as dual quaternions, and the model is deformed in real time with a shader. I have no experience whatsoever with animation from before, so getting it to work is really exciting!

    EDIT:
    I also made my own custom rigging tool:
    [​IMG]
     
    Last edited: Mar 14, 2017
    Never Mind, Xor, RujiK and 2 others like this.
  30. Zerb Games

    Zerb Games Member

    Joined:
    Jun 27, 2016
    Posts:
    259
    My god. I wish I had these skills.
     
    Gamerev147 likes this.
  31. Lukan

    Lukan Gay Wizard Freak

    Joined:
    Jun 20, 2016
    Posts:
    340
    It really bothers me that you used OoT/MM Link in Wind Waker's Outset Island...
    Why not cute toon Link?

    I'm getting
    170-225FPS
    intel i3
    6 gigs ram
    Win10-64 Bit
    intel 520HD graphics(integrated)

    Runs really nice.
     
  32. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Oops, I better fix that! Maybe if I find a model of toon link :3
    Here's another gif showing off the animation editor by the way:
    [​IMG]
     
    Never Mind likes this.
  33. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    651
    Willl you make this GMS compatible too? Some people still prefer that, including me :v
     
  34. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Nah, I don't use GMS 1.4 anymore, but here's (edit: link removed) the GMS2 source, in case you want to start using that some day!
    I just added quadratic frame interpolation:
    [​IMG]
    There currently is no way to manually skin a model, I haven't bothered adding it. The automatic skinning makes Link's tunic spazz out a bit because the arms are too close to the body in the model. That could be avoided by making the model in a "bind pose", ie. with arms and legs straight out.

    Edit:
    I've removed the download link temporarily. I plan to release the modeller as an executable, and provide the import scripts so that you can import the animations you create into your own project!
     
    Last edited: Mar 20, 2017
    Never Mind likes this.
  35. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    651
    Guess I will port it over then :v
     
  36. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    I spent today making manual skinning. The automatic skinning works by checking the distance to the nearest bones, and the closer the bone is, the more influence it has over the vertex. This is good for organic material, but terrible for rigid objects.
    Here has Link been automatically skinned. Notice the wobbly shield:
    [​IMG]
    By first using automatic skinning, and then manually modifying the skinned shield and sword, I can easily make the shield rigid:
    [​IMG]
    Also, I've simplified the model format so that each vertex only can be influenced by two bones. It's easy to increase again, but I figured it'll be good enough, since this is a simple, bare bones animation engine anyway!
    The rigging tool is almost done. When it's done I'll post it as an .exe, and upload the source to the import scripts so that people can use the animations they create!
     
    Last edited: Mar 21, 2017
    renex, NoobsWeStand and Xor like this.
  37. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    I was thinking. Would you be able to attach something to a given bone instead of making it part of the model?
     
    TheSnidr likes this.
  38. ThunderZ

    ThunderZ Member

    Joined:
    Sep 22, 2016
    Posts:
    1
    Very impressive work.

    Did you think of sharing this ? free or marketplace?
     
  39. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Good idea! I won't add this to the rigging tool, but I'll make it possible to attach rigid objects to single bones through code.

    ThunderZ: Yeah, the import scripts will be open source! I haven't decided what I want to do with the rigging tool itself, but I might just post the .exe
     
  40. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    I actually just asked out of curiosity. But the more the merrier in abilities and features. The other thing I was thinking about if it's possible to force a direction of a bone? e.g. Making link head facing a targeted enemy at all time without it being on the timeline of the animation.
     
    TheSnidr likes this.
  41. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    I just uploaded the rigging editor itself:
    Download .exe
    I'd love if you could play around with it and see if you're able to make animations! Make gifs of the animations you create! Are you able to break it? If so, I'd like to know how, so I can fix it!
    I will upload the source of the import scripts soon. I also plan to make a video showing how to use the editor!
     
    Never Mind likes this.
  42. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    okay well I tried it so I going to make an honest reply here in hope it helps you.

    http://i.imgur.com/iYUU7Fj.gifv

    just you so see it. cus you asked for it c:

    so one thing I want to point out, is the lack of feed back. everything works as intended as I felt like but for instance when I press a button like select bone or such, the button for instance for toggling bone visibility or others goes blank. It's a more user friendly thing to have some sort of indicator that it's active/inactive

    having add bone as your bone move tool is not a great way to communicate that it has multiple functionalities. The tool tips are appropriated but I did not think about it being the move tool as well till I decided to data mine the earlier version of the editor to see if it exists which I assumed it did and then I saw it was attached to the move tool. Long story sort. for the user end it's not user friendly in anyway

    Same goes in the skinning tool. having auto skinning is pretty great having the ability to select and attach weight to a bone is also great. but I feel like the lack of weight value communication is kind of an issue. when it threw me the prompt about "how big the auto sampling should be" by default it was 2... but how big is 2? how is my model being effected with it what does a single bone effect? which vertices and how much?

    the animation editor is straight forward. I have no much to add to that.

    Some suggestion I give here if you accept it accept it if not so be it. don't mind.

    -the weighting issue can be easily solved by representing the weights with colours (blue being weak red being strong) and only to the bone being selected. could help with visualization a lot.
    -it would be nice if you could rotate some bones around world space directions instead of the previous bone's rotation. would open some possibilities up. (scaling and moving bones too but different story)
    -I would suggest a ball like paint tool for weights maybe with different paint weight. certainly would be slightly easier than having to select specific points. tho it might come with some collision detection to handle it in 3D for instance.

    Other than that I have to say It's pretty great for what it is. It is certainly a great step forward for this community for some more advanced technique in 3D (even if in a 2D engine) and seems way better than the Manta Games bone animation or mine.
    I hope these help you in anyway. (fortunately or unfortunately your choice, I can't report direct breaking)
     
    TheSnidr likes this.
  43. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Thank you so much for the comprehensive review of the tool! Feedback like this is exactly what I need. I completely agree with everything, though I think the skinning paint tool will be a bit overkill in terms of amount of work to get it working! But it's a good idea, *maybe* it'll get added later. I like the idea of colouring the vertices to show bone weights. Right now, bone weights aren't visible before you see how the animation affects the model.
    I'll get right to work on improving it, thanks for the feedback!

    EDIT:
    Regarding the autoskin function, it checks the distance between the vertex and the bone, and weights the vertex accordingly. Raising the distance up to a power lets you define the joints more clearly, as the vertices get weighted more heavily towards the nearest bone and less to the second nearest. Here's a demonstration:
    First power: [​IMG]
    Second power: [​IMG]
    Third power: [​IMG]
     
    Last edited: Mar 23, 2017
  44. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    [​IMG]
    I've uploaded a demo on how to use the animations the rigging tool outputs!
    Download the rigging tool
    Download animation example source
    Download animation example .exe

    Multimagyar:
    I've edited the tool quite a bit, it should give a bit more feedback now! You can now select bones to see which vertices it has influence over, and the tool buttons are "sticky" so that they always show which tool is currently selected. I haven't added world space rotations yet, though I might later. Next thing to add is the possibility to force the direction of a bone through code!
     
    Xor likes this.
  45. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,208
    This is very, very cool!
    Would you consider making exporters for existing tools like blender?
    Is this an "open" format you encourage us all to use and modify?
     
  46. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    Alright, this time around I managed to break it but I might have done it more than one ways I think .-.

    http://i.imgur.com/Fw2dyGj.png

    first of my problems is an actually breaking one. I attempted to load a bmp picture for a model it ended up giving me an error message for it.

    The second one was a minor one. on the left side if you take close attention to the buttons. I had quite a time to take that image. you can for some reason confuse the software if you select one button with mouse and select another option by keys.

    The third is... honestly? you tell me because I have no clue. The auto binding liked the left leg too much and bind most of the body to it. I going to assume you working with quite larger models than I do (personal preference to keep the model small relatively even if the original was not mine) about 30 in height 24 in length and 10 in width. in rest pose (hands down) make it 30 height 8 ish length and 10 width. Can this cause any sort of issue?

    The user interface is much more friendlier now btw so is the display of the weights. I appreciate that.

    A bit to the formats:

    I EXTREMELY appreciate the fact that the skinned model and the animations for it is not stored in the same file. Being able to expand a model's animation list without touching the rest is always nice.
    Wolf link example seemed to run relatively well. 400 fps unleashed tho the real_fps still rolling around about 200-400 locked/unlocked.
    updating the model every 2nd frame for example did make the unleashed fps go till 600ish (+ - 50)
    with 60 fps locked updating every 2nd frame it does still run pretty smooth so over all. yeah it's a great work so far and I personally love it.
     
    TheSnidr likes this.
  47. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Fel666: The import scripts are open source, so is the collision engine! The editor itself will stay closed source, at least for a little while. The goal for this tool is to provide a simple way to create animations specifically for gamemaker!

    Multimagyar: Oops, I assumed GM could import .bmp files, apparently it can not! I've removed the option. The sticky keys issue was an easy fix, should be fixed in the next version. I'm really wondering how you managed to mess your model up that badly though o.o What did you do? xD Could you upload the model so that I can try? Numbers are stored as double precision floats, so there should be no precision errors within the range they can cover!
     
  48. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    sure feel free to have a fiddle
    https://www.dropbox.com/s/i7uzf0vj4txtcqo/Angela_cross.rar?dl=0

    as for the BMP I think it was in GM7-8 when it allowed it maybe. now as I recall even the manual says something like png, gif and jpg/jpeg is allowed to be loaded.

    Also I dunno what I did. I pressed autoskin model and she went drunk ;~;
     
  49. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    450
    Ah, found the cause. It's a bit complicated actually, but it was caused by a tiny typo. Autoskinning weighs vertices based on not only their distance from the bones, but also on whether or not the normal faces towards or away from the bone. I figured that adding this check would make it more likely that vertices in one foot aren't influenced by the bones in the other foot. A multiplum of the dot product between the triangle normal and the unit direction vector from bone to vertex is added to the distance calculation.
    Now, when you rotate a model in rigging mode, it modifies the buffer right then and there, which is why rotating large models is so slow (I will fix this later). But when rotating, I accidentally overwrote the triangle normals with the vertex position, leading to catastrophal results when getting the dot product when autoskinning :p
    The problem's been fixed in this tiiiiny update.
     
    Multimagyar likes this.
  50. Multimagyar

    Multimagyar Member

    Joined:
    Jun 20, 2016
    Posts:
    144
    right. seems to work fine now. I'll still want to look into it later if I can use the format I made for myself and pipeline it into this so I can use the already skinned version.... attaching the bones is a different question. I'll look into that myself too. other than that, yay it works! I'll fiddle with it more tomorrow.

    Edit.: I realized something while fiddling today.
    -Would be nice to have control or something to select multiple points without deselecting previous points on the model for weighting. (and deselecting too)

    -You can't delete the first frame. which by default fine, so be it, but for instance what if I want the 2nd frame to become the very first frame? a copy frame or delete frame -> 2nd becomes 1st would be a good idea to implement maybe.

    -an in between keyframe would also be useful. Most animators do the "end" positions of some animation and refine the in between frames in 2D it's usually like adding a frame between two frames and get the in between frame by drawing between the lines. in 3D it can be nicely used to fix issues like the legs and such after you have the middle positions.
     
    Last edited: Mar 25, 2017
    TheSnidr likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice