JCPalmer Posted August 8, 2016 Share Posted August 8, 2016 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: Minumim Blender version checking. Current minimum is 2.76. 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. 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 ian, NasimiAsl, jerome and 9 others 12 Quote Link to comment Share on other sites More sharing options...
gryff Posted August 9, 2016 Share Posted August 9, 2016 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2016 Share Posted August 9, 2016 Excellent job! (As usual!) ian 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 10, 2016 Share Posted August 10, 2016 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 : I use 2.77a and Blender Render, on windows 10 64b. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 10, 2016 Share Posted August 10, 2016 It appears that this bug occurs when I set a track to constraint to an Arc Rotate camera, which as an empty for target. If a replace the empty by Suzanne, it works great ! Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 17, 2016 Share Posted August 17, 2016 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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 17, 2016 Author Share Posted August 17, 2016 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 : 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. Quote Link to comment Share on other sites More sharing options...
Pierre Glibert Posted August 17, 2016 Share Posted August 17, 2016 Hi @JCPalmer, good job ! If it can help you, I have also the same bug of @V!nc3r but if i have a mesh in an empty object. I have a little question for you : Is it possible to add the parent of an instance of a mesh in your json export please ? Thank you. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 17, 2016 Author Share Posted August 17, 2016 @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. Quote Link to comment Share on other sites More sharing options...
Pierre Glibert Posted August 17, 2016 Share Posted August 17, 2016 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 : 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 ? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 17, 2016 Author Share Posted August 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
Pierre Glibert Posted August 18, 2016 Share Posted August 18, 2016 12 hours ago, JCPalmer said: Empties do not have a layer, apparently. Hi @JCPalmer, I looked for layers and empty object but nothing changed ... However, I see in data-block > Object > Empty > layers. May be i did something wrong. I share you a simple exemple in a .blend file test.zip Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 18, 2016 Author Share Posted August 18, 2016 ok, 5.0.2 processes empties all the way through. Added parentId for Instances when exists. Think there could be issues when using ImportMesh vs Append/Load. If you load a mesh it should get the mesh hierarchy, I think, but possibly not the parent of an instance. Quote Link to comment Share on other sites More sharing options...
Pierre Glibert Posted August 19, 2016 Share Posted August 19, 2016 Hello @JCPalmer, I tried to export with empty and instanced object but i have two logs. Instance export test : Empty export test : I share you the blend file and two logs in attached file test 5.0.2.zip PS : i work on blender 2.77a Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 19, 2016 Author Share Posted August 19, 2016 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. Pierre Glibert 1 Quote Link to comment Share on other sites More sharing options...
Pierre Glibert Posted August 20, 2016 Share Posted August 20, 2016 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 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 ! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 20, 2016 Share Posted August 20, 2016 is this just python scripts? What would it take to port to c4d? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 21, 2016 Author Share Posted August 21, 2016 Right now, yep just python. It would take a lot, I guess. Quote Link to comment Share on other sites More sharing options...
Flomotion Posted August 22, 2016 Share Posted August 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 22, 2016 Author Share Posted August 22, 2016 @Flomotion, if this is broken since 5.0, please provide .babylon files from 5.0.2 & 4.6.1, so I may diff them. More likely this is BJS issue with no connection to Blender exporter. Think you would better posting this in the questions sub-forum. Quote Link to comment Share on other sites More sharing options...
gryff Posted September 2, 2016 Share Posted September 2, 2016 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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 4, 2016 Author Share Posted September 4, 2016 Well, 5.0.2 made the light layer code work for Nodes, but due to a spelling error all meshes got included. 5.0.5 in pipeline. gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted September 4, 2016 Share Posted September 4, 2016 @JCPalmer : New BE (v5.05) issue solved. Thanks Jeff cheers, gryff Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 6, 2016 Share Posted September 6, 2016 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 ? Quote Link to comment Share on other sites More sharing options...
max123 Posted September 6, 2016 Share Posted September 6, 2016 @JCPalmer Thanks for the exporter; it was the first thing I tested when I started with Babylon and the main reason I defected from the three.js camp 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.