Jump to content

grire974

Members
  • Content Count

    23
  • Joined

  • Last visited

About grire974

  • Rank
    Member

Recent Profile Visitors

1107 profile views
  1. Final update - I think I had my definition of Quaternion wrong; in fact I was actually looking for axis of rotation and angle of rotation; which is also expressed as 4 numbers and used in things like OpenGL's glRotate function and other libraries such as Open Scene Graph (OSG). The Quaternion class has functions for creating Quaternions from axis+angle; but nothing (as far as I could tell) for creating axis + angle from a quaternion (or from a matrix, or from standard rotation angles). Found some useful math pages though to help do this; The easiest one to follow is based off of a Quaternion
  2. Thank you both! I think @RaananW suggestion will work nicely; great to have some background on it though @dbawel
  3. This might be due to a lack of general understanding - however I would like to know if there is a way (within bablyonjs) to convert a rotation (e.g. rotation.x = a, rotation.y = b, rotation.z = c) to a quaternion (axis of rotation, and an angle for rotation around that axis; e.g. x,y,z,w). According to the babylonjs docs; they seem to be exclusive of each other; e.g. if you set the AbstractMesh.rotate property (quaternion) then the .rotation property is automatically set to the Zero vector & vice versa. Basic rotation around each of the three axes (e.g. .rotation) is easier for most
  4. Many thanks Delta - as always! Seems I was missing the fact that I had to computeWorldMatrix for my parent node and the child meshes as well. For those interested; heres the final PG in all of its tangental glory: http://www.babylonjs-playground.com/#27IOZS#2
  5. Ah right - well that makes sense. I've updated my PG to use minimumWorld; however its still showing the pre-rotation values for me. Any ideas as to what I might be doing wrong? Here's my updated PG: http://www.babylonjs-playground.com/#27IOZS#1
  6. It is correctly positioned now... However I'm positioning the height of the model based off of the min and max Z values returned from the boundingInfo. My intuition was expecting to use the Y values - but eventually guessed that I had to use the Z values as the model had been rotated 90 degrees around the x axis. The final question I guess is - should boundingInfo automatically represent all translations such as position and rotation (haven't tested for positional changes yet) made to a given mesh; or is it the developer's responsibility to keep track of their changes and apply further
  7. Thanks for the pointer.. In trying to demonstrate my problem - I think I figured it out; I was rotating my mesh 90 degrees around the x axis in order to bring it into line; boundingInfo seems to reflect the mesh's original bounds - rather than those after it has been rotated. This is the playground I created: http://www.babylonjs-playground.com/#27IOZS The goal here is to dynamically load a mesh/babylon file (e.g. potentially any mesh from an unknown source); and then position said mesh such that it is tangental to the ground mesh. I ran the for loop again after the rotatio
  8. Hi - Thanks for the reply (sorry to post in the bugs forum if this doesn't appear to be a bug). Still having the same issue; I'd create a sandbox to illustrate this - however I don't see a way to add your own .babylon files to the sandbox..? Any other thoughts? Thanks.
  9. I think I've come across a bug with how SceneLoader handles positioning. Not sure yet whether this is BJS 2.4, or the FBXExporter code that is being used to generate a .babylon file from the FBX that I exported from Blender. When I load this file: https://drive.google.com/open?id=0BzfS-gwTfPBtMFp1bzg5N1BLOWM using BABYLON.SceneLoader.load() I can't get the correct BoundingInfo for the lower equalizer bars (38_EQBars001); it provides the same bounding info as the upper equalizer bars (37_EQBars002). e.g. for (i = 0; i < myScene.meshes.length; i++){ mySc
  10. Was just wondering if there are any plans (or if anyone knows of a port) to extend support to native iOS / Android via common C++ code? E.g. something that has a compatible API & is compatible with the .babylon file type & FBXConverter etc..?
  11. Haha - yeh for sure; have only been working with this SDK for a few months & am enjoying it thoroughly. Its a good point you raise about diffuse colour possible shining through a transparent region of a texture image; might not be one size fits all (as I'm hoping it to be). Although it does seem to work for opaque image types (e.g. even jpegs). Will post back if I have any revelations.
  12. Wow - thanks wingnut; lots of great stuff to consider there. I didn't notice material.ambientTexture or diffuseTexture in the API docs (in fact I'm not sure they're there at all - is that api intended to be private/internal?). I'd used hemispheric in the past before however it creates reflection effects & wasn't exactly what I was looking for; however I'd glimpsed at the ground color stuff before & had forgotten about that. Stupidly - I just assumed that my code above would only work for solid color models (e.g. ones without image textures); however actually in testing it - it w
  13. Hi All, Just to follow up with my final outcome; I did get something kinda working. The tangental plane idea is a good one; however as noted - its a leaky collider (esp if you want small snow flake sized physics particles); I ended up getting something working more reliable by setting overlapping tangental spheres - which wasn't leaky at all. Outer cube colliders also work; but its the whole square peg round hole thing; just make sure the edges of your cubes are overlapping. The main problem for me in the end was performance; my mac pro tower started to chug with more than 100 snow
  14. Hi All, I would like to replicate what I've seen referred to in some other engines as ambient light; definition of which being - a light that evenly distributes across the whole scene; e.g. doesn't cast shadows, and no parts of the scene look darker / lighter than any other part. My main reason for this is that some of my 3D content will need to have light maps baked into the texture images (for other non-babylon related reasons) & I don't want the default babylon lighting to affect this light mapping. I noticed this topic asked a similar question: However the answer
  15. WOW! I think this is the most response I've ever had from a post on any discussion forum EVER (tried to like everyone's posts - but apparently I'm being too positive). Thanks all - @iiceman Interesting you say that; my end goal is to actually build a snow globe for my company's christmas mail out this year; thought I'd start with something simple and then move into a solid particle system; but I probably should have mentioned my end goal rather than comparing it to the trouble board game. @RaananW - I'll give you the solved vote as this gives me a lot to consider + answers my initial questi
×
×
  • Create New...