10
$\begingroup$

I was following this tutorial to create procedural rocks: https://www.youtube.com/watch?v=UFsVzDXYOKw

It gives some really nice results (that I admittedly don't fully understand), the only problem is that those results only exist when rendered. The only thing physically there is the sphere that the many, many nodes get applied to. My ultimate goal is to export the rocks to a game engine, so they need to become actual geometry as at least a first step. But it's not clear to me how I'd go about this. Any thoughts?

$\endgroup$

3 Answers 3

9
$\begingroup$

Yes, you can.

But you need to use different modifiers for this.

First, remove subsurf and use multires+displacement:

enter image description here

You need to use multires for simplicity in creating normal map for game engine. With normal map you can create a detailed object without complex geometry, that important for game engines.

enter image description here

For creating normal map, unwrap your object (U), crate material and put image for baking in it, and in render settings select normal type and press bake.

enter image description here

After baking, save resulted image and setup it as normal map. Now you can remove multires, apply displace (for basic shape) and export your model in game engine.

$\endgroup$
6
$\begingroup$

I would like to expand on @Crantisz good answer, if I may.

The issue you are facing is that the tutorial is generating its textures using the Cycles material nodes, but putting the output into the "displacement" slot of the Material Output node using the Microdisplacements feature. As I understand it, this means that the sphere's geometry is actually getting modified at render time--it's not just lighting effects as you would get with a normal map--but there's no obvious way to "capture" what is happening to the geometry.

It seems to me that what the "RockGenerator" node group is outputting from its "Displacment" output is essentially just a bump map. So I suggest baking that bump map to a texture, which you can then use to displace the geometry of a sphere with a subsurf or (as @Crantisz suggests) multires modifier. You can then use a "Displace" modifier on the sphere, using your bump map as the input. Once displaced, you can use a combination of baking a normal map (at high geometry levels) and then bumping the "multires" to a low level and applying the modifier for your base geometry.

In doing the texture baking, I suggest putting the output of the "RockGenerator" group into a "Multiply" node and then into an "Emission" texture. Without the "Multiply," areas of texture get clipped (I multiplied by .2 just as an approximation, maybe a more scientific approach could be used). We need to essentially "normalize" the bump map, but I do not think Cycles material nodes have a normalize function, hence the "Multiply." You could use a color ramp to try to get the closest approximation.

This screenshot shows what the geometry looks like with the baked bump map displacing the geometry of a sphere with a multires modifier:

enter image description here

From this point, you would still need to bake a normal map, and also apply the multires modifier at the desired level of subdivisions.

$\endgroup$
3
$\begingroup$

Sounds like you want actual geometry once your modifiers are set up to your satisfaction.

It's not very obvious how to lock-in those modifiers.

You have to be in Object mode, and choose "Convert to Mesh from Curve/Meta/Surf/Text"

you may want to duplicate the rock, and perform a couple of remesh actions on them. I tried Voxel remesh for mine, and followed that with a quadriflow remesh to get the polygon count to a quarter of where I started, using the Ratio input set to .25

convert to mesh

then remesh

$\endgroup$
1
  • 1
    $\begingroup$ This may not be the answer the OP needs, but it's the answer to the actual question. 🙂 $\endgroup$
    – GSnyder
    Commented Oct 17, 2020 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .