Exporting from blender with exporter 6

Hi,

I am new and excited about Blender.and Babylon.js
As I am new I can only post one image, so I put here a link to the project I trying to export to Babylon.js : https://www.blendswap.com/blend/11733

after Exporting:

log:

Exporter version: 6.2.2, Blender version: 2.80 (sub 75)
========= Conversion from Blender to Babylon.js =========
Scene settings used :
inline textures : false
Material Type : PBR
Positions Precision : 5
Normals Precision : 5
UVs Precision : 5
Vert Color Precision: 5
Mat Weight Precision: 5
texture directory : C:\kuku\3d\public\cr
Python World class constructor completed
processing begun of mesh: Cube.014
processing begun of material: Material.001
num positions : 269
num normals : 269
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 1440
processing begun of mesh: Cube.013
processing begun of material: Brass
num positions : 464
num normals : 464
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 2688
processing begun of mesh: Cube.012
mesh is an instance of : Cube.013. Processing halted.
processing begun of mesh: Cube.011
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 464
num normals : 464
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 2688
processing begun of mesh: Cube.010
mesh is an instance of : Cube.013. Processing halted.
processing begun of mesh: Cube.009
mesh is an instance of : Cube.013. Processing halted.
processing begun of mesh: Cube.008
mesh is an instance of : Cube.011. Processing halted.
processing begun of mesh: Cube.007
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 124
num normals : 124
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 156
processing begun of mesh: Cube.006
mesh is an instance of : Cube.007. Processing halted.
processing begun of mesh: Cube.005
mesh is an instance of : Cube.007. Processing halted.
processing begun of mesh: Cube.004
mesh is an instance of : Cube.007. Processing halted.
processing begun of mesh: Cube.001
mesh is an instance of : Cube.007. Processing halted.
processing begun of mesh: Cube
mesh is an instance of : Cube.007. Processing halted.
WARNING: The following object (type - CURVE) is not currently exportable thus ignored: BezierCurve
processing begun of mesh: Circle.004
processing begun of material: DarkWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0003_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture DarkWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 1.0312 secs
num positions : 412
num normals : 412
num tangents : 0
num uvs : 824
num uvs2 : 0
num colors : 0
num indices : 1296
processing begun of mesh: GlassHolder.005
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 931
num normals : 931
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 5472
processing begun of mesh: GlassHolder.004
mesh is an instance of : GlassHolder.005. Processing halted.
processing begun of mesh: GlassHolder.003
mesh is an instance of : GlassHolder.005. Processing halted.
processing begun of mesh: GlassHolder.002
mesh is an instance of : GlassHolder.005. Processing halted.
processing begun of mesh: GlassHolder.001
mesh is an instance of : GlassHolder.005. Processing halted.
processing begun of mesh: GlassHolder
mesh is an instance of : GlassHolder.005. Processing halted.
processing begun of mesh: Plane.005
processing begun of material: Glass
WARNING: unsupported node type(ShaderNodeBsdfGlass) will trigger baking
bake time: 0 min, 0.017 secs
num positions : 2706
num normals : 2706
num tangents : 0
num uvs : 5412
num uvs2 : 0
num colors : 0
num indices : 16224
processing begun of mesh: Plane.004
processing begun of material: Glass
WARNING: unsupported node type(ShaderNodeBsdfGlass) will trigger baking
bake time: 0 min, 0.0256 secs
num positions : 3896
num normals : 3896
num tangents : 0
num uvs : 7792
num uvs2 : 0
num colors : 0
num indices : 22272
processing begun of mesh: Plane.003
processing begun of material: FineWood.001
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0007_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture FineWood_001_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.8668 secs
num positions : 1126
num normals : 1126
num tangents : 0
num uvs : 2252
num uvs2 : 0
num colors : 0
num indices : 6144
processing begun of mesh: Circle.003
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 1130
num normals : 1130
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 6624
processing begun of mesh: Circle.002
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 2260
num normals : 2260
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 13248
processing begun of mesh: Circle
processing begun of material: Brass
registered as also a user of material: Brass
num positions : 3390
num normals : 3390
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 19872
processing begun of mesh: Plane.002
processing begun of material: DarkWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0003_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture DarkWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.706 secs
num positions : 533
num normals : 533
num tangents : 0
num uvs : 1066
num uvs2 : 0
num colors : 0
num indices : 2688
processing begun of mesh: Cube.002
processing begun of material: DarkWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0003_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture DarkWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.8843 secs
num positions : 13218
num normals : 13218
num tangents : 0
num uvs : 26436
num uvs2 : 0
num colors : 0
num indices : 76464
processing begun of mesh: Plane.001
processing begun of material: DarkWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0003_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture DarkWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.736 secs
num positions : 1634
num normals : 1634
num tangents : 0
num uvs : 3268
num uvs2 : 0
num colors : 0
num indices : 9408
processing begun of mesh: Plane
processing begun of material: Felt
WARNING: unsupported node type(ShaderNodeTexVoronoi) will trigger baking
WARNING: unsupported node type(ShaderNodeTexNoise) will trigger baking
WARNING: unsupported node type(ShaderNodeValToRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeTexNoise) will trigger baking
WARNING: unsupported node type(ShaderNodeValToRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeMixRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeMixRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
bake time: 0 min, 0.011 secs
num positions : 11865
num normals : 11865
num tangents : 0
num uvs : 23730
num uvs2 : 0
num colors : 0
num indices : 46848
processing begun of node: PlasticInsertEmpty
processing begun of mesh: SpinnerBase.001
processing begun of material: DarkPlastic
num positions : 30943
num normals : 30943
num tangents : 0
num uvs : 61886
num uvs2 : 0
num colors : 0
num indices : 43776
WARNING: # of 0 area faces found: 2152
processing begun of mesh: Base.002
processing begun of material: DarkWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0003_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture DarkWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.77 secs
num positions : 5895
num normals : 5895
num tangents : 0
num uvs : 11790
num uvs2 : 0
num colors : 0
num indices : 33792
processing begun of mesh: Base.001
processing begun of material: RedWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0011_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture RedWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 1.1068 secs
num positions : 1344
num normals : 1344
num tangents : 0
num uvs : 2688
num uvs2 : 0
num colors : 0
num indices : 6144
processing begun of node: HandlesEmpty
processing begun of mesh: Diamond2
processing begun of material: Chrome
num positions : 356
num normals : 356
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 1920
processing begun of mesh: Diamond1
processing begun of material: Chrome
registered as also a user of material: Chrome
num positions : 356
num normals : 356
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 1920
processing begun of mesh: Handles
processing begun of material: Chrome
registered as also a user of material: Chrome
num positions : 8020
num normals : 8020
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 47808
processing begun of mesh: SpindleTop
processing begun of material: Marble
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture MarbleWhite0021_1_M
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture Marble_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.9677 secs
num positions : 134
num normals : 134
num tangents : 0
num uvs : 268
num uvs2 : 0
num colors : 0
num indices : 720
processing begun of mesh: Spindle
processing begun of material: Chrome
registered as also a user of material: Chrome
num positions : 3616
num normals : 3616
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 21504
processing begun of mesh: Base
processing begun of material: FineWood
processing texture WoodFine0036_L
texture type: diffuseTexture, mapped using: “UVMap”
num positions : 1176
num normals : 1176
num tangents : 0
num uvs : 2352
num uvs2 : 0
num colors : 0
num indices : 6144
processing begun of mesh: SpinnerNumbers
processing begun of material: NumbersG
WARNING: unsupported node type(ShaderNodeRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeMixRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
processing begun of material: NumbersR
WARNING: unsupported node type(ShaderNodeRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeMixRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
processing begun of material: NumbersB
WARNING: unsupported node type(ShaderNodeRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeMixRGB) will trigger baking
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
bake time: 0 min, 0.012 secs
num positions : 2588
num normals : 2588
num tangents : 0
num uvs : 5176
num uvs2 : 0
num colors : 0
num indices : 3552
processing begun of mesh: SpinnerBase
processing begun of material: RedWood
WARNING: unsupported node type(ShaderNodeRGBCurve) will trigger baking
processing texture WoodFine0011_L
texture type: diffuseTexture, mapped using: “UVMap”
Baking texture, type: DIFFUSE, mapped using: UVMap
processing texture RedWood_DIFFUSE
texture type: diffuseTexture, mapped using: “UVMap”
bake time: 0 min, 0.958 secs
num positions : 944
num normals : 944
num tangents : 0
num uvs : 1888
num uvs2 : 0
num colors : 0
num indices : 3840
processing begun of mesh: Circle.001
processing begun of material: Aluminum
num positions : 5120
num normals : 5120
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 30720
processing begun of mesh: BallReceiver
processing begun of material: RedPaint
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
processing begun of material: BlackPaint
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
processing begun of material: GreenPaint
WARNING: unsupported node type(ShaderNodeBsdfVelvet) will trigger baking
bake time: 0 min, 0.01 secs
num positions : 2505
num normals : 2505
num tangents : 0
num uvs : 5010
num uvs2 : 0
num colors : 0
num indices : 3552
processing begun of node: DividersEmtpy
processing begun of mesh: Dividers.001
processing begun of material: Aluminum
registered as also a user of material: Aluminum
num positions : 444
num normals : 444
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 1998
processing begun of mesh: Dividers
processing begun of material: Aluminum
registered as also a user of material: Aluminum
num positions : 444
num normals : 444
num tangents : 0
num uvs : 0
num uvs2 : 0
num colors : 0
num indices : 1998
processing begun of camera (UniversalCamera): Camera
processing begun of node: Empty
processing begun of light (DIRECTIONAL): Sun.002
processing begun of light (DIRECTIONAL): Sun.001
========= Writing of JSON file started =========
writing mesh: Cube.014
writing mesh: Cube.013
writing mesh: Cube.011
writing mesh: Cube.007
writing mesh: Circle.004
writing mesh: GlassHolder.005
writing mesh: Plane.005
writing mesh: Plane.004
writing mesh: Plane.003
writing mesh: Circle.003
writing mesh: Circle.002
writing mesh: Circle
writing mesh: Plane.002
writing mesh: Cube.002
writing mesh: Plane.001
writing mesh: Plane
writing mesh: SpinnerBase.001
writing mesh: Base.002
writing mesh: Base.001
writing mesh: Diamond2
writing mesh: Diamond1
writing mesh: Handles
writing mesh: SpindleTop
writing mesh: Spindle
writing mesh: Base
writing mesh: SpinnerNumbers
writing mesh: SpinnerBase
writing mesh: Circle.001
writing mesh: BallReceiver
writing mesh: Dividers.001
writing mesh: Dividers
========= Writing of JSON file completed =========
========= end of processing =========
elapsed time: 0 min, 14.3087 secs

As you can see light is wrong, an material is wrong

1 Like

You have a number of materials node types which are not exportable. Would recommend trying to get as many as possible expressed as a principle shader, which did not exist in Blender 2.6x. A good way to get familiar with Principled & massively reduce the rats nest of node possibly in those materials.

I would actually hold off on lights for now. Delete the lights especially if they were there from the original Blend. Any pre 2.80 lights should not be used for export, they changed a lot in 2.80. Start with exporting with an environment texture. See the exporter’s world properties for some to pick from, or using the sandbox initially, which comes with one

I have gotten some very nice stuff from Bendswap in the past. To really get things in good shape to performance in a real time environment like webGL took a couple of days. You got a little lucky in that it was already using nodes materials, and # of vertices were not massive.

This is a process though. First thing I did organize the meshes using the same material in the same collection. This has an immediate & well as future advantage. The immediate reason is that if you uncheck the box to the left of any collection, it will not be exported. You can then work on & see where the meshes are that share that material one at a time. Your log files will be much shorter. This is divide & conquer. Save this version 1.

If there are questions on a specific material, they are more easily answered. Just putting out the entire scene & saying it is wrong is not going to work. Sounds like you are new to Blender. You are going to have to invest some time there. Using pre-existing geometry form another source will mean that you do not have know everything.

Once you have the materials squared, you can now start to merge meshes of the same material for version 2 of your .blend file. Meshes which do not move or rotate that are of the same material gain a performance advantage if they get merged into one mesh. This is much quicker to do if they are already sorted by material into collections. What a coincidence :smile:

Good luck.

4 Likes

Thanks !

Would be nice if exporting from Blender would just work out of the box. :slight_smile:

1 Like

As @JCPalmer points out, the original model was created in Blender 6.2 and you got lucky that it was done in cycles. But that was a long time ago - Feb 2014 when BJS was just a twinkle in @Deltakosh 's eye - and things have changed a lot since then

There may be other issues with the file - the normals. See the image below (A, B, C). You seem to be able to see through the side of roulette wheel bowl (A), the “cups” on the table side seem to have no interiors (B) and there is no table top ( C - a plane with normals facing the wrong way?)

As for lights - try an area light .

And a general suggestion, any time you use a model created by someone else, always check the normals and backface culling.

cheers, gryff :slight_smile:

1 Like

Thanks @gryff

Normal seems ok.
This is area light , max intensity

Well the log you posted above says :

processing begun of light (DIRECTIONAL): Sun.002

not:something like this:

processing begun of light (HEMI FROM AREA): Light

Maybe that was an old log file?

cheers, gryff :slight_smile:

1 Like

@gryff

Sorry,

You are correct,
I previously tested with area light and got the same darkness . Forgot I swiched back to sun.

@sfa_radi : can you zip your .blend file and post it somewhere for download?

Ohh, and by the way, welcome to the forum

cheers, gryff :slight_smile:

1 Like

would really like to , however, new users are not allowed to load attachments.
However this is where I downloaded it from:
https://www.blendswap.com/blend/11733

Unfortunately, I do not have an account at Blendswap. Do not want to create an account just to get one file :frowning: And besides you may have done something in loading the Blender 6.2 file into Blender 2.8.

Can @Deltakosh perhaps allow the upload of a zipped file?

cheers, gryff :slight_smile:

Here casino-roulette-table.zip (604.9 KB)

2 Likes

@JCPalmer : Ahh merci Jeff :slight_smile:

cheers, gryff :slight_smile:

Hi, @sfa_radi. @JCPalmer has some great advice when he says,

“This is a process though”

From a number of deep dives in that direction, I learned he is right, and that you need to keep trying and learning things… to get those: aha - out of the box moments!

Why?

Broken exports, just do what they are TOLD to do. : )

A COUPLE EXAMPLES: Normals & Origins & Lights.

  • If the Normals are upside down, export will do what it is told… and you will see through something.

  • If Origins are not set correctly, export will do what it is told… and rotate from some surprising places! Easily making animations grotesque.

  • Too many lights makes everything white. Lights in the wrong places can make them black.

And 100 other easy mistakes, that are naturally occurring, to be honest.

Every time I have an export error… I SEARCH and find SOMETHING in BLENDER that is wrong.

Hundreds of times now. Work around for everything. : )

It’s not easy.

It is a PROCESS.

:eagle: : )

1 Like

Well I got a chance to look at @JCPalmer 's version of the file and immediately ran into issues- basically missing textures. See first image below - the pink nature of of the component meshes tells me that textures are missing. Looking at the textures that are trying to be used there are 7, mostly wood. Only two textures are included in the zip file - the table numbers and the wheelnumbers.

So in the second image the missing images are needed in the node B and that node fails in my attempt to export the file. Now, the log says "WARNING: unsupported node type(ShaderNodeRGBCurve) " so baking process is triggered. I could not get an export at all with the missing images but you may have a couple of options:

  1. Remove that node(C in Image2) from the shading process and change the texture, that gets exported, in Photoshop or Gimp etc to change the texture appropriately
  2. Bake out those textures in Blender itself then create a new material in the shader editor itself that will export properly

As an addition convert the the Bezier Curve to a mesh to take into account the message:

WARNING: The following object (type - CURVE) is not currently exportable thus ignored: BezierCurve

Best I can do given that there are missing textures and my time is limited for family issues are these suggestions.

cheers, gryff :slight_smile:

Edit: I am now using version 6.2.3 of the exporter (latest I believe).

imageA

imageB

1 Like

Every time I grab something off the net, I am reminded by Rodney Dangerfield in Back to School, “Don’t get used books, the notes inside could have been done by a mass murder”.

That said, I have gotten some amazing stuff from BlendSwap recently (you can probably guess what, shh!). I am still improving them.

1 Like

@JCPalmer : that reference to Rodney Dangerfield made me smile. Takes me back a few years :slight_smile:

Yes Blendswap can provide some good stuff - I think the problem maybe the use of textures and their licences. Some modelers are very good about fittng in with those licences, some are not so good.

cheers, gryff :slight_smile:

Really Thanks !

I am just starting, and I must say you have a great community here.

Even after adding all images and eternal files, I had to cut a lot of shaders,

and the bezier curve.

Would be nice if babylon could just support all these, or at least the exporter would do all conversations and fixes for you.