• Content Count

  • Joined

  • Last visited

Everything posted by culeaalex

  1. Hy, I am trying to create 2 cameras and control them with TrackballControls & OrthographicTrackballControls. The problem is that when I go from Perspective to Orthographic, the Orthographic controls do not work anymore. When changing I tried using control.dispose() and every time I switch I reinit the control. Another problem is that if I start with Orthographic I can zoom, pan and rotate the camera, then if I switch to Perspective and then back to Ortho again, I can't work with the camera.
  2. How? We could only work together if we could brainstorm Again I say: MY FUNCTION is wrong and "works" only with straight lines. I can make it in the playground in the weekend just to show u, but I do not think it will help u much. This has to be thought how to approach the problem. The best way to do it is like it was done with Babylon.CSG: someone translate the functions from Three.js to Babylon.js. The problem is that I can't do it. I know my limitations, and it would take me too much to understand what three.js has done there (first), then translate it the best to babylon.js (example of what I wan't to do in babylon: ).
  3. Did u saw my example? It is something u are describing. U make a box, then a sphere, u align them as u want and then using BABYLON.CSG u can make a whole in the box, a whole exactly like the sphere. I u want only to have a see-throw wall like a portion of it, but not a whole, try looking at
  4. => works for me in 1.3 and in 1.4 Paste the code u have.
  5. myMesh.material = new BABYLON.StandardMaterial("texture1", scene); (or whatever material u want) material.alpha = 0.5;
  6. It had a space at the end of .html The link is :
  7. Here is a working page: But again, I do not think is a good script. It is not working correctly with straight lines, and not even close with curves. And sorry to ask this, but I thought Babylon.js is developed by guys @Microsoft. This is the reason I have chosen babylon.js. Should I go to three.js? Why isn't this build upon/extending three.js (that I understand allows to draw custom shapes)? As far as logic goes I find it more ok to go from custom shapes to predefined shapes that are done extending custom shape. Hoping I haven't upset anyone, is it possible to have this function implemented in the next 3-4 months ( for now I need only to work with straight lines in 90* angles, and I can do this easily so far), or should I try three.js (or something else)? I really hope it won't have to be three.js as I really love the fact that babylon.js is made for games and has already built in functions that would help me a lot. (although I intend to my app to extend any javascript webgl engine)
  8. @Wingnut: I did that. The problem is that I want the user to draw in 2D any shape and then recreate it in Babylon. Example: (u can insert the vectors and it will create a custom filled shape) The problem with my example: it does not always fill the shape and is (as far as I can tell very RAM intensive - don't know if its babylon 1.14 beta or my function ) The solution is to create a function that files a custom shape with triangles (what I am intending to do), but the ultimate solution eludes me... Three.js did it, but AGAIN, my math skills and logic are not that good (apparently) or my understanding of 2D and 3D geometry. It would take me days/weeks to come with the solution, when someone smarter (or with more experience, that could understand the way three.js did it) could do it.
  9. For the last 2 full days I am trying to make a function to draw a custom shape mesh and I can't do it. I am trying to fill it with triangles (as I understand it is done), but my math skills and logic are not good for this. Plus the function I made doesn't fill it correctly and loads the browser (and RAM) very much to the point that it crushes the browser for low memory (after long time usage ~ 1 hour ). It is driving me crazy, and I saw that is on the road-map, but I desperately need it for the current project I am working at, this being the only thing that is stopping me to advance. PS: I do not intent (for now) to use curved lines in the custom shapes.
  10. I think I found solution at (is it ok? - cannot test right now). Is there anything better?
  11. How can I make this work for plane? When I try to make a hole in a plane with a sphere (subtract), the result is the same plane with a dent in it.
  12. Hello, I want to create houses in babylon and for that i need to create custom shaped floors (ex: L shaped houses) that I will be able to apply texture to and make it look uninterrupted. How do I do this? ( I have no experience with 3D terms so sorry if there is another topic like this).
  13. I found that answer. Than I had to deduct that somehow is a zoom for orthographic view and also I have to multiply with the ratio of the canvas. And again, no answer on why exactly is there a orthoLeft etc.
  14. After a night sleep I have found the way to do it. Great script, but very disappointed of the documentation. Can anyone explain what the orthoLeft, orthoRight etc mean? What do they actually do? (I use them to set the orthographic render ratio 16:9 or whatever the canvas size is)
  15. My code: var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);camera.setTarget(new BABYLON.Vector3.Zero());camera.attachControl(canvas, false);camera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;camera.orthoLeft = 5;camera.orthoRight = 5;camera.orthoTop = 5;camera.orthoBottom = 5;The view is too far whatever I do. I must say I have never worked with 3D before, and I have few to no clues on what to do.
  16. Hello, I want to make a orthographic scene that will use rendered images from 3D Studio Max. Can I set the camera in the same way is in 3D Studio Max scene? Image of the settings attached.