Soulangel Posted November 27, 2014 Share Posted November 27, 2014 Hi everyone, I have an issue with the exporter babylon for blender. I import a model .dae into blender who contains a mesh hierarchy (see the attachement) The hierarchy is respected into babylon but position or origin of each mesh not. See the resultin attachement 2 I'm pretty novice with Blender. Thanks for your help. regards, Soulangel Quote Link to comment Share on other sites More sharing options...
gryff Posted November 28, 2014 Share Posted November 28, 2014 Hi Soul. Could you post your .blend file somewhere so I can look at it? cheers, gryff Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 28, 2014 Author Share Posted November 28, 2014 Hi, I send you a private message the link of the .blend file. I simplfy the model because it is a prototype of my entreprise. If can you explains me the procedure to generate the proper .babylon file with the exactely same position and keep the mesh hierarchy. regards, Soul Quote Link to comment Share on other sites More sharing options...
gryff Posted November 28, 2014 Share Posted November 28, 2014 Ok Soul, I looked at your simplified model - it works fine. In Babylon and in Blender the objects look the same and are in the same positions. You can see it here: Soul's Rover In the blend file you sent I renamed the "rovSupportMetal" to "base" and "flotteur" to "top" - easier to type As you can see, I added an animation to the rovSupportMetal object and the "flotteur" moves along nicely with it If you look at the script that drives it - feel free to use it - remember that I changed the name to "base" Now that said, the image above of the Blender parent structure is much more complex - you have two levels of parenting in at least one place:rovSupportMetal ->BaseBras->EpauleI wonder if this is the problem? cheers, gryff Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 28, 2014 Author Share Posted November 28, 2014 Thanks for your feedback The name is given by the designer but is not a problem^^ Did you have to modify the transformation in blender? I have absolutely not get the same result . I use Blender 2.72 and Babylon-2.0-alpha (not the last with adding color into blender and 3dsmax exporter) Could' you send me the babylon file you have generated plz. Regards, Soul Quote Link to comment Share on other sites More sharing options...
gryff Posted November 28, 2014 Share Posted November 28, 2014 Soul, I have uploaded all the "Rover" files to my dropbox. Will send a link in PM after this. There are three files: 1. My index file with the code to create the an animation. It uses the .babylon file below. You may have to change the links to the scripts at the top of the file. i use version 1.14 of BJS. The script in the index file allows you to choose a camera - with a free camera from babylon file or a scripted ArcRotate camera - just set the cameraflag to 1 or 0. 2. My Blend file. Only changes to it are :a) Added a light and a camerab)Change the object names as I indicated - to base and top.c) Deleted the texture from the base object. It was not in the file you sent me and so I had to delete it otherwise the babylon file would not load - just got the "Loading" icon 3. My babylon file created from the above Blender file. I did NOT change any object properties - apart from the texture - in the blend file. So you should be able to set up your own version on your server. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 29, 2014 Author Share Posted November 29, 2014 Thanks a lot Gryff for your help I test yours babylon file into my project. The good point it is Ok so I guess I have a problem with the exporter.I compare your .babylon with my generation of your blend file and I do not get at all the same thing as you So I pull the last commit of Babylon install the last exporter for blender and generate a new file but I have a same result :/I also try with Blender 2.71 x64 and x32 same result . Could you send me your exporter plz ? Regards, Soul Quote Link to comment Share on other sites More sharing options...
gryff Posted November 29, 2014 Share Posted November 29, 2014 Soul, I tested your blend file exporting from Blender 2.69 and Blender 2.71 - and they both work. I see you are using: Babylon-2.0-alpha Did you try babylon.1.14.js? Anyway here are my exporters for 2.69 and 2.71 - they are different:. The 2.71 version allows for choosing a Blender layer Exporter 2.69 Exporter 2.71 I'm kind of conservative - if a new version of the exporter has something I want - I will install it. Otherwise ... And I prefer Blender 2.69 Anyway, keep me up to date with your progress.. Maybe we can get a solution to your problem ... or maybe there is an issue with the latest exporter. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 29, 2014 Author Share Posted November 29, 2014 Hi Gryff, I will try with your configuration and I keep you inform I also try with babylon-1.14 with the same result. Regards, Soul Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 29, 2014 Author Share Posted November 29, 2014 I really want to thank you Gryff, I try your exporter 2.69 and 2.71 and the result is really good, even with my full model You save my project So I guess, there is an issue with the latest exporter :/ Regards, Soul Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 29, 2014 Author Share Posted November 29, 2014 I have a question with your exporter.May add a light like spot light into a mesh and export it? Regards, Soul Quote Link to comment Share on other sites More sharing options...
gryff Posted November 29, 2014 Share Posted November 29, 2014 Glad you can move ahead with your project Soul. May add a light like spot light into a mesh and export it? To be honest I have never tried to parent objects to each other in Blender (apart from bones/rigs with meshes). However, I did create this a little while back: Animated light and camera In Blender I created a cube that I animated along a path between all the various objects you see.. I also created a camera and a spotlight at 0,0,0 without parenting and exported that as a .babylon file. In my script I added these few lines to parent the light and camera to the animated cube:myBase = newScene.getMeshByName("Cube");myCam = newScene.getCameraByName("Camera");myCam.parent = myBase;myLight = newScene.getLightByID("Point");myLight.parent = myBase;Now I have an animated camera and light. You should be able to do that kind of thing with parenting two lights to your "Rover". After you parent two lights - say point1 and point2 - offset the position of the two lights so they don't overlap. By the way, if you have other lights in the scene, just remember that a particular mesh can only be lit by a maximum of 4 lights. You have to start thinking of "including" and "excluding" meshes from particular lights. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Soulangel Posted November 29, 2014 Author Share Posted November 29, 2014 Thanks for your help Griff I will try to add spot ligh to my rov I know for the maximum 4 ligths, but underwater the only lights i want is that from my rov Regards, Soul. 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.