gryff Posted September 19, 2015 Share Posted September 19, 2015 A few days back, dad72 posted a little piece of useful code for attaching an object to a specific bone. So I thought I would try it out. Sword It works, in the sense that I can add/ remove the "sword" (just a long thin cube) to a hand bone. BUT ... Try this: 1. Check out the sword without clicking on it - appears like a normal elongated cube. 2. Click on the sword - it attaches to the hand - but examine the sword now (without clicking on it) and the normals seem to be flipped. 3. Click on the sword - it detaches from the hand and returns to its original position - and the normals are back as they should be. Anybody, any idea what is going on? (Everything comes from Blender, I made sure that the normals are facing outside before exporting.) cheers, gryff Quote Link to comment Share on other sites More sharing options...
jerome Posted September 19, 2015 Share Posted September 19, 2015 nice t-shirt anyway Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 19, 2015 Share Posted September 19, 2015 Ah yes you find a bug. And yes very beautiful shirt. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 20, 2015 Share Posted September 20, 2015 Nice shirt this is because the node matrix is inverted. This is not a problem for a node but for mesh it could be Can you control that on the Blender side? Quote Link to comment Share on other sites More sharing options...
gryff Posted September 20, 2015 Author Share Posted September 20, 2015 this is because the node matrix is inverted. This is not a problem for a node but for mesh it could be Well to be honest DK, while I understand the general meaning of each of those words, I am still an Erasmus's "blind man" when it comes to understanding what the problem is here. Can you control that on the Blender side? Are you saying it is an issue with the Blender BJS exporter? An issue with Blender itself, or with the bone rig? I will experiment a little more. cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted September 20, 2015 Author Share Posted September 20, 2015 First experiment was to try with the latest version of Blender (2.75a) and the latest version of the BJS exporter (3.0.5) - same result. I actually had BJS exporter 3.0.0 installed in Blender 2.75a - that produced an even worse result, as clicking on the red elongated cube by the feet made it disappear completely cheers, gryff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 20, 2015 Share Posted September 20, 2015 I create a sword and export with 3ds max. you can try with it to check if it's a bug of exporting bender or engine.To remove .txt (sword.zip.txt) file to extract the zip file.The sword is a gift, it is rather pretty. sword.zip.txt Vousk-prod., Temechon and gryff 3 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 20, 2015 Share Posted September 20, 2015 I think this is an issue with the bone rig Quote Link to comment Share on other sites More sharing options...
gryff Posted September 20, 2015 Author Share Posted September 20, 2015 Merci Dad. Je vais essayer cet apres-midi cheers, gryff Dad72 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted September 20, 2015 Author Share Posted September 20, 2015 I think this is an issue with the bone rig Well I will try some variations DK - see where it leads. cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted September 21, 2015 Author Share Posted September 21, 2015 I think this is an issue with the bone rig My first example used the "game rig" (32 bones) that came from MakeHuman, so I created from scratch a much simpler rig. A Very Simple Rig Basically a tube that bends - it has four identical bones (root, root1, head and head1 - all with the same "bone roll"). The scene has two materials, and two meshes. The animation works as it should. Click on the green bar - it gets bound to the top bone ("head2") - but still the normals are flipped. Click again to detach - and normals are flipped back. Et maintenant, l'epee de dad72. cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 21, 2015 Share Posted September 21, 2015 Hum...strange!Can you share the code (zip file)? Quote Link to comment Share on other sites More sharing options...
gryff Posted September 21, 2015 Author Share Posted September 21, 2015 Well dad72 - here is your sword using the same simple rig I built: dad72 sword The sword is clickable just as the green cube I used before. Huge sword! So, I positioned, scaled and rotated it. Same normal flipping as previous. Mais, merci beaucoup encore. Your bablylon file also gives me a chance to compare 3dMax and Blender export functionality @DK: I will create a package of files later this afternoon. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 21, 2015 Share Posted September 21, 2015 Even bug. So it has to come from the engine and it seems not Exporters Quote Link to comment Share on other sites More sharing options...
gryff Posted September 21, 2015 Author Share Posted September 21, 2015 Ok DK here are my files for this demo: Bend Tube It uses the simple rig I mentioned above. The zip file includes: 1. The Blender 2.75 . blend file - tube4.blend.2. The export of the above with the 3.0.5 BJS exporter - tube4.babylon.3. The exporter log file - no errors or warnings.5 The index.html file that contains my javascript code. Tube4.zip Hope it helps. cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 21, 2015 Share Posted September 21, 2015 Perfect! I'll check that quickly (Testing bjs 2.2 for now for RTM) Quote Link to comment Share on other sites More sharing options...
gryff Posted September 22, 2015 Author Share Posted September 22, 2015 No rush DK. Get BJS v2.2 established. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 24, 2015 Share Posted September 24, 2015 Is this bug has been corrected in 2.3? I can not find the fix and still seems present in the playground. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 Not fixed...Still need to work on it Quote Link to comment Share on other sites More sharing options...
gryff Posted September 24, 2015 Author Share Posted September 24, 2015 I saw that DK posted a cryptic "fixed" on the thread "Attach Mesh To Bone thread" and was not sure if the fix was for this normal flipping issue - so I tried it: Bend Tube This uses the latest "preview release" BJS script. Compare with the link above. Result is no normal flipping WTG DK :) cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 24, 2015 Share Posted September 24, 2015 lol I fixed it and went to the wrong forum post Quote Link to comment Share on other sites More sharing options...
gryff Posted September 24, 2015 Author Share Posted September 24, 2015 An as a further test on the new script with the original MakeHuman rig : Sword 2 And it does not flip either, though the position that the sword ends up in is different - but that can be handled. I'll say it again, well done DK cheers, gryff Edit: Using the new "preview release" script and lol I fixed it and went to the wrong forum post but fixing it was the important issue Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 24, 2015 Share Posted September 24, 2015 Thank you DK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.