Jump to content

Questions regarding Playground and Textures


shedbuilder
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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