Jump to content

amo yeh

  • Content Count

  • Joined

  • Last visited

About amo yeh

  • Rank

Recent Profile Visitors

1075 profile views
  1. I applied and it works as expected, Thanks for the help. a little demo update to simplify the function I was looking for http://www.babylonjs-playground.com/#8PQK71#3
  2. Wow , that's a swift and useful response, thanks @Wingnut, will definitely dig into it and update if I learn something new.
  3. I made a ragdoll experiment http://www.babylonjs-playground.com/#8PQK71 is it possible to add angle limit to make it more realistic? for example to make elbow bend forward only, and upper arm to bend up and down and foward only. also, the PointToPointJoint joint seems works better on cannon.js engine, (more like hip & thigh from my experiment) thanks for the help~
  4. Hi @Deltakosh , from the 3ds max software, the anchor point is at the bottom of the bone, that's why I thought it is at bottom.
  5. well ~ I got it working, what I did was I copied the normal values from exported .babylon item and apply it directly to the generated mesh http://www.babylonjs-playground.com/#0GUH53#1 ( values in new normal array is copied from .babylon exported item)
  6. Is there a way to smooth dynamic created mesh? searched the forum and found something related to VertexData.ComputeNormals, I tried it and not working. here is a demo http://www.babylonjs-playground.com/#0GUH53 the attached picture shows the problem, the outer head is a babylon file (smoothed ), the inner face is dynamically generated. clearly the lighting on the inner face looks flat. I guess it is something like this in unity forum ? http://answers.unity3d.com/questions/630505/how-to-procedurally-generate-smooth-meshes.html thanks for the help
  7. Hi @Deltakosh , here is an example http://www.babylonjs-playground.com/#1ZCM3K#5 If I use the position directly from mesh, such as: you can tell that the BoneAxesViewer shows the bone center is at the center of the mesh box. for my case, the bone center is at the bottom from 3ds max exported bones, so I need to apply TransformCoordinates add an -1 on x axis for it to work.
  8. I seem to made it work by using different approach. http://www.babylonjs-playground.com/#1ZCM3K#3 syncImpostorWithBone() works fine , the mesh is moved to bone position at beginning. to change boneA transformation to match meshA, for rotation, I used: For the position, the center point of the bone in 3ds max is different from the center point generated in Babylon physic objects. (see attached image) I had to move half of the width (as if the bone center point is at the center of the box) to make this work to further test it , I made a chain w
  9. trying to test syncImpostorWithBone() and syncBoneWithImpostor() functions. I know there is a nice example from http://playground.babylonjs.com/#PM5MFS#5 , yet I don't know how exactly it works by using my own model. I created a simple 3d model from 3ds max, with a box and a single bone attached, and applied with skin modifier. (as attached image shown) Also, there is no transformation, scaling or any rotation on the bone and box. Then I tried to run my version , I think I am missing something , the loaded model is not syncing properly. http://www.babylonjs-playground.com/#1ZCM3K
  10. After some testing I was able to come up the solution from lookat function from the babylon source as @Klaas suggested, really appreciated for the help. here is a demo http://www.babylonjs-playground.com/#1II8GP#1 I still don't know what 's the default direction the object is facing without making any rotations. The demo above I used an empty mesh coneHolder to look at the moving box, The calculated yaw value is between 90 ~ -270 , which I thought was odd (I thought it would be -180 ~ 180 or 0 ~ 360) , and pitch value seems to be fine ( -90 ~ 90) any information or c
  11. Thanks @max123 for simple solution, I am also trying to solve it mathematically, might try your method later if mine is not working. I guess the problem can be solved with some clamp and calculation in spherical coordinate space. After watching https://www.youtube.com/watch?v=-ny7psXNdUU , I was able to covert Cartesian to spherical space here is the conversion I came up so far http://www.babylonjs-playground.com/#1II8GP I think it is similar to how ArchRotateCamera moves, will try later for clamping functions, very appreciated for any other suggestions
  12. Trying to do a lookat clamp on both axes, the attached image shows my problem. my goal is to set a mesh to look at some object only if both axes are fall within clamp range. I found similar thread, but only discuss on one axis only. Very appreciated if anyone could provide direction or solution on this problem, thanks~
  13. Thanks for the update, by the way I was able to use bone getAbsolutePosition() and getRotation() function to relocate the box without scaling here is the updated demo http://www.babylonjs-playground.com/#2AMWUJ#8
  14. I tried to use 6 points instead of 4 to create 2 triangles with different scaled uv as mentioned from the image. http://www.babylonjs-playground.com/#1WGFZV#9 It seems to work as expected, a square with two custom uv locations. according to other post replied @RaananW said so I suppose this is the correct way to do it ? Thanks for the help~
  15. Try to generate a custom mesh with material. this is what I did so far ~ http://www.babylonjs-playground.com/#1WGFZV#2 Appreciate if anyone could answer or correct my issue 1. How to create a double sided face ? tried backFaceCulling but don't seem to work. 2. I would like the triangle to display custom uv position, a image explain what I am trying to accomplish. I search on the forum and found out a similar problem here , but still uncertain the correct way to do it. thanks for the help ~ update : I think I posted this on the wrong se
  • Create New...