this post was submitted on 18 Aug 2023
26 points (100.0% liked)

Godot

6005 readers
42 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 2 years ago
MODERATORS
 

(For TL:DR just read the docs)

So you might know Godot has the ability to import blender files directly. (If not, well now you know!) This is nice, but I was trying to make some large levels and I found the workflow less than ideal. The import dialogue is a bit clunky, so it's hard to specify what objects have collision if there's a lot of objects.

Import hints help a lot. Basically, in blender, for each object you want to have collision, you can append -col or -convcol to the end of the object name and Godot will add it automatically!

You can use -colonly or -convcolonly to make the geometry only import as collision. This isn't even limited to geometry - you can add it to empty objects and it will create primitive collision shapes.

-noimp can also be used to simply skip importing an object. I actually found a really cool workflow tip with this: Lets say you have a large level file, and maybe you want to split it up into multiple .blend files for organization or convenience. (For me, it was due to lightmaps. I wanted to separate far detail so I could lower the lightmap resolution.) In Blender, for each file, you can go to File->Link, select the other blend file, and add its main collection containing everything else. Then, add -noimp to that linked collection. Now, you can view the entire level in blender but Godot will keep them all separate on import!

There's a few other hints and I recommend you check out the documentation for all the details.

Hopefully some of you found this useful!

top 7 comments
sorted by: hot top controversial new old
[–] MJBrune@beehaw.org 1 points 1 year ago (1 children)

I've constantly been finding -col and -loop really useful.

I'll be working on level generation for a rogue-like in 3D and I am wondering if I should try to create the entire room in blender or simply create pieces like 3m by 3m walls that snap together to create the rooms in godot... I feel like I could generate more things by keeping it pieces in godot but performance is a concern.

[–] Rodeo@lemmy.ca 1 points 1 year ago (1 children)

Godot has built in CSG that you might use instead of importing primitives from blender.

[–] MJBrune@beehaw.org 1 points 1 year ago

Eh csg isn't for production. It's for level blockout. It's high cost in a few ways and is rather just model it. I might in fact model out an example level first entirely in blender so I know what my generation should aim for.

[–] livingcoder@programming.dev 1 points 1 year ago (1 children)

This is very interesting. Are there similar options for Unity?

[–] julianh@lemm.ee 2 points 1 year ago

Not that I'm aware of, unfortunately.

[–] fleeky@prsm.space 0 points 1 year ago (1 children)

@julianh i am confused , when they mention adding in a linked collection and appending -noimp to the collection ,,, are they saying that all the objects in that collection will be ignored? i was under the impression that import hints only work for object names,, but if they also work for collection names for all children in a collection that would be a huge time saver.

[–] julianh@lemm.ee 1 points 1 year ago

For me -noimp works for the collection but I need to test more to see if all hints work for collections.