Jump to content

Blender Exporter 5.0


JCPalmer
 Share

Recommended Posts

Blender exporter ver 5.0 has been completed.  Below are highlights:

New in 5.0

  • Now distributed as a .ZIP file. This format allows the addon to be multiple files / directories, as well as enables other types of files to be included (even .BLEND files).
  • Meshes can now be directed to ignore that they have a skeleton for export purposes.

  • Certain things will now prohibit the generation of an export file, in order to reduce reports of known problems / un-necessary support:

  1. Minumim Blender version checking. Current minimum is 2.76.

  2. Meshes with un-applied rotation or scale which also have skeletons.

  • The `This Layer Only` checkbox on the Light data properites tab is now used. When checked, the `includedOnlyMeshesIds` property of the light is now exported with the values of those meshes that are also on the same layer as the light.

  • Maximum Simultaneous Lights property has been added to the mesh data properties tab. This is applied to all materials of the mesh.

Fixed in 5.0

  • Cycles exports now work for Blender 2.77. There was an API syntax change for 2.77. The exporter now detects the version of Blender and makes API calls appropriately.

  • When there are multiple meshes with actions in a .BLEND, it is not possible to determine which meshes participate in which actions. When there is an action which is only done by one Mesh, place the mesh name then a '-' in the name of the action to isolate it.

Now that the media is a ZIP file, you need to adjust installation.  First there is an easy way to get a file of this type to your machine.  Just try to view it.

Selection_001.jpg

You do not un-zip it your self.  Just select it from the 'Load File' button in preferences as before.  It does not overwrite the older one.  For more on how to delete the old one, see

Link to comment
Share on other sites

20 hours ago, JCPalmer said:

The `This Layer Only` checkbox on the Light data properites tab is now used. When checked, the `includedOnlyMeshesIds` property of the light is now exported with the values of those meshes that are also on the same layer as the light.

Please find a quick example here

@JCPalmer : great addition Jeff :)

cheers, gryff :)

Link to comment
Share on other sites

Great job ! The cycles part surely had to be not easy :)

I, unfortunately, encountered a bug. I've try to switch my exporter from 4.6.1 to 5.0.0 from a scene, and this is what blender tell me :

HlLeaDi.png

I use 2.77a and Blender Render, on windows 10 64b.

Link to comment
Share on other sites

Hello, i'm exploring texture backing in blender exporter 5.0

Thank you for all the great work for blender and babylonjs, really enjoy it!

I do the really basic stuff,

mostly it works on 2.76 and also on 2.77 sometimesi run into error, you got a topic on it, oncallback ect.
it looks the same, it happens somewhere in the uv image editor in cycles mode (vs blender internal)


Please provide also a displace map, cycles has a node for it, maybe it is possible to export a displace map directly ...

http://babylonjs-playground.com/#29V9VM#0



 

Link to comment
Share on other sites

On 8/10/2016 at 5:43 AM, V!nc3r said:

Great job ! The cycles part surely had to be not easy :)

I, unfortunately, encountered a bug. I've try to switch my exporter from 4.6.1 to 5.0.0 from a scene, and this is what blender tell me :

HlLeaDi.png

I use 2.77a and Blender Render, on windows 10 64b.

I did not notice this post.  The problem is related to the refactoring into multiple source files.  There seems a small amount of Tower of Babel only code for nodes.  5.0.1 PR in progress.

Link to comment
Share on other sites

@Letsbro studio, run 5.0.1 where the stray code for empties / nodes has been removed.

It looks like any properties of BABYLON.Node or BABYLON.AbstractMesh can go on a BABYLON.InstancedMesh.  Problem is the parsing of fields for instances is done in BABYLON.Mesh.  This is because an InstancedMesh needs the geometry of a Mesh.

I can do anything I want in my JS source code exporter, but I cannot make the fileloader read anything I throw in a .babylon file.  The FreezeWorldMatrix entry is not being read:(.

I will add everything possible in Tower of Babel exporter, which will just run it.  Will throw stuff on .babylon file, but getting it to load is your problem.  This will not happen right away.

Link to comment
Share on other sites

2 hours ago, JCPalmer said:

@Letsbro studio, run 5.0.1 where the stray code for empties / nodes has been removed.

thanks for your quick answer @JCPalmer.

I run the latest ( 5.0.1 ) with an empty object in my scene but i have this :

Capture d’écran 2016-08-17 à 22.04.50.png

 

2 hours ago, JCPalmer said:

It looks like any properties of BABYLON.Node or BABYLON.AbstractMesh can go on a BABYLON.InstancedMesh.  Problem is the parsing of fields for instances is done in BABYLON.Mesh.  This is because an InstancedMesh needs the geometry of a Mesh.

I can do anything I want in my JS source code exporter, but I cannot make the fileloader read anything I throw in a .babylon file.  The FreezeWorldMatrix entry is not being read:(.

I will add everything possible in Tower of Babel exporter, which will just run it.  Will throw stuff on .babylon file, but getting it to load is your problem.  This will not happen right away.

I will try to find solution for the babylon fileloader read parent and apply this ;)

Perhaps like that :

In mesh file :

// Instances
if (parsedMesh.instances) {
...

  if (parsedInstance.parentId) {
    instance._waitingParentId = parsedInstance.parentId;
  }

...
}

 

Because in fileLoader, this code allready exist and all instances are in "meshes" array : 

// Connect parents 
for (index = 0, cache = scene.meshes.length; index < cache; index++) {
  var mesh = scene.meshes[index];
  if (mesh._waitingParentId) {
    mesh.parent = scene.getLastEntryByID(mesh._waitingParentId);
    mesh._waitingParentId = undefined;
  }
  
  ...
}

 

What do you think @Deltakosh ?

Link to comment
Share on other sites

Your error is farther down.  It was an obvious fix to remove an argument, I did not test.  Empties do not have a layer, apparently.  Will throw one into a scene to make sure it runs all the way through.  FYI, recording Layer was added this release for a later test with Lights.  Empties do not need lights, so it should be simple.

Link to comment
Share on other sites

Too busy with my own stuff right now, but would suggest you start any stop Blender & try again.  Just enabling & disabling add-on after loading again has some real issues when the # or arguments on a function call has changed.  To avoid the need to keep adding more any more items to record with an instance, I go rid of a number & just passed the whole object.

Think this will solve your problem.  One minor annoyance with a zip file distributable.

Link to comment
Share on other sites

Hi @JCPalmer,

14 hours ago, JCPalmer said:

Just enabling & disabling add-on after loading again has some real issues when the # or arguments on a function call has changed

You are right ... I don't know why, but i restarted my computer, desabled and enabled addon, and this morning ... It's working :P

Perhaps something stayed in local memory. It's a mistery.

So, i confirm, the export for parent of instance and empty object working ;)

I will create a new post to ask if it is possible to apply parent of instance.

Thanks again and good job !

Link to comment
Share on other sites

I've been trying to get the object-parent animations to work.

I noticed that the parent-child relations work when only the 1st child is animated.

But if a child of a child is animated, it completely loses it's position/rotation. There is still a connection to the parent but the pivot point is set to a different position/rotation.

Link to comment
Share on other sites

  • 2 weeks later...
On 2016-08-08 at 5:11 PM, JCPalmer said:

The `This Layer Only` checkbox on the Light data properites tab is now used. When checked, the `includedOnlyMeshesIds` property of the light is now exported with the values of those meshes that are also on the same layer as the light.

I tried this out with an earlier version of the exporter (5.0.2?)and it worked fine. But yesterday tried it out with BE ver 5.0.4 and got this result:

Playground

The cubes are in layer 1 with a hemi light that illuminates the whole scene, the spheres are in Layer 2 with a point light and "This Layer Only" checked so there should be no red light on cubes.

Not sure why I get this result now.

Blend/Babylon files

cheers, gryff :)

Link to comment
Share on other sites

I've not the dev skill to help enhance the exporter, but I would like to help in possible.

For example, maybe it could be interesting to make some screenshots of Blender UI with visual indications of what could be exported and what not, for the doc ?

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