Blender 6.0 exporter for Blender 2.80

If you find hooking in this json file is too much, generating an inline javascript file instead will also get the job done without making changes to the Repo.

Technically, you could add this without changing the Repo, I guess.

1 Like

Well am in full conversion mode to Blender 2.80 / TOB 6.0 exporter for all my test / demo scenes. I have encountered an error when trying to export any colors of former STD materials appended into a new file. You cannot address fields using .r, .g, or .b. You must do [0], [1], or [2]. Guess we just cannot have nice things. Array indexing always works though.

Back face culling & max simultaneous light were also not being written when not using a Nodes based material. I have corrected these, and will be updating the .babylon exporter in the next day or so.

One good thing I do like about 2.80, is there are new window types for my test scenes which save me time. First is that preference can now be in a window (pink), and info where errors & where I can write to in green. Can save this layout into the .blend file.

3 Likes

Blender ver 6.0-Beta 8

  • Write colors in a way which works for both Nodes based, & converted STD materials.
  • Write backFaceCulling, checkReadyOnlyOnce, maxSimultaneousLights when a non-Nodes material
  • Write shapekeys / morgh targets
3 Likes

Hi,

I detected 2 problems with Instanced Mesh when I active “Check Collisions” or with Array modifier:

  1. “Check Collisions” on same data mesh only works on the one object (the first at the top of the list)

  1. Array modifier applied by error on the second object who have share instanced mesh

Otherwise, thank you very much for the work already done, it’s great.

FYI, there is an old topic in the last forum. The thing drags on and on, but might be helpful.

Blender has different model of sharing to BJS instances. Blender just applies the same properties among all. The purpose is to share data, except position / rotation / scale.

In Babylon.JS, there is a mesh, and all the others are instances. The purpose here is performance by reducing draw calls. The exporter makes the first mesh encountered with shared data the Mesh, and all the rest are the InstancedMeshes. There are many things which cannot be set different on an Instance. I do not know see where to set collisions is on an InstancedMesh. I do not know / remember if InstancedMeshes can participate in collisions / physics.

One thing that could be done as an alternative without increasing draw calls is to merge the meshes, either before or after export. This will work as long as the desks DO NOT move / rotate.

On the Array modifier, must admit I do not even know what that is. You are doing it with instances, so might be the same issue.

Up shot is it might be something which cannot be done.

1 Like

The Babylon exporter works well at InstanceMesh level, because if I create pillars by doing duplications via alt + d to share data. I have one Mesh and three InstanceMeshs. It’s good for Draw calls because egal to 1 and not to 4.
But there is still the problem of collisions. Ideally and logically, it would be necessary to have the collision active on all 4 meshs because under Blender “Check Collisions” is activated on the Mesh Data (Pillar_Reference). If I look with inspector, it’s not the case. Here are the Blender 2.8 and Babylon source files if needed

I can only write into an export file that which is going to be read. That said, I double checked what that is.

I see a little below the line I referenced that checkCollisions are being loaded if present. I do not when this got added, as the history does not go back further than 10/22/18, when @sebavan did his big merge.

No matter, I will put it on my list to address the current things transferrable for instances. Do not know when, & will only be in the 2.80 exporter. Probably under a week.

It’s impeccable, I’m waiting for your news, thank you

Instances now write pickable & checkCollisions. Only missing animations for instances. Not confident about that. I understand that these would not be different for Blender, but could be for other exporters.

For now, if you want animations for instances, cloning them once loaded is up to you. Probably better than duplicating animations in file.

2 Likes

It’s great, the colliders are now activated on all InstanceMesh, really top. Thank a lot
Later, I’ll try on the big scene if the performances are correct with the collider boxes InstanceMeshes compared to an only collider box. I’ll make a comeback.

Hi, I just saw that Visible and Enabled don’t work on the InstanceMeshes, can you correct that?

Short answer is no. If you look at the link to what can be imported for instance from above, re-linked here, those are not consulted.

Indeed, I don’t see any reference to Visible and Enabled:-(
Would it be great if you could consider adding this possibility on Meshes instances?
I really hope not to bother you with my requests for improvement.
In any case, thank you very much for your work on the exporter.

I only do like one PR directly against the framework repo each release. This will not be one. If you do the PR, then I will add it. Think the cut off for 4.0 is quite soon. There are no cut offs for the exports repo.

Blender 6.0 beta 10

1 Like

you rock!

@JCPalmer : You are doing a great job Jeff :slight_smile: And I notice that the Babylon Exporter is now automatically installed :slight_smile:

I just hope that the other add-on creators will be as conscientious. I tried the new MakeHuman methods of directly linking to MakeHuman to avoid having to save an mhx2 file from MH - did not work. No clothes or armature. Had to do an MHX save then load.

Still I guess people have until June. Keep up the good work!

cheers, gryff :slight_smile:

2 Likes

I do not understand the “automatic” part. I did not change anything.

I am just starting to work on the MH Blender plugin today. I refreshed my repo with changes from others, did the install of the plug-in & enabled it. Now that the vertical tabs are removed from down the side, I cannot for the life of me figure out where it is. Blender 2.80 can be frustrating.

Found it. The vertical tabs are now on the other side

2 Likes

@JCPalmer wrote:

Blender 2.80 can be frustrating.

Yes Jeff. I still can’t stop myself “right clicking” for selection :unamused:

Type N - to bring up the tabs on the right side to get the MHX stuff.

cheers, gryff :slight_smile:

Ahh I see you found it!! :slight_smile:

1 Like