Jump to content

Issue with exporter Babylon (blender)


Soulangel
 Share

Recommended Posts

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

 

 

Link to comment
Share on other sites

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->Epaule

I wonder if this is the problem?

 

cheers, gryff :)

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 camera

b)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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ... :D

 

And I prefer Blender 2.69 :o

 

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 :)

 

 

 

 

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...