Jump to content

FireProceduralTexture removed in 2.3?


Recommended Posts

I copied the code from the playground procedural textures sample, and it worked (*) with my old babylon.min.js (1.9 or 2.0):

    var fireMaterial = new BABYLON.StandardMaterial("fontainSculptur2", scene);
    var fireTexture = new BABYLON.FireProceduralTexture("fire", 256, scene);
    fireMaterial.diffuseTexture = fireTexture;
    fireMaterial.opacityTexture = fireTexture;

But when I switched to babylon.max.js, version 2.3, I get: "TypeError: BABYLON.FireProceduralTexture is not a constructor"

(everything else in 2.3 seems to work)

*:Well, it seemed weird, which was why I tried the latest babylon code. But, in fact I just needed to play with uScale/vScale.



Link to comment
Share on other sites

All the materials and procedural texture moved from the core to a side library : https://github.com/BabylonJS/Babylon.js/tree/master/proceduralTexturesLibrary/proceduralTextures

So just a tag script into your html code to download the fire procedural texture : http://babylonjs.com/libs/babylon.fireProceduralTexture.min.js


Link to comment
Share on other sites

Thanks Jerome. That ought to be mentioned more clearly in the changelog, especially as the playground examples still work; I'd thought things being removed was the difference between the "max" and the "core" versions.

I just realized I could've looked at the playground source. So, for anyone else, here is the full list of Playground includes:

    <script src="http://www.babylonjs.com/cannon.js"></script>
    <script src="http://www.babylonjs.com/Oimo.js"></script>
    <script src="http://www.babylonjs.com/babylon.js"></script>
    <script src="babylon.fireMaterial.min.js"></script>
    <script src="babylon.waterMaterial.min.js"></script>
    <script src="babylon.lavaMaterial.min.js"></script>
    <script src="babylon.normalMaterial.min.js"></script>
    <script src="babylon.pbrMaterial.min.js"></script>
    <script src="babylon.skyMaterial.min.js"></script>
    <script src="babylon.triPlanarMaterial.min.js"></script>
    <script src="babylon.terrainMaterial.min.js"></script>
    <script src="babylon.gradientMaterial.min.js"></script>
    <script src="babylon.furMaterial.min.js"></script>
    <script src="babylon.brickProceduralTexture.min.js"></script>
    <script src="babylon.cloudProceduralTexture.min.js"></script>
    <script src="babylon.fireProceduralTexture.min.js"></script>
    <script src="babylon.grassProceduralTexture.min.js"></script>
    <script src="babylon.marbleProceduralTexture.min.js"></script>
    <script src="babylon.roadProceduralTexture.min.js"></script>
    <script src="babylon.starfieldProceduralTexture.min.js"></script>
    <script src="babylon.woodProceduralTexture.min.js"></script>    
Link to comment
Share on other sites

BTW, the lavaMaterial needs a way to specify the amplitude, i.e. it currently has a hard-coded (?) dependency on world coordinates. E.g.


(I took the example and reduced the plane dimensions by 1/100th, and moved the camera closer.)


And the "pbr" material page (http://doc.babylonjs.com/extensions/pbr) is missing. Or the link in the changelog is wrong... the http://doc.babylonjs.com/extensions/ page links to a different 404:

Hhmm, there quite a few 404s from the links on that page, so maybe someone is working on it at the moment?

Link to comment
Share on other sites

Thanks Temechon. That is part of it, but still not quite what I had in mind. I moved the camera closer, and restored the 100 subdivisions on the plane. I expect this:


to look identical to this:


I'm also wondering how to get the same appearance when the ground is 2000 x 200, or 200 x 2000. (It looks like uScale and vScale have no effect.)

Link to comment
Share on other sites

  • 1 year later...

Once again Jerome saves me.

My <head> now also includes:

        <script src="https://babylonjs.azurewebsites.net/lib/babylon.fireMaterial.min.js"></script>
        <script src="https://babylonjs.azurewebsites.net/lib/babylon.fireProceduralTexture.min.js"></script>

http://playground.babylonjs.com/#HYFQJ#13 if anyone is interested in what wouldn't work before I figured this out.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...