shedbuilder Posted November 3, 2015 Share Posted November 3, 2015 Hi, I am designing a shed and would like to use a texture for the siding. I really like this playground environment and even though I am a beginner, I have made good progress rendering my partial shed, but I can't seem to get the playground to let me use a custom texture image. Here is my scene so far: http://www.babylonjs-playground.com/#1VMKSE#60 I am using grass as my texture because I can't upload my file to the playground (I don't see a mechanism for that). I tried an absolute url instead of "textures/grass.jpg" in the code but that didn't work for some reason. Is there a way to use custom texture .jpg images in the playground? I also have a some of other questions: 1. I have defined my walls as boxes. I now need to add windows and doors and allow movement of those. Is there any way I can cut my box defined mesh to allow the doors and windows or do I need to start over and define the mesh as a list of vertices? 2. is there a way to define different textures for different sides of a mesh? I read about a cube of meshes to be placed in a subdirectory but didn't totally understand it. 3. I have visual studio 2015 and heard there is a way to use that as a build environment with intellisense but couldn't find any details. Does that documentation exist? thanks for any help. Jeff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 3, 2015 Share Posted November 3, 2015 Hello and welcome! To use external texture, you have to deploy them to a server which does not check CORS: http://www.babylonjs-playground.com/#1SLLOJ#11 1. Yep you can use CSG for that: http://www.babylonjs.com/?CSG (sample code: https://github.com/BabylonJS/Samples/blob/master/Scenes/Customs/csg.js) 2. Yep you can use multimaterials and submeshes for that: https://github.com/BabylonJS/Samples/blob/master/Scenes/Customs/multimat.js (search for submeshes on this forum as well) 3. No formal documentation but if you add /// <reference path="babylon.max.js"/> in oyur .js files, you should get the intelisense Quote Link to comment Share on other sites More sharing options...
shedbuilder Posted November 3, 2015 Author Share Posted November 3, 2015 Deltakosh, Thanks a lot for your help. That is just what I needed. Jeff GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
shedbuilder Posted November 11, 2015 Author Share Posted November 11, 2015 Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.