Jump to content

Image as reflection?


Recommended Posts

I see, thanks! One question before I go down this road: does using an image result in faster performance than a group of meshes? I presume so because each mesh has to be calculated vs. simply using a single image, but I wanted to see if any benchmarks have been made of this. Is it worth the trouble?



Link to comment
Share on other sites

Running into troubles with this. I have made my skybox in Blender and exported to six jpeg files. Babylon is correctly loading the files, but instead of rendering a reflection, the texture is coming out totally black.


My code is as follows:

 var floorMaterial:BABYLON.StandardMaterial = (<BABYLON.StandardMaterial>this.scene.getMaterialByName("garage.Concrete_Floor.001")); floorMaterial.reflectionTexture=new BABYLON.CubeTexture("skybox/skybox", this.scene);

What am I missing?

Link to comment
Share on other sites

Something like this:

var floorMaterial:BABYLON.StandardMaterial = (<BABYLON.StandardMaterial>this.scene.getMaterialByName("garage.Concrete_Floor.001"));var cubeTex:BABYLON.CubeTexture = new BABYLON.CubeTexture("/models/garage/skybox/skybox", this.scene);floorMaterial.reflectionTexture = cubeTex;floorMaterial.reflectionTexture.level = 0.175;
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...