Dad72

Members
  • Content count

    4,113
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Dad72

  1. Dad72

    Merge mesh and multimaterial

    When I test with two different objects, I have the same problem, it is the first sub-material that is taken into account on all the merge objects. This only works if the object has only one texture, but not several sub-material. Thank you Trevor
  2. Dad72

    Merge mesh and multimaterial

    I found run bug when we merge two objects that are a multimaterial. The object is well merged. Once I serialize it to record it and reload my scene. Some of the textures are missing. On the first image, these are my two objects that I want to merge. There is a metal ring around. But once merge, and serialize the object merge, the metal has disappeared.
  3. Dad72

    Merge mesh and multimaterial

    @trevordev, Hello, I do not know if you saw the PG that you asked me. I have the impression that the subMaterials are erased by mergers. Because each submeshes to create one took into account the first subMaterial, but not the second one. Can be a bug here ? http://playground.babylonjs.com/#1I4KHI#4
  4. Hello, I announce the release of Web Game Editor. More info here: http://www.html5gamedevs.com/topic/39884-web-game-editor-mmorpg/ Link of the site: => http://www.web-game-editor.actifgames.com/ To download the editor you must be registered on the site. Feel free to consult the manual and tutorials videos or ask questions on the forum. You welcome. I hope you like this new version. There is still work to be done, but this version is more accomplished than the previous ones. Be sure that I will make every effort to make this editor as functional as possible with regular updates. Have fun. Some pictures:
  5. @trevordev, Hello, I find a bug on the gizmos when we merge objects. If I am merging two objects and then replacing the pivot in the center of this new merge object. The gizmo is no longer on the pivot of this new objects but anywhere, corresponding to vector3(0,0,0). http://playground.babylonjs.com/#8GY6J8#160 On my project the pivot is totally shift to several units of the object (it depends on the meshes) See the picture :
  6. Dad72

    Cancel a merge object

    yes,: reverse was the word Thank you very much JC, I would do like that.
  7. Hello, Is it possible to cancel the merge of several meshes with mergeMesh ?. Something like cancelMergeMesh ? Are there any solutions to cancel a merger?
  8. Dad72

    Merge mesh and multimaterial

    I made you a PG here. I struggled to load the model, the playground does not want more external file. So I used 'data:' and same thing I could not load the textures remotely. So I took texture from the playground. Before, I could load remote models with http instead of https, but now it will be difficult to make PGs with our own model if it works more. http://playground.babylonjs.com/#1I4KHI#4
  9. Dad72

    Merge mesh and multimaterial

    It's not necessary. It is to offer this possibility to the users of my editor. My editor is for creating MMORPGs. Performance is therefore important for future users. I would like him to be able to merge objects if he wishes, just like the possibilities to create instances of objects, of group (parent/children) and many other useful things. It's not for my own needs, but I'm sure it will be useful to my editor. I will try to make a PG. Thanks for your help.
  10. Dad72

    Merge mesh and multimaterial

    In fact the fusion does not seem to take into account when there are several textures. Or I do not know how to do it. When I merge an object having only one texture is perfect, but with two, it's not right.
  11. Dad72

    Gizmo and pivot of meshes merged

    I add the last two lines that allow to replace the object to merge to its original place and refreshing the BoundingInfo Speckle my object to disappear when I am too close to the object. I can solve, it works on my project. Thanks again let boundingInfo = meshMerged.getBoundingInfo().boundingBox; let middlePivot = new BABYLON.Vector3(boundingInfo.center.x, boundingInfo.center.y, boundingInfo.center.z); meshMerged.setPivotMatrix(BABYLON.Matrix.Translation(-boundingInfo.center.x, -boundingInfo.center.y, -boundingInfo.center.z), false); meshMerged.bakeCurrentTransformIntoVertices(); meshMerged.setPivotMatrix(BABYLON.Matrix.Identity()); meshMerged.position = middlePivot; meshMerged.refreshBoundingInfo();
  12. Dad72

    Gizmo and pivot of meshes merged

    Your solution seems to work well Deltakosh. Thank you. 👍 Yes trevor I am trying to regroup several objects and to be able to move this new object merged. It's for a MMORPG editor: More detail here:
  13. Dad72

    Merge mesh and multimaterial

    @MarianG, No, it did not work. this solution took the iron texture on the first model and texture 2 on the second model. Why does not this merge correctly? Compare with the first image of the barrel : In your PG example, each model has its textures or colors. In my case the barrel each model has 2 textures, but the gold of the fusion I lose the second textures.
  14. Dad72

    Gizmo and pivot of meshes merged

    @trevordev, No, it does not work completely. If I want to select the object later, the gizmo is not well placed, it comes back as before. Moreover, we have to select one of the two rabbits. the object is not considered as a single sectionable with pickResult.pickedMesh. The fact of creating a new BABYLON.Mesh makes me lose all give to serialize the merge object. http://playground.babylonjs.com/#8GY6J8#164 The pivot seems to place correctly on the merge object. Why the gizmo can not be placed on this pivot point? Looks like MergeMesh has a lot of different problems at home? problem of placement of the Gizmo, problem of material which disappears with multiple materials. I'm starting to wonder if I will not remove the merge from my software, because I can not do anything right.
  15. Dad72

    Gizmo and pivot of meshes merged

    Yes it works like this.
  16. Dad72

    Gizmo and pivot of meshes merged

    @Deltakosh, In fact it is not the gizmo that is misplaced, but setPivotPoint which is not updated when objects are merged. On this PG we can see that the gizmo is placed in the same place, whether I use setPivotPoint or not. The point of the center of the object is the good one, it is the small white sphere which serves as indication http://playground.babylonjs.com/#8GY6J8#161
  17. Dad72

    Merge mesh and multimaterial

    Ok, I did not know that we had to use that. Thank you MarianG. I wonder if this can not be automated directly into the engine when the merge?
  18. Dad72

    Create ramp for ground

    Pretty one. It's perfect. That works well. Thank you Raggar
  19. Hi, I am looking to create a ramp system. But I do not succeed in making it. Is what anybody has of idea of how? At the moment, I raise summits which form a mountain and I wish that by choosing vertexes from top of the mountain, then the vertexes of the bottom of the mountain, this will create a ramp. I found a sample video that looks like what I would like to do: How can this be done? Thank you for your help
  20. Dad72

    Web Game Editor (MMORPG)

    Each actor can belong to a class and has a different race. And each actor can have his own script written in Javascript. For the moment this part is not finished, I do not know what to answer you.
  21. Hello, I'm proud to talk about version 2 of my MMORPG editor (FR and ENG) that I renamed to "Web Game Editor" instead of "HeroonEngine" which was a name that looked too much like another existing editor. This version 2 comes with a new, more modern, community-based website. It will be possible to find a manual and video tutorials for getting started, as well as a shop and a forum (FR and ENG). The editor has undergone many improvements, new features and various fixes to make it more stable, more functional and more successful. Some things have been totally rewritten. It will come with a small Integer demo that contains two terrain and plenty of media on offer. I should hopefully release version 2 in the month and make an announcement of its release. For the moment I present it here. I have been working on this editor for years since BabylonJS was born. The editor has been renamed 4 times and rewritten 3 times totally and this name is the last change. Content and features: Here is some screenshot:
  22. Dad72

    Create ramp for ground

    Hi @Gijs, I'm coming back to you because you're the author of this feature that worked well before. But now, there is something different depending on the click and I do not know why. I told myself that you can understand better than me what happens. Try this PG to create multiple ramps in multiple directions. they are not placing correctly. I also noticed that if the terrain is not subdivided enough, it does not create flat ramps anymore. and if on a ground of 500 * 500 subdivisions of 500 are made that ground lose a lot of performance. And the bigger the terrain, the narrower the radius of the ramp (it would take a multiplier ratio, I guess, depending on the size of the terrain) The ideal would be to subdivide only the part of the ramp. You think it's possible? Thank you for your help. http://www.babylonjs-playground.com/#GQ83J#9
  23. Dad72

    Web Game Editor (MMORPG)

    Thanks HeadClot. I should go online in a week. I'll make an announcement soon.
  24. Here's how I do in PHP to create thumbnails with a transparent background by replacing the color of the canvas with transparency. <?php header('Content-Type: image/png'); function saveImg($img, $finalDir, $nameImage) { $_img = str_replace('data:image/png;base64,', '', $img); $_img = str_replace(' ', '+', $_img); $data = base64_decode($_img); $file = "../../".$finalDir.$nameImage.'.png'; // Root image file_put_contents($file, $data); $image = imagecreatefrompng($file); imagealphablending($image, false); for($x = imagesx($image); $x--;) { for($y = imagesy($image); $y--;) { $rgb = imagecolorat($image, $x, $y); $c = imagecolorsforindex($image, $rgb); if($c['red'] == 99 && $c['green'] == 148 && $c['blue'] == 237) { // Cornfloweblue colors (background of canvas) $colorB = imagecolorallocatealpha($image, 0, 0, 0, 127); imagesetpixel($image, $x, $y, $colorB); } } } imagealphablending($image, false); imagesavealpha($image, true); imagepng($image, $file, 1); } saveImg($_POST['imgbase64'], $_POST['root'], $_POST['nameImage']); ?>