Why does the fog not work in a babylon file comming from Maya

If i turn on fog in the inspector nothing happens if the file is comming directly from Maya.
Does the fog require a skybox to work?

Hi @oglu
under scene options in inspector there is also fog mode / options (none by default)

yes that is what im doing.
it does nothing if i turn it on if the .babylon file is straight from maya.

Fog is on in features as well ?

There are 2 places in inspector you need to switch fog on:
Under features to make fog enabled
Then under Scene options are fog params (mode, color e.c)

try to change mode to Exp and add some red color, then play a bit with density

I have never used Maya so dont know if its exported from there

does not work.
fog isnt comming from maya.

here a simple scene from maya.

fog_test.zip (11.2 KB)

Haven’t tried yet your zip file, and doesn’t not much about Maya but I just do some tests on it, 'cause I was supposing that this fog issue could be a scene scale issue.

So here my tests:

  • Maya using default units setup (centimeters), exporting a 1m Cube (I keep the default exporter “scale” parameter to 1)
  • Blender (2.8) using default units setups, exporting a 1m Cube

playground using .glb: https://playground.babylonjs.com/#9C5BLA
playground using .babylon: https://playground.babylonjs.com/#9C5BLA#1

Result: my 1m Blender cube = 1 BJS unit, my 100cm Maya cube = 100 BJS units.

As you can see, using default centimeters configuration for both Maya & BJS exporter may force you to multiply by 100 compared to meters workflow. I don’t know if it’s an issue, from my 10 years experience I always use meters in my realtime workflow, but maybe it’s a lead to follow?

And here a fog test using your fog_test.babylon: https://playground.babylonjs.com/#9C5BLA#2

Notice the mesh.applyFog = true;

That scene scale issue is strange. This does lead to troubles if we use Maya and Blender in our pipeline.

How do i turn the fog on without code?
just using the inspector?
It should show up even everything is to big.

'don’t know about Maya BJS options.

Fog inside the Inspector could be activated at scene and mesh level.

About the Maya centimeter scale, we can try pinging some exporter dev’ to explain a bit (doc’ does not really clarify this default centimeter/BJS-units ratio, it just tell you can play with units scale during the export): @Drigax or @kcoley maybe?

It doesnt matter if i export the objects in meter or cm they are the same size in BJS.
If i use scaling during export all light infos go wrong even speed in animations go off.
Never scale an export.

There is no way to export fog from Maya.

It does now work now if i turn the fog on in the Mesh options.
There are three nobs to trun it on. Scene, Feature, Mesh.


@Vinc3r @oglu I think the Maya BJS exporter doesn’t take into account the Maya units settings. I don’t have access to Maya atm but someone can try setting the scale to .001 on export to see if they helps

If i set the scale setting to 100 i get the object hundred times smaller.
Now i get the same size like from blender.
It doesnt matter if i work in cm or meter.
The exporter does knwo what todo. If i create a 1meter cube its a 100cm cube.

Maya objects are 100 times bigger than Blender objects Thats the issue.

Scaling isnt an option cause the exporter doesnt recalculate the light distance.

Blender and Maya Units do match.
If i import a 2 meter Blender cube as .fbx in Maya everything is fine.

1 Like

The above does not mean everything is fine. Maya objetcts are 100 times to big in babylon compared to blender.

@oglu May I ask what you and your team are building? Seems like you have a lot of premade assets and questions about how to use the API without doing any programming, so I’m just curious what is being created :stuck_out_tongue:

Im not in the position to answer this question.

The thing is we first need a fast and easy to work with art pipeline. Programming will come later. Artists need a way to preview there work without the need of code.

1 Like

Ooh intense. Carry on.