• Content count

  • Joined

  • Last visited

About arek3D

  • Rank
  • Birthday 01/01/1990

Contact Methods

  • Skype

Profile Information

  • Gender
  • Location
  • Interests
    3D graphic, programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. arek3D

    Babylon objects to .obj file

    Ok, I have found why my string was empty when I console.log my custom mesh. I do not have UV data in my model and in OBJExport.OBJ() method there is a condition which skips such meshes: if (!trunkVerts || !trunkNormals || !trunkUV || !trunkFaces) { continue; }
  2. arek3D

    Babylon objects to .obj file

    Hi, I have a problem with export an .obj file using custom mesh. Should it work with this kind of mesh? I created a geometry which is displayed correctly in canvas and after console.log the list of vertexes is empty. I tested that with a standard cube and it worked correctly. Here is how I am doing it (more or less): this.customMesh = new BABYLON.Mesh("custom", this.scene); //... a lot of "positions.push" var normals = []; var vertexData = new BABYLON.VertexData(); BABYLON.VertexData.ComputeNormals(positions, indices, normals); vertexData.positions = positions; vertexData.indices = indices; vertexData.normals = normals; vertexData.applyToMesh(this.customMesh); var mat = new BABYLON.StandardMaterial("mat", scene); this.customMesh.material = mat; var obj = BABYLON.OBJExport.OBJ([this.customMesh],true,'birdie'); var objlink = BABYLON.Tools.FileAsURL(obj); var mtl = BABYLON.OBJExport.MTL(this.customMesh,true); var mtllink = BABYLON.Tools.FileAsURL(mtl); console.log("obj = ", obj); console.log("objlink = ", objlink); console.log("mtl = ", mtl); console.log("mtllink = ", mtllink);
  3. Yes, I had been using 0.5.0 version and it worked perfectly.
  4. Hi, I have installed a new version of Babylon exporter using this: Max/ I upacked this, unblock, then deleted previous version and paste those dlls. Here is what I get: Exportation started Exporting nodes Exportation cancelled: External component has thrown an exception. Have you had similar issues?
  5. Thank you @Wingnut for your workaround!! I wrote proper UV values for my meshes and it works! In my free time, I will try to fix that issue with the newest exporter, which I had and I will test this strange UV behavior once again. Or maybe I should change 3ds max to 2017 version
  6. I think UV channel is correct in my mesh (this is default plane from 3ds max 2016. So UV must be correct. Moreover, I made a PG which prove that UV is incorrect only if I use DynamicTexture (in this example textures are swapped in the loop every 60 frames) This is quite strange, isn't it?
  7. Thank you very much for your answers! I will check that PG tomorrow. But how to explain the fact that when I put a standard texture, it works well on the same plane? Imho without UV channel it would not be possible. I use 3ds max 2016, with max2babylon exporter, but not the newest version, because it shows errors.
  8. Yes, right, but I do not know how to import my .babylon file on playground Is it possible? Mesh:
  9. Oh, I didn't know about this rabbit This is simple plane from 3ds max with proper mapping. Typical texture works fine on that. But if I use DynamicTexture I get something like this: Could you try with attached file? Thank you for your help! plane2.manifest plane2.babylon
  10. Hello, I have noticed that there is a problem with UV mapping, if I use a dynamicTexture on my mesh, imported from .babylon file. I am sure that my mesh has proper UV mapping, I have checked it by using standard texture. If I use normal texture on this mesh, everything is ok. If I use dynamic texture on BABYLON.Mesh, everything is ok. If I use dynamic texture on my mesh, I have seen something like that: I can't find an example on the playground with a mesh with proper UV mapping, so I have chosen the skull Playground:
  11. I have tested it on this sample scene on my HDD, and it WORKS! So I think it will be similar in my project, I will check it tomorrow ;D I didn't know about this parameter in engine costructor, but I tried to set stencil's flags by myself, and there was not any effects: engine.isStencilEnable = true; engine._isStencilEnable = true ; Anyway, thanks a lot @Deltakosh!!
  12. arek3D

    Action depending on camera zoom

    Hello, I think the simplest way is to make a condition with camera.radius and a flag (to check is it before explosion) in registerBeforeRender() function:
  13. I don't have any idea, how it is possible, but I had implemented this in my project and it didn't work. After many hours I decided to download this scene from Playground, and test it on my HDD, and it didn't work too. It is a big surprise for me :/ @Deltakosh, do you have any idea what is going on here? Chrome doesn't show any errors. The only error message I got, was in Mozilla Firefox console, but I doubt that it is related to this issue. Error: WebGL: Failed to create WebGL context: WebGL creation failed: * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Exhausted GL driver caps. babylon.js:4:12713 BJS - [14:20:55]: Babylon.js engine (v3.0-alpha) launched babylon.js:3:22931 Error: WebGL: texImage2D: Conversion requires pixel reformatting.
  14. This is exactly what I wanted to achieve. You are a God here. No doubt. Thank you sooo much!!
  15. Hello, what do you think, what is the best way to show this green tree only at this gray box. I would like to hide every pixel which is outside the box, even if I will rotate a camera. This plane will be pickable and the user will be able to move it above 3D object, but it is necessary to hide pixel outside. I tried to make a layer/foreground, put there a texture made by RenderTargetTexture of gray box and mask every planes which I will add. But this solution is not good, because in this function I need to have an URL of the image, not a texture: new Layer(name, imgUrl, scene, isBackground, color) Do you have any ideas how to get this effect? Thank you in advance!