captainleighwalker

Members
  • Content count

    50
  • Joined

  • Last visited

About captainleighwalker

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. captainleighwalker

    Door designer (Work in progress)

    Hi buddies This is my current version on canvas Old This is my progress so far in Babylon New Any suggestions welcome. Thanks for help from @Deltakosh @JohnK @Wingnut ๐Ÿบ
  2. Hi i am trying to load all files with asset manager. Is it possible to do CreateFromPrefilteredData with this method? thanks in advance
  3. captainleighwalker

    Png texture mask

    Thanks, it works in chrome but its just black in ie and Edge?
  4. captainleighwalker

    Png texture mask

    Finally got a PG Repro. My format code doesn't seem to work. coordinatesIndex is 0 for both textures. https://www.babylonjs-playground.com/#WFLKH#55 You will see it maps ok if applying texture directly.
  5. captainleighwalker

    Png texture mask

    I assume the problem is the texture cant tile?
  6. captainleighwalker

    Png texture mask

    This is with uv texture squares map. You can see bump is mapping ok but not texture?
  7. captainleighwalker

    Pivot and position 3.2

    Yes @Wingnut That's is what I was looking for. Sorry @JohnK not had time to get back to the questions. I did work that out in my head Wingnut since I last posted. I realised I made the model in Inventor with bottom left corner at 0,0,0 in XY axis. I centred the model in Max which obviously just applies a transom. I realised all the verts are still at the original cords. I think baking transforms makes life more simple then I don't need to worry about y and z after importing. However since pivot and verts are all at the correct absolute position all I have to do is box.bakeCurrentTransformIntoVertices(); and everything is normal!!!! https://www.babylonjs-playground.com/#WFLKH#54 Thanks for your help, I think this case is closed!
  8. captainleighwalker

    Png texture mask

    Well I've tried! I've made the texture the same size as my bump texture but it seems like the cords are not the same or something? What's missing here? Also I take it you have to set has Alpha to show the diffuseColor below? var texture = new BABYLON.DynamicTexture("slabOutsideTexture", { width: img.naturalWidth, height: img.naturalHeight }, scene); var context = texture.getContext(); context.fillStyle = "white"; context.fillRect(0, 0, img.naturalWidth, img.naturalHeight); context.drawImage(img, 0, 0);
  9. captainleighwalker

    No shadow from clone

    Yes thanks ๐Ÿ˜
  10. captainleighwalker

    No shadow from clone

    On my pc there is a missing shadow under the sphere on https://www.babylonjs-playground.com/#JE0ZA7#2 Even when setting level to 0?
  11. captainleighwalker

    No shadow from clone

    well it's ok if i have force back faces to false but would be nice to know how to do it as true! any thoughts on the hemispheric light problem in the last post?
  12. captainleighwalker

    Png texture mask

    I'm sure that will do the job thanks. ๐Ÿ‘Š
  13. captainleighwalker

    No shadow from clone

    And how to stop the HemisphericLight messing up the shadow? I noticed the shadow is ok if setting the scaling to -1 ๐Ÿคจ https://www.babylonjs-playground.com/#JE0ZA7#2 Thanks for the help!
  14. captainleighwalker

    No shadow from clone

    Yes it does work in this PG but on my mesh it's not. I have tried all sorts of angles and distances by setting light parent to the camera. It does work with forceBackFacesOnly = false but I though having this true would save some processor. You can see in this image. By the way I have used csg on the original mesh before cloning.
  15. captainleighwalker

    Png texture mask

    (I've just realised I did use a png in 2D on canvas but black and white jpg would be nice ๐Ÿ˜‹) It would be very hard to make anything in PG as this is my problem! I'm sure you will understand if I show you in 2D on canvas img = "grain with transparency.png"; var grainCanvas = document.createElement("canvas"); grainCanvas.width = img.naturalWidth; grainCanvas.height = img.naturalHeight; var grainContext = grainCanvas.getContext("2d"); grainContext.drawImage(img, 0, 0); grainContext.globalCompositeOperation = 'source-in'; grainContext.fillStyle = "grain colour"; grainContext.fillRect(0, 0, grainCanvas.width, grainCanvas.height); Then use this canvas as the texture for the material and let the diffuse show through under it. (which is one solution but I would prefer not to make a canvas - just use Babylon textures)