Sparky

Members
  • Content Count

    22
  • Joined

  • Last visited

About Sparky

  • Rank
    Member

Contact Methods

  • Twitter
    @sparkygreens
  1. Ha, glad you like it Wingnut. I think it will be super-cool, especially in BJS . I'm struggling to find the right techniques and formulas for a diamond grid at the moment. I've found one, but it's in chinese and the google translation is poor. Everyone is too keen on triangles!
  2. For comparison, Andy uses these for a isocahedron: var phi = (1.0 + Math.sqrt(5.0)) / 2.0; var du = 1.0 / Math.sqrt(phi * phi + 1.0); var dv = phi * du; nodes = [ { p: new Vector3(0, +dv, +du), e: [], f: [] }, { p: new Vector3(0, +dv, -du), e: [], f: [] }, { p: new Vector3(0, -dv, +du), e: [], f: [] }, { p: new Vector3(0, -dv, -du), e: [], f: [] }, { p: new Vector3(+du, 0, +dv), e: [], f: [] }, { p: new Vector3(-du, 0, +dv), e: [], f: [] }, { p: new Vector3(+du, 0, -dv), e: [], f: [] }, { p: new Vector3(-du, 0, -dv), e: [], f: [] }, { p: new Vector3(+dv, +du, 0), e: [], f: [] }, { p: new Vector3(+dv, -du, 0), e: [], f: [] }, { p: new Vector3(-dv, +du, 0), e: [], f: [] }, { p: new Vector3(-dv, -du, 0), e: [], f: [] }, ];
  3. Thanks Wingnut, that looks interesting. Same for the link you posted jerome. I'm staying here for the party, I'm just considering pre-drinks at three to help me get my head around it . I'm really not that hot on 3D stuff, but would be happy to contribute if I manage to do something useful! I've found a couple of articles with fancy maths, here's the one that started me on this road: https://experilous.com/1/blog/post/procedural-planet-generation What Andy has done is great, but I'm put off by the hexagons as it's difficult to have varying levels of detail with hex's as one set of hexes don't sit nicely within another, hence looking at the diamond option. So far I'm basking in a maths headache trying to understand the methods Andy has used, particularly slerp() and subdividing a icosahedron on a spherical plane. Although I'm starting to find my way out of that. I'd be interested to understand how the subdivision of a sphere works in BJS at the moment as that might help. (I'll dig out the code later) Also, I don't quite understand the notation used defining the vertices for a shape as per the preparatory json link jerome posted. Am I right in thinking its defining each vertex as an offset from 0,0,0? (Told you I'm a 3d noob!) Thanks again for all your help. P.s wheat thins? (I'm a Brit - never heard of them)
  4. Thanks jerome (and apologies for mistyping your name the first time . They may well exist by the time I need them. For now I'll have a go at three.js to start me off. What I'm ultimately doing after this bit can be done in BJS easily. Is there anything like that planned for future releases yet?
  5. Hi jermone, That's good to know. Assuming BJS gets regular polyhedrons soon, is there anything bakes into BJS at the moment that would allow me to distort them into a sphere or to subdivide it's faces? Or perhaps another approach would be to start with a mesh of 4 diamonds (i.e. a flattened out octahedron, subdivided or otherwise) and bend it round a sphere like you would a texture? Ultimately I need to be able to perform actions on the diamonds separately after/before they are made into s sphere. They will essentially be tiles on a world.
  6. Hi Raanan, Perhaps I didn't explain it very well, I wasn't sure exactly how to phrase it. I want a sphere that's made up of subdivided diamonds, starting with an octahedron. As in this article: http://www.isprs.org/proceedings/XXXVI/4-W6/papers/267-270JianjunBai-A042.pdf I've seen something similar done with three.js but not quite sure of the methods used (the example using three started with an icosahedron and subdivided to triangles). But basically, an octahedron (that will be further subdivided) bent into the shape of a sphere.
  7. ive had a look through the docs and can't find the answer. How would I go about creating an octahedron and projecting it onto sphere? Thanks!
  8. I'm not likely to get involved in the updating of the docs, but they certainly look better! Wish the main site had a menu at the top (read: not at the bottom). I'm on a Mac at work and the dock gets in the way!
  9. Ah ok, are you building something first person then? I'm looking at at RTS, so could end up with a lot of meshes, which from what i've read, can be problematic and cause performance issues, hence the merging. You can get around the manipulation by keeping data and un-merging when needed in order to manipulate, then re-merge. These evens would be reasonably rare for me such as building something, so I wouldn't need it to be super-real-time as you might with say, picking up a cup.
  10. Thanks Red, What I had been looking at (from another forum members suggestion) was generating the map and then sectioning it off into merged meshes. Once I have the merged meshes, I'll save those out so I can just load a section of map (terrain, buildings and any other static elements) as required once visible to the user. If I'm understanding you correctly, your approach is to save out each map square/building/whatever else and load in a regions worth when required, which you'll then merge once it's all client side, is that right? Your approach would certainly be easier to manage across multiple users, but more work for babylon (as you'd be repeatedly merging the meshes. Not sure which is the best way to go.
  11. Cheers red, I'll take a look at the code. Much appreciated!
  12. Thanks Reddozen, That sounds pretty sensible. I'm just not sure what incremental loading is for then if I can't use it for that. But if what you're saying will work, then that's all good for me .
  13. Hi Raanan, Thanks for your message. What I'm looking at is a shared map where users will have incrementally loaded sections, so I wouldn't be looking to trigger the incremental sections in that manner. But as the world is updated, I'll need to save out the updated sections for other users to load in. I will also be looking to save out and load in sections during gameplay while they are in the frustum i.e. if another player updates that section of the map. So from what you're saying, if I understand correctly, is that I should use incremental loading in the first instance (loading sections of map as the player moves around), but importMesh in the second instance (loading in a section of map from the server that has been updated by another player). Does that make sense?
  14. Didn't notice the bit about the GeometryID and the snippet about the incremental format in that thread. I'll have a play with that .
  15. Yes, I've read that one. It links to source code for what looks like a C# project. It doesn't seem to have the spec for the .incremental.babylon files etc, which would be helpful (unless I've missed something). I'm not going to have those incremental files pre-built, so it doesn't look like that will be useful. I could always fight my way thought and refactor the code, but I was hoping that there was another option as I don't have Visual Studio on my home dev machine.