smatt

Members
  • Content Count

    30
  • Joined

  • Last visited

About smatt

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Germany
  • Interests
    Tech

Contact Methods

  • Twitter
    @simon_matt_

Recent Profile Visitors

1022 profile views
  1. Add a "new" before BABYLON.Vector3 Edit: working playground http://babylonjs-playground.com/#2GYHHR
  2. @JohnK this guide is REALLY GOOD! It has to be available in the official doc! @Wingnut that was just an idea, it may or may not work. @dbawel you are right with the vertex colors! You said "This might provide..." and: Yes, the colors are terrible in my case. Each vertex has it's own color and on the sides is a color gradient. The only way to achieve a good looking low poly environment with vertex-specific colors is by duplicating them for each side (read more in @JohnK's guide)
  3. It looks as if they are using a material per mesh which is easier than per-side color... Do you maybe have links about custom color per side? What about these "Multi-Materials"? Are they useful in this context?
  4. That looks really great If I see this correctly, I have to procedural generate a SVG with a lot of small triangles with different colors, export it as a PNG / JPG and apply the material... All in JavaScript at runtime... Maybe there is a easier solution
  5. Thanks guys I have now working code which provides me an acceptable result using the following code: // light let lightHemi01 = new BABYLON.HemisphericLight("hemi01", new BABYLON.Vector3(0, 1, -1), scene); lightHemi01.intensity = 0.15; let lightDir01 = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(1, -1, -2), scene); lightDir01.position = new BABYLON.Vector3(-300, 300, 600); // material let groundMaterial = new BABYLON.StandardMaterial("groundMat", scene); groundMaterial.diffuseColor = new BABYLON.Color3(0.431, 0.922, 0.514); groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0); groundMesh.material = groundMaterial; groundMesh.convertToFlatShadedMesh(); This is really helpful: http://www.pixelcodr.com/tutos/trees/trees.html Maybe I can achieve the dynamic color generation later, it's good right now
  6. @RaananW thanks for your advice. I created this PR https://github.com/BabylonJS/Samples/pull/11 and it already got merged
  7. Maybe my question is suitable in this topic: How can I contribute? I'm currently a beginner at Babylon.JS (~2 months) and I would like to contribute to the project. As there are no issues on GitHub (for whatever reason I can't find them) these 4 PR look pretty detailed and require deep knowledge. Is there anything a beginner can contribute to a professional project like this? (Maybe I should buy the book from @Temechon )
  8. Hi @Wingnut, thank you for you answer! Oh... it's a side? Okay The color gradient between these vertices across the sides looks nice... just not in my case. I'm trying to generate a simple ground like this image I found on Google Images. And every side should have it's own color. With these gradient is looks kind of blurred or out of focus (like games in the early 2000s). It shouldn't be a problem to write this every-side-has-it's-own-vertices-generator. When I'm back from Berlin I'm going to do this Yeah, I've seen these options.faceColors in the MeshBuilder! That's incredible! Maybe someday I can understand what's going on here and use it in my generator. Any advice is valuable and useful in this topic... Please share your ideas, helpful doc pages or playground samples Thanks, Simon --- Off-Topic @Wingnut --- My picture is just a simple example of "Light painting" taken with a DSLR, aperture as small as possible, a long exposure time (~5-10s) and a flashlight moving in circles. Maybe this can help you get started. In my case I didn't use a flash at the camera position.
  9. Hello, I was reading this post from @Wingnut and I'm surprised how easy it is to generate a mesh. I've enabled the colors in this playground: http://www.babylonjs-playground.com/#1UHFAP#60 This colors are per vertex and there is a color gradient across the face. Is it possible to set the face colors instead the per-vertex colors? Or is there a work around to achieve the same goal? Thank you very much for your time, Simon
  10. For those who get here because they are having problems with different camera speeds on low-end devices: BABYLON.FreeCamera.prototype._computeLocalCameraSpeed = function() { return this.speed * scene.getAnimationRatio(); };
  11. @Deltakosh this post is two years later extremely helpful! This should be mentioned in the documentation! Maybe here: https://doc.babylonjs.com/tutorials/Cameras
  12. Hi @RaananW, thanks for your quick answer it helped me understand my own problem much better. Some quick questions: 1. Your playground example doesn't collide with the crate in there. I can move through it. Why? How can we prevent this? EDIT: Why is the collision with the ground working and not with the other box? Shouldn't be it the same? 2.1. Camera-Box-Impostor? Is this like camera.parent = box ? How can I link these two examples. Currently I have no Idea how to connect camera and mesh together in the correct way. 2.2. Is it possible to get this directions directly from Babylon.JS or do I have to calculate them manually? 3. I'll have to try this one! 4. I'm should have done this much earlier 5. I think about this solution over night and this can be our go-to-solution! I want to push around objects as a player and throw objects in a physically way. BUT(!) the most important thing and the beginning of my physic-testings was the reason that the player should walk on slopes / stairs in a nice way. Thank you so much for your help, this is giving me great progress on the physics in my game! One last question: You give the Oimo plugin a "100" as an parameter. scene.enablePhysics(new BABYLON.Vector3(0, -10, 0), new BABYLON.OimoJSPlugin(100)); The file on GitHub ( https://github.com/BabylonJS/Babylon.js/blob/eb47e20935c48ffae139ef69a46f7034c2da7d7b/src/Physics/Plugins/babylon.oimoJSPlugin.js ) takes a parameter "iterations". What is the use of it and how does it influence my game?
  13. First of all @Wingnut: Thank you so much for your time effort and your explanation. You asked if I'm in a hurry: Yes and no. I'm currently really pissed of by the physics and the LACK OF A SINGLE TUTORIAL explaining a first person camera movement with Physics. There are excellent tutorials from @Deltakosh and @davrous about Cannon.JS and and Oimo.JS But there is not a single one where the camera is physically effected in any way than the "default" Babylon.JS Physics. I've worked with your playground (Download as a zip) in my local testing environment for about a hour and still doing no progress on physics. These OIMO Vec3 are a bit strange for me too Your playground is a good step forward to my goal but I can't achieve my goal. As you said I should first understand physics 100% and then move on to camera physics. But at the moment I have so many ideas. There is just one obstacle between the ideas and the implementations of them. As you can see in my twitter posts I'm doing good progress. I've worked the past 3 days on implementing the physics engine and I'm now so frustrated because everything is working perfectly and there no errors. Just the camera isn't working. I'm seeking for a simple solution so I can get back to work again and do real progress instead of googling my way through Three.JS examples where everything works as it should. The current progress is so large for me that I don't want to go with Three.JS... Does someone have a simple and straight forward solution or even a working example using Oimo.JS?
  14. @Deltakosh @davrous @Temechon @RaananW I absolutely love the Babylon.JS engine in combination with Oimo.JS physics and I'm currently getting a lot done for my first person shooter. I'd like to make my player react to the environment in a more realistic and physically correct way. The problem is: I can't get the camera (the player) to work properly. I've created this playground demo http://playground.babylonjs.com/#NVWUF#13 and it should be only some lines of code that need to be changed. The playground demo I've tried to create should simply rotate and translate / move the camera including it's box around the scene. Recently I helped @Demian solving his First-Person-Camera rotation and pointer locking in this post: Maybe it's worth a look, because there is a pretty simple implementation of rotation (5 lines of code). Here is the latest screenshot of this FPS testing other objects I hope you can help me in any imaginable way, because I'm stuck in the physics and can't progress on my project. Thanks for every answer, Simon.
  15. @RaananW Thanks for you help I'm currently trying to get it to work: http://playground.babylonjs.com/#NVWUF#13 But it isn't working, could someone help me implementing this physically based movement in first person view?