JCPalmer Posted August 28, 2018 Share Posted August 28, 2018 World: Working through the running of the exporter on 2.8, World is the first thing to run. It seems that Mist & ambient color have bit the dust for 2.8. I now hard code a mathutils.Color((0.2, 0.2, 0.3)) for ambient. Mist did not actually error, but there is no-longer a section in the world properties. I left the code for mist for now, but if there is no UI for it, eventually it will start to error. Since there is already a section for additional properties for mist by the exporter, the lost properties might be added there, or the additional properties deleted. Game Engine: With the removal of game engine, game_settings.face_orientation & game_settings.use_backface_culling are toast. That corresponds to Billboarding & back face culling in export. While it does not seem likely culling might really be gone forever, that would be a huge blow, if you could not turn it off when needed. Materials: Everything is changed here. Am just going to keep the exporter from exporting materials to see if there are any more problems not related to materials. Stay tuned. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 29, 2018 Author Share Posted August 29, 2018 After commenting out the 30 or so lines which create the materials, the very next line runs us right into a brick wall: # process all of the materials required #recipe = BakingRecipe(object) self.billboardMode = BILLBOARDMODE_NONE # BILLBOARDMODE_ALL if recipe.isBillboard else BILLBOARDMODE_NONE #if recipe.needsBaking: # if recipe.multipleRenders: # Logger.warn('Mixing of Cycles & Blender Render in same mesh not supported. No materials exported.', 2) # else: # bakedMat = BakedMaterial(exporter, object, recipe) # exporter.materials.append(bakedMat) # self.materialId = bakedMat.name #else: # bjs_material_slots = [] # for slot in object.material_slots: # None will be returned when either the first encounter or must be unique due to baked textures # material = exporter.getMaterial(slot.name) # if (material != None): # Logger.log('registered as also a user of material: ' + slot.name, 2) # else: # material = StdMaterial(slot, exporter, object) # exporter.materials.append(material) # bjs_material_slots.append(material) # if len(bjs_material_slots) == 1: # self.materialId = bjs_material_slots[0].name # elif len(bjs_material_slots) > 1: # multimat = MultiMaterial(bjs_material_slots, len(exporter.multiMaterials), exporter.nameSpace) # self.materialId = multimat.name # exporter.multiMaterials.append(multimat) # else: # Logger.warn('No materials have been assigned: ', 2) # Get temporary version of mesh with modifiers applied mesh = object.to_mesh(scene, True, 'PREVIEW') The to_mesh() allows us to export the mesh after any modifiers have been applied, e.g. armatures, edge split, smooth, mirror. While it is not really a great idea to export a character with the skeleton posed, being force to apply the other modifiers is bad. It did not say there was no to_mesh() anymore. There is now a problem with the first argument: Quote TypeError: Object.to_mesh(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not Scene There is no API documentation for 2.8, but the current doc clearly wants a scene for arg 1. I do not know what a Depsgraph is, but in the doc for a scene, has one for a property, or did anyway. Passing that was not acceptable. Quote mesh = object.to_mesh(scene.depsgraph, True, 'PREVIEW') AttributeError: 'Scene' object has no attribute 'depsgraph' Google has commenced. Turns out gltf exporter already reported the problem. The saga continues. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2018 Share Posted August 29, 2018 Woot..Why people keep introducing breaking changes on every version? I don't get the rationale... Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 29, 2018 Author Share Posted August 29, 2018 Well, I think they have been saving it up. Nuking 2 renders got them just re-architecting everything. They need these temporary meshes themselves. Did some looking around. Changing this to get better frame rates. I am going to switch to developing this branch while running on 2.79. There was one change I need to make for the first commit, a name change from 'Lamp' to 'Light'. I un-did this, but not committing. The rest of the changes to loading still run on 2.79. In 2.79, they first implemented PrincipledBSDF node. This is never going to put into the pre-2.80 release. Going to rip out anything for the old render first. Just more crap to wade thru. BTW, if 2 different materials could be expressed as either a BABYLON.StandardMaterial or BABYLON.PBRMaterial, should there be a preference? Maybe, Standard because: performance WebGL 2 Getting boned by Jobs from the grave etc Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2018 Share Posted August 29, 2018 I would recommend Standard yes Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 30, 2018 Share Posted August 30, 2018 Is it not still too soon to start porting addon for Blender 2.8? Core devs says that Python API will be update with somes brokes in it, during september (probably) (you can check the Code Quest Workboard, and this task). Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 30, 2018 Author Share Posted August 30, 2018 7 hours ago, V!nc3r said: Is it not still too soon to start porting addon for Blender 2.8? Core devs says that Python API will be update with somes brokes in it, during september (probably) (you can check the Code Quest Workboard, and this task). No, for anything in dev for a couple of years, less than 30 days is not too early to see what is now broken. Might be too early to fix problems unless it is easy to guess, though. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 26, 2018 Author Share Posted October 26, 2018 Just an update as to how the removal of game engine was resolved. 2 new custom properties were added to mesh. This actually makes them easier to find, rather than switching renderer. It always was kind of scavenger hunt. Also, they used to be defined for a material, not a mesh. There will be minor differences from before, limited to multi-material meshes only. Before you could turn off culling on a sub-mesh level, but that will no longer be possible. Doubt people are doing this though. inteja and V!nc3r 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 Good job mate! Quote Link to comment Share on other sites More sharing options...
inteja Posted October 28, 2018 Share Posted October 28, 2018 Until recently I resisted trying out Blender 2.8 as I knew it was changing rapidly but I just tried it and must admit I'm pretty damned impressed. The UX facelift I think will really alleviate that last perceived learning curve barrier that Blender has been criticised for in the past. I don't think long-time users will be hindered all that much by the changes. The devs have struck a great balance IMHO. I'm now eagerly looking forward to using Blender 2.8 and the Babylon exporter ? 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.