1
$\begingroup$

I'm trying to export the noise texture I made for this galaxy. https://drive.google.com/file/d/1iLrW776ea-qHJ_Xg00ODR9SPsSf51HBt/view?usp=sharing

I need it so I can do something similar to this as I can't export the actual volume, so I'll recreate the volume in UE4, but I would really like to use the noise texture, but Blender isn't built well enough to do such from my knowledge as any attempt at doing so fails and bakes a black image.

$\endgroup$

1 Answer 1

2
$\begingroup$

From your file:

  1. You can't bake a 4D texture meaningfully. Assign your object to the "galaxy" material instead of the "galaxy.001" material. I'm assuming this is what you meant, since you mentioned elsewhere that this was a 2D texture.

  2. Plug the color output of the noise texture into an emission node, and plug the output of that emission node into your surface material output. Unplug your volume from the output.

enter image description here

  1. Enter edit mode on your volumetric cube. Select the topmost face, then ctrl i to select inverse, and x->faces to delete faces.

enter image description here

  1. Select all (four) vertices, u->reset to reset the UV map to a square.

enter image description here

  1. On your "galaxy" material, select the "bake" image texture node to designate it as the bake target. On properties/render, set bake to "emit". Click the bake button. Let it run.

enter image description here

This was baked at only 1024^2, with 1 sample, to save me time.

  1. From the image editor "Image" menu, save the image as something.

If you're using this image elsewhere, then you may have to rescale. For example, if you try to use this from object coords on a 24x24x2 cube, you'll need to remap your object coords from -12,12 to 0,1. You'll need to do that in whatever engine you are rendering the material.

$\endgroup$
4
  • $\begingroup$ This is great, thanks! Just wondering if there is any way to do this at the last color ramp at the end of the comment? Or is it not possible because of the spherical gradient textures? $\endgroup$
    – Xasthur
    Jan 4, 2022 at 5:33
  • $\begingroup$ No, the output of the sphere gradient, and anything that follows from it, is 3D. $\endgroup$
    – Nathan
    Jan 4, 2022 at 5:58
  • $\begingroup$ "You can't bake a 4D texture meaningfully" - you can bake a series of 2D images to represent a 3D image, which is often called a movie. Nothing stops you from rendering more images to represent a 4D image (rows would represent one additional dimension, and columns another). For a 1024x1024x1024x1024 resolution with such noise that's only ~1 pebibyte :). 256x256x256x256 is a more bearable 5 GB. But to sample in multiple spots you probably need it as a single image... With custom interpolation... $\endgroup$ Jan 4, 2022 at 17:08
  • 1
    $\begingroup$ @MarkusvonBroady Yes, I suppose so. And here, galaxy's 4D texture has a constant W, so we only care about a single slice of the 4D image, and so it's really just 3D. But even 3D, at the 4096^2 resolution Xasthur wants, isn't going to fit on anyone's video card, at 132 GB for 3x8 bit channels. $\endgroup$
    – Nathan
    Jan 4, 2022 at 17:49

You must log in to answer this question.

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