• Content Count

  • Joined

  • Last visited

Everything posted by legallon

  1. @Pryme8 It would be helpful !
  2. @Wingnut aha I enjoyed this hijacking a lot, allowed me to think of something else than my code for a few minutes ! At least there are people like you to enhance the "deep thinking" level !
  3. @Wingnut I think you're on the right way ! (btw you'd definitely want to see the Peyrou, lovely place ! )
  4. @Wingnut Yes, and I would even say a "3D-aware " country : if I'm not mistaking, the great @Deltakosh himself is French ! What a nice idea ! I'm pretty sure that every French member of this forum would love to have you and your guitar with us in France Coming back to the topic, yes the problem was a mtl file call within the obj file, sneaky peeky stuff ahah hard to find !
  5. Hey @V!nc3r, Thanks for your answer, I didn't know about the raw link ! No worries for the material, @Amarth2Estel helped me for this. Thanks for the help mate !
  6. Hey man , Thanks for the suggestion concerning the material ! I comentend the line 3 and it works. I didn't really think it was about the mtl file because I thought I was forced to import it with my object ( now I can see that I'm not). Thanks again , it helped a lot
  7. Hi everybody ! I'm importing .obj files in my application, and I want to change their color. However, the color seems to be changed when the page is loading, but when it's finally loaded the mesh still has its basic grey material (so while the whole scene is loading we can see the mesh being pink for half a second and then takes back its basic color/texture/material). I've seen something about UV maps etc.. but I checked it in Blender and it is activated when I import into obj. Here's a pg trying to reproduce my problem ( first you will need to help me importing my object into the pg because it doesn't seem to be working, I can't see it on scene); I added a skull.babylon to show that the code I provide is supposed to work : Thanks for your time !
  8. Hi @JohnK, I will try to use what you told me, and see if it suits me better than the other way (which worked quite well). Thanks for your reply !
  9. Ok I see, you create a box on first click, and then the second click modifies the scaling of the box to reach the clicked position, right ? That's very interesting ! I will try to work on that thanks @Arte
  10. Hi everybody , hope you're doing great ! Working on a factory building interface, I'd like to be able to create a wall between 2 points. See this example here : This pg can help you understand my need : I want to click somewhere on my scene (this click would create a line attached to my mouse like in the pg), then move my mouse (the line would follow it like in the pg) and clik again somewhere else to "drop" this line and have a kind of wall ( by playing with the width etc.. of my line or whatever would be attached to the mouse). The problem is I saw that we couldn't change the width of 3D lines, and I don't really know how to "make a wall" by using tubes. Hope you understood what I was trying to say , Thanks for your time !
  11. @Wingnut @Sebavan I've found a simpler and easier way to do it : You take a basic object, let's take a sphere, you animate it between a point A and a point B, and you add to this sphere a particleSystem with direction1/2(0,0,0). Then you make your sphere invisible and you're done ! Just play a little with the life time and the speed of the particles to have a perfect effect, but the result is very clean edit : i did a short example on the pg, not optimized at all but still works :
  12. @Sebavan yeah his answer may (and surely will) help me implement what I wanted to implement, but sure thing is that this would be nice to have this feature available ! We can do without, but it would be way simpler with
  13. That's a lot of stuff to deal with ! Thanks a lot for your time and your precise answers, I will take some time to read this all and to try these functions, I'm pretty sure there's everything here to fulfill all my dreams about particles streams ! (and if not i'll be sure to reply to this topic and to expose you my problems )
  14. Oh yeah this behaviour is near the one I want to implement , I can easily change the lookAt target to redirect the stream toward any mesh I want and act like a receive point. Thanks for the idea ! Other thing now is to handle some collisions and stop the stream when it reaches the target, and after that it would be just as cool as a real emitter/receiver stream. To answer your question, my need is to create a 3D interface, acting like a "digital twin" to represent a real time factory, so i need streams betweens my machines, thus the stream provided in the PG is definitely ok for me
  15. Well I probably would if I knew what it was ^^ ! Can you explain me ?
  16. Hi everyone ! I've seen that a particleSystem as an emitter attribute, where the particles come from. However I didn't see anything about a "receiver" attribute, in order not only to emit particles from one point but to really create a stream of particles between 2 points. I know I can kind of simulate that with the direction of the particles, their speed, their lifetime, etc... but the point here is to have a simple way to change emitters and receivers so we can create stream between 2 objects on demand. Is there a way to do so ? Big thanks !
  17. @Deltakosh it may be a trivial question but how do you remove actions in actionManager.actions ? I tried a loop but I don't know which function I should call to remove the action
  18. " TypeError: Cannot read property 'copyFrom' of undefined at Mesh.TransformNode.computeWorldMatrix (babylon.max.js:13723) at new Mesh.MergeMeshes (babylon.max.js:26038)" it happens when I try to do another merge, the first one is always a success but then it fails. It may come from my way of handling selected meshes ( which is possibly bad)
  19. Oh, so the error isn't linked with the merge of merged. This is the error message raised : "TypeError: Cannot read property 'copyFrom' of undefined at r.i.computeWorldMatrix (babylon.custom.js:8) at new r.MergeMeshes (babylon.custom.js:15)" Actually I've spent nearly an hour trying to create a playground matching my problem and the result I want to have, but I failed ( the fact is that my code is based on a lot of buttons aiming to create meshes, select them and merge them, and without using GUI I don't think that I can have buttons on the PG ). I can join a .rar of my files (just a 500 lines js and few lines css and html), I don't know if you can do something with that, if you don't that's np I will find it by myself . Thanks again for your time test.rar
  20. Hi everyone hope you doing great ! I'm doing a project where I want to create complex objects from more simple or "atomic" ones. For example, I create a vertical rectangle and a horizontal rectangle, I merge them and I have a "L" shape. But when I try to merge my "L" shape with another rectangle to make a "U" for example it doesn't work :/ My question is : is there any way to do what I want to do or am I stuck with only one level of merging ? Thanks a lot for your time
  21. I quite of managed to solve my problem, if you look at my objProperty call in the registerBeforeRender, I call objProperty without "()" . But when I noticed that mistake ( is it a mistake ? because this didn't raise any error) and changed my call to objProperty() all worked fine. The fact that no error was raised didn't help me to solve this but apparently it was juste a syntax error.
  22. No I'm not, sorry for my edit it was misunderstandable ! I definitely need an advice for this
  23. @Deltakosh Hi again, I've done few other things on my project, but now I come back to a similar problem : I import a .babylon object, let's say the "skull.babylon" in a createfunction which allows me to create skulls, and I want to apply the actions that we talked about just above. Yet only the scaling modification works, the white emissive color doesn't,while it works for standard Babylon Meshes as a cube or a sphere. Do we need to use a different action or thing like this when it comes to imported meshes or am I just doing a common stupid mistake ? Here's my code : var mesh; BABYLON.SceneLoader.ImportMesh("", "/usine3d/FromScratch/objets/", "skull.babylon", scene, function (newMeshes) { mesh = newMeshes[0]; scene.registerBeforeRender(objProperty); }); function objProperty(){ var material = new BABYLON.StandardMaterial("material01", scene); mesh.material = material; mesh.actionManager = new BABYLON.ActionManager(scene); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh, "emissiveColor", new BABYLON.Color3(0, 0, 0), 150)); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh, "emissiveColor", new BABYLON.Color3.White(), 150)); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh, "scaling", new BABYLON.Vector3(1, 1, 1), 150)); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh, "scaling", new BABYLON.Vector3(1.1, 1.1, 1.1), 150)); } Thanks for your time, any suggestion would be massively appreciated ! edit : my code doesn't work since I modified and tried different things for the emissiveColor, sorry for that
  24. Thanks a lot , I should've thought about that !
  25. Hi, Old topic but this helped me ! However, is there a way to do this without "disposing" the ground, as it's a mesh too ? Because I have a scene where I can create boxes and spheres thanks to 2 create buttons, and i'd like to press a clear button and have all my meshes deleted except my ground. Thanks for your time