Exporting to Unity?

How would I export my geo nodes scene to Unity?

I stopped to play with geo nodes more, and followed another tut about making a tiny world. How do I get this into unity and defend it from the pending alien invasion?

Is exporting geo nodes different or can I follow an export tut somewhere? Anyone have a resource they can point me to for a step by step? Can this be added to the course @StephenWoods ?

3 Likes

I can’t comment much on geometry nodes specifically, but my understanding is that in general, exporting something like this to a game engine (your world looks awesome btw, nice!) involves applying anything procedural that Blender offers which isn’t available in the game engine. A non-exhaustive list:

  • Modifiers need to be applied
  • Procedural materials (ie more than just changing properties in the Principled BSDF) need to be baked
    • By extension, since geometry nodes are also procedural, you need a way to “apply” these as well. That seems to be “Make Instances Real”

Have a look at this. The solution to the topic is at the bottom, though I feel it’s also worth looking through the whole thing to see some of the ideas that don’t quite work and why:

Good luck with it; if you manage to get it in, I’d love to see the steps you followed, and I’m sure others would as well =)

2 Likes

thanks for the lead! That got me somewhere closer!

I have tried make instances real and even putting a realize instances node before the output and did get the model into unity, and although it doesn’t list the individual models in the outliner before export, and I lose my textures, I can see it in unity, so something is happening.

I think I need to do something more substantial with the clouds because that just exports as an icosphere and hides the whole thing. I had to fly into it to see the rest.

possibly what I need to do to my clouds is why the rest of the planet loses textures. the rest of those instructions I think are just about faking those sprinkles with a bump map, so I don’t think it applies here, but maybe I am misunderstanding it.

2 Likes

Cool!

I’m interpreting this as the clouds basically forming an opaque shell-like atmosphere instead of the patches of half-alpha white in your screenshot. That will definitely have to do with the Principled Volume in your Clouds material; this is beyond what a game engine can simulate without some sort of abstraction (baking).

I’m assuming your other materials are more or less standard colours - an Albedo setting and not much more. What would happen if you set the objects to images of flat colours by setting an Image Texture node directly to the Material Output node of each material? If I’m not mistaken, I think this would emulate the process of baking those materials because it takes the Principled BSDF out of the equation. There’s probably a better way of doing this, but it’s worth a try as a proof of concept. If you’re able to get that working, then it will make that much more sense to look into how the Clouds material can be baked.

Also, what file format are you exporting with? If I do any testing on my end, it’ll help to compare apples to apples =)

2 Likes

Unfortunately I dont have much experience exporting anything other than standard meshes to Unity.
Unity definately doesn’t support GeoNodes natively. I think BH67 has a better answer than I would be able to cobble together.

2 Likes

I actually need to research baking materials. Maybe that’s in one of the other gamedev.tv blender courses I have.

the pine tress are simple, and that color shows up in unity

evrything else has a texture that would need baking.

I was exporting fbx.

1 Like

actually maybe this would help?

there is a comment from 4 months ago that says after 5 years, this is still the best way

2 Likes

Yup, that looks like what you would need.

The one thing I know about baking is that it can get complicated and error-prone, so videos like this one are likely your best bet. If you encounter problems with the baking process itself, I’m sure there are others who will be able to help you much more than I could =)

I’m pretty sure it’s covered somewhere; I would check the Character Creator (Ogre). I’ve seen several topics asking for baking help as well, though I can’t even be certain they’re talking about texture baking.

Also, regarding your file format, it looks like .fbx is indeed the way to go, so that’s good:

1 Like

Privacy & Terms