thephox1982

Members
  • Content Count

    26
  • Joined

  • Last visited

About thephox1982

  • Rank
    Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

685 profile views
  1. I was trying to figure out why I was getting a javascript error when I added auto lod to my scene, no matter what mesh I used, even simple sphere like in demo for the simplification auto lod system, the error was: Uncaught TypeError: Cannot read property 'position' of undefinedbabylon.2.2.max.js:29038 Geometry.getVertexBufferbabylon.2.2.max.js:29017 Geometry.getVerticesDatababylon.2.2.max.js:9812 CollisionCoordinatorWorker.SerializeGeometrybabylon.2.2.max.js:9635 CollisionCoordinatorWorker.onGeometryUpdatedbabylon.2.2.max.js:9765 CollisionCoordinatorWorker.onGeometryAddedbabylon.2.2.max.js:13320 Scene.pushGeometrybabylon.2.2.max.js:29145 Geometry.applyToMeshbabylon.2.2.max.js:28934 Geometrybabylon.2.2.max.js:15124 Mesh.setIndicesbabylon.2.2.max.js:32330 QuadraticErrorSimplification.reconstructMeshbabylon.2.2.max.js:32185 (anonymous function) So I went through process of elimination and finally found it had to do with physics and then I found it wasn't the physics engine I was using but the command: scene.workerCollisions = true; As long as that one line is commented out auto lod works fine! This isn't a big upset yet, but I will like to take advantage of the workerCollisions at some point, but for now can just leave it off. To replicate this, simply enable basic collisions in any demo and add workerCollisions and then try the auto lod.
  2. I believe I am after the same thing, I got an mesh I am importing from Blender that has submeshes, it appears that adding the parent mesh to the shadow generator doesn't produce a shadow and that I need to add the subMeshes, .getChildren() method doesn't work as it says there is no children so I am guessing children is not the same as subMeshes, so how do I get the shadow for my character model to show up? This is so annoying!
  3. I haven't dealt with GLSL so I am using Ocean.js which doesn't have refraction sadly, I never did find any water shader that has refraction for Three.js only Babylon.js I found a pre-made shader for.
  4. That's all well and good but the problem was solved and it also has nothing to do with transparent object intersecting a transparent object, it had to do with a transparent object intersecting an opaque object, completely different issue all together!
  5. It's why I find it to be best practice to update documentation as things go along while it's fresh in the mind and allot easy to hash out at least a draft version of a new feature which I could expand on a bit later on because at that point people have something to work with to a degree and then I would spend less time helping people to understand which in the end takes up more time than if I had taken the time once over 10-20 minutes to explain it to many people by making the documentation in the first place! 10-20 minutes now to make basic documentation or to update it when something has changed rather than 10+ minutes per each person I need to respond to on stackoverflow or the issue tracker on GitHub. To me that is just the logical and reasonable thing to do!
  6. So renderer.autosort set to false doesn't work but apparently object.renderDepth did the trick, I didn't see that in the documentation, seems three.js needs help in the documentation department. In case anyone is wondering, I set terrain.renderDepth=1 and water.renderDepth=0 and problem solved!
  7. So I tested it on another machine, it did it there as well, on a side note, things look so much better on a wide screen, lol Also tested in web browsers rather than in node-webkit and it did it both on chrome and firefox which reduces the potential problem being with WebGL it's self or Three.js related issue or bug. I just don't get how something can be fine rotating and seeing no issue except only facing a certain direction, how can it be linked in such a way? That alone tells me it isn't my code and is a bug because the rotation is a simple code only to rotate the character in the scene doing nothing more.
  8. So apparently this happens even with out the character with just terrain and water moving the camera. I have found no solution or anyone having the same issue thus I blame it on this computers internal graphics which has other issues with other games, will try it out on one or two of the other computers here and see if it does it.
  9. Well I don't yet have an exact solution per se, but once I get something constructed I'll try and remember to update here more about how I did it. Also if you are interested you could help out with my MMO or at least look at the code as it develops and take from it, it's open source! :-) See my signature for more information.
  10. I'm sorry but I don't understand what you mean. The way I have my code setup for detecting terrain collision is based from the player character model, it checks in real time the distance between the detected vertices of the terrain mesh Y (vertical axis), if the character is below that it places the character above it, it has no performance impact and it isn't noticeable visually as it does the correction before the new frame is rendered. Also as far as physics is concerned, you could write your own bit like I am using raycasting as from what I've seen is that not one HTML5 based physics engine out there (at least for free) has huge performance issues with convex hull type objects or don't support it at all, so I gave up that route and found I can easily do it with raycasting then expand it to emulate gravity when jumping and falling from high places. If choosing this route do the emulation math in a new thread using a web worker. As a rule of thumb I try to do any complex math and also any repeat math processes in a math thread for performance reasons. Also kinda not related but kinda related, if using Math.PI more than once in your code, make it a global and reuse it as PI doesn't change, so I have code like; var rotation_z = PI * 0.5; Rather than; var rotation_z = Math.PI * 0.5; Do this especially when in a render loop so that PI doesn't need to be calculated each frame!
  11. I made an animated GIF showing it in action, note I didn't include a full rotating view as this alone is a bit over 4MB in size..
  12. I tried turning off autosort using renderer.sortObjects and that removed transparency completely, I moved the plane to load in last but it still lacked transparency. I'd think that it was the sort order but then again it works 99% of the rotation, just that exact axis between -Z and -X (I will get the rotation angle here shortly). It's that which is bothering me, it works almost all the time moving around, etc. but not while facing those specific direction, I could be on a mountain top facing the lake and face the direction the problem occurs and it will still happen only on that bearing.
  13. In a game I am developing there is an odd issue where rotating the player character the water plane looses it's transparent state completely going opaque but only on a specific heading or the same heading facing the opposite direction, it only happens at a very small degree, you turn slightly and it goes back to transparent. How is rotating an object (which happens to be the player in this case) affect transparency only while facing in a specific direction when the object has nothing to do with the plane (except when the player moves the plane moves but it doesn't effect rotation or do anything with the plane while the character isn't moving). Is this a Three.js issue or a WebGL issue or what? I find nothing googling it in various manners even setting object.material.alphaTest doesn't do anything. It doesn't effect the shader for the water mirror, only the object material transparency.
  14. Not sure how much I'll be active but it seems interesting, so I'll send a request!
  15. Not sure about sound effects but as for soundscapes I'd suggest http://www.joshuahardin.com/free_music_soundscapes.php which can be used for commercial last I checked as well as http://teknoaxe.com/Home.php