Updatable meshes

LuxBellumLuxBellum Posts: 8Member

I dont know if this is already solved, but still dont know which words to use to search this, so i will try to explain this:

1.- I work 3D modeling better in blender, so I export my collada files and import on Godot.
2.- Multiple meshes are set, example, a cone.
3.- I added colliders to "Cone" but need to re-edit "Cone" in blender... for example.. now it is house shaped
4.- Need to re-add the colliders, but it is too much work because one thousand cones were transformed into "Houses" (Lets supose i have a large group of 3D editors updating my blender file)
5.- Seems like all these "Cones" were set by Godot as "Cone 1", "Cone 2", "Cone 3" so I will not change this names to "House 1", "House 2", "House 3" because it is too much work for a thousand houses. So I need Godot to automatically detect changes into "Cone 1" compared to "Cone 1" after I re import the collada file.

Seems like a very complex task for godot, is there any way that i just tell Godot "Delete the full scene, re import the full scene form scratch, make all meshes collidable" So i can update the map constantly after fixing a thousand geometries?

Best Answers

  • TwistedTwiglegTwistedTwigleg Posts: 1,298
    Accepted Answer

    You can have your .dae file import each object as a sub-scene, and then you can instance that sub-scene, add your collision shape and/or any other nodes you need. Then whenever it re-imports the .dae file, all of your the data in the sub-scene (generally meshes, though you can also define collision shapes in Blender by using tags, like -col, if I remember correctly) will be updated without you having to change anything. I'd look at the importing scenes page in the documentation for more information on the import process and the tags you can use.

  • sdfgeoffsdfgeoff Posts: 9
    edited April 2018 Accepted Answer

    Having scenes is free, so you can have as many as you like. I tend to just import the meshes from blender, and so end up with a pipeline that looks like:

    • model.blend
    • model.escn (blender-godot-exporter, this could also be model.dae)
    • model.tscn (inherited from the escn to fix materials, add colliders etc.)

    Then I link everything against the model.tscn file. This makes it very easy to change things later.

    If you do need to change a whole bunch of files, you can leverage text manipulation tools. Running a find-replace through the godot project directory can save you hours of clicking. (eg In linux use "sed"). With this you can just replace all occurances of old_model.tscn with new_model.tscn and next time you open godot, voila, it's all fixed.

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 1,298Admin
    Accepted Answer

    You can have your .dae file import each object as a sub-scene, and then you can instance that sub-scene, add your collision shape and/or any other nodes you need. Then whenever it re-imports the .dae file, all of your the data in the sub-scene (generally meshes, though you can also define collision shapes in Blender by using tags, like -col, if I remember correctly) will be updated without you having to change anything. I'd look at the importing scenes page in the documentation for more information on the import process and the tags you can use.

  • sdfgeoffsdfgeoff Posts: 9Member
    edited April 2018 Accepted Answer

    Having scenes is free, so you can have as many as you like. I tend to just import the meshes from blender, and so end up with a pipeline that looks like:

    • model.blend
    • model.escn (blender-godot-exporter, this could also be model.dae)
    • model.tscn (inherited from the escn to fix materials, add colliders etc.)

    Then I link everything against the model.tscn file. This makes it very easy to change things later.

    If you do need to change a whole bunch of files, you can leverage text manipulation tools. Running a find-replace through the godot project directory can save you hours of clicking. (eg In linux use "sed"). With this you can just replace all occurances of old_model.tscn with new_model.tscn and next time you open godot, voila, it's all fixed.

  • LuxBellumLuxBellum Posts: 8Member

    Thank you both a lot, ive got to now research for "Blender tagging" which ive found nothing and "pipelines in godot" because i dont quite understand them.

  • sdfgeoffsdfgeoff Posts: 9Member

    Docs for the blender -> godot pipeline using the blender-godot exporter are arriving soon..... Ideally by the end of the week. See the PR here:
    https://github.com/godotengine/godot-docs/pull/1501

    Or if you're in a hurry, this wiki here:
    https://github.com/simedis/godot-blender-exporter/wiki

    Using the godot-blender-exporter means you don't need to do naming tricks to get the collada exporter to do physics information.

  • LuxBellumLuxBellum Posts: 8Member

    Mmm ok trying to understand as im quite new to this, I will read both articles and have a time to digest it on my brain I appreciate so much your help

  • MagicLordMagicLord Posts: 578Unconfirmed
    edited June 2018

    @LuxBellum said:
    Mmm ok trying to understand as im quite new to this, I will read both articles and have a time to digest it on my brain I appreciate so much your help

    *
    In Blender all shapes beeing collision must have "-col" at the end of their name in Blender scene tree view

    *
    In this example there is regular meshes object1 and object2 , while shapes named obj1-col, obj2-col are collision.
    *

    Godot automatically import all objects with "-col" as collision shapes and others as regular meshes.

  • LuxBellumLuxBellum Posts: 8Member

    Wow thank you very much buddy

  • LuxBellumLuxBellum Posts: 8Member

    Ready, after many months of work which i havent been able to even start the godot, finally ive had time and opened godot, did my first col tags in blender as i wish in my project, exported the collada and imported it to godot, now im going to research how will my object will behave as a flying jet and colide with those supposed collision objects. Godot havent show me the coliders in yellow as it shown to you but on the scene window objects are identically presented as they appear to yours. Thank you

Sign In or Register to comment.