# Iwaa-kun

Members

11

• Rank
Member

## Contact Methods

• Website URL
http://www.narinnchey.fr

• Gender
Not Telling
1. ## How to rotate a BABYLON.Plane?

I think I found something interesting and perfectly working the way I want. To make it work, it was necessary to know 2 methods: BABYLON.Mesh.computeWorldMatrix(force) returns the (right?) Matrix object of the mesh. I tried getPivotMatrix(), getWorldMatrix(), ... but they did not affect the second method. BABYLON.Vector3.TransformCoordinatesToRef(vector3src, matrix, vector3dest) returns the transformed point through the matrix. To find how to do, I had to study the source code of the method BABYLON.VertexData.transform() Anyway, it works for me. http://playground.
2. ## How to rotate a BABYLON.Plane?

There is also a method BABYLON.Plane.transform(transformation) but whatever I do, it has no effect on the reflection. I have a result when I do not have a rotation because it is easy. It's a little more difficult when there are transformations (scale, translation, rotation). So I looked for a way to get the coordinates of points using the method BABYLON.Mesh.getVerticesData("position"). But this method returns the position of the points before the transformation, which is not great /:
3. ## How to rotate a BABYLON.Plane?

Thank you for the help but I think I picked a bad example with a sphere ^^' I made another playground with a box: http://www.babylonjs-playground.com/#1UETWM#3 Here we see the reflection is distorted on the mirrors that are on the sides. ( For me, should have been more like that: http://www.babylonjs-playground.com/#1UETWM#4 but I can be wrong ) Of course, this is because the parameters of BABYLON.Plane(a, b, c, d) are not good. What I really wanted to know was if there was a way to calculate a, b and c. In fact, the user can rotate the mirrors along the axis he wants in my final applicati
4. ## How to rotate a BABYLON.Plane?

Hi, I have meshes that I dynamically adds on a scene. Among these meshes, there are mirrors. I used this tutorial to make reflections and it works very well: https://github.com/BabylonJS/Babylon.js/wiki/Advanced-Texturing But when I start to rotate my mesh, the reflection does not follow the rotation. How to make the Plane follows the rotation of the mesh? I attached an example of what I have: I have several mirrors and 1 with a- 45degree angle (-0.785 radian). There are no differences in the reflections. Here is the same problem on the playground: http://www.babylonjs-playground.com/
5. ## exported model using blender not working

There is the full path of your files but in a Windows system. (eg "C:\Users\FDIAZ\Desktop\REVISTA TENDENCIA\marcador3_samsung\Samsung Galaxy s2\megapixels.png") You have to escape backslash with another backslash (eg "C:\\Users\\FDIAZ\\Desktop\\REVISTA TENDENCIA\\marcador3_samsung\\Samsung Galaxy s2\\megapixels.png") I do not think it will work better because it seems that you test without web server. If you test well with a web server then it is better to use relative paths (I think). Have you changed the file by hand? Then, there is also additional commas. This happened to me when I had sev
6. ## Replace an existing texture using UV Map

Ok, I found the solution which was very very stupid ... Misuse method parameters ... Normal texture and dynamic texture. For a normal texture : // Wrong: mesh.material.diffuseTexture = new BABYLON.Texture("./index.png", scene, true, false);mesh.material.diffuseTexture = new BABYLON.Texture("./index.png", scene);For a dynamic texture // Wrong// mesh.material.diffuseTexture = new BABYLON.DynamicTexture("Skin", 1024, scene);// ---// mesh.material.diffuseTexture.update();mesh.material.diffuseTexture = new BABYLON.DynamicTexture("Skin", 1024, scene, true);// ---mesh.material.diffuseTexture.update(t
7. ## Replace an existing texture using UV Map

How can I do that? Normally, there is no texture and diffuseTexture is undefined. What I wanted to do is to place a dynamic texture on the model and then I draw the character's face dynamically. So I do this: // mesh.material.diffuseTexture is undefined before thatvar skin = new BABYLON.DynamicTexture("Peau", 1024, newScene, true);skin.hasAlpha = true;skin.getContext().fillStyle = '#ff0000';skin.getContext().fillRect(0,0,1024,1024);skin.getContext().drawImage(\$('img.eye')[0],0,0,120,100,190,690,120,100); // There is an HTML Image Element loadedskin.update(false);mesh.material.diffuseTexture
8. ## arm and leg super long....in babylon.js but not in blender

Have you applied scale and rotation on your character? (ctrl+a in object mode)
9. ## Replace an existing texture using UV Map

I can not find the property "subMaterials", it is undefined on "scene.meshes[0].material". I think that's for the MultiMaterial class but all my materials are StandardMaterial.
10. ## Replace an existing texture using UV Map

The values ​​are the same unfortunately /': Here I show you what I get : http://captainngm.free.fr/bjstest/ (offline) The first button recreates the texture but uses the same file (the eye is present under the right armpit). The second button reloads a clone of the initial texture. You can turn on your console log to see objects.
11. ## Replace an existing texture using UV Map

Hi, I'm new to BabylonJS and 3D. I created a scene in Blender with a character. It has a single material, UV Map and texture. It works fine in BabylonJS but when I replace the texture with new BABYLON.Texture or new BABYLON.DynamicTexture (in my case), the new texture does not take into account the UV Map. I think I forgot something, but I don't know where to watch. (Sorry for my English ^^')
×