YOUR ACCOUNT

Login or Register to post new topics or replies
tacomalo
Posts: 18
Is it possible to generate 3d noise volumes for games?

What I mean is, is it possible for me to modify one of the noise nodes such as to create "slices" of noise that are coherent in the 3rd dimension?

for background, 3d volume textures are an array of 2d textures packed into a single file using the DDS format. 3d textures can be used for a variety of effects, one of which is applying 3d noise to a fog volume to create patchy fog.

I am using FilterForge 4.0.

Thanks.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
in filter forge you can export 3D maps to be used in a 3D software or whatever software that can understand these maps
  Details E-Mail
emme
Posts: 718
Filters: 8
3d perlin noise can be generated with get_perlin_noise(x,y,z,scale) in a LUA script.
  Details E-Mail
tacomalo
Posts: 18
Thanks emme, SpaceRay, how are the 3d textures exported? as individual slices or directly into the DDS format?
  Details E-Mail
tacomalo
Posts: 18
I tried feeding in a value input to the Z axis of the perlin noise, but it seems to stop working. I can output noise slices from 0 to 3, but then numbers higher than 3 output the same result...

I found this thread, seems like the Z parameter doesn't quite do what I was looking for.

https://www.filterforge.com/forum/read.php?TID=12447
  Details E-Mail
emme
Posts: 718
Filters: 8
Testing this out, looks like it's working here. I don't think there is DDS support, so you would have to export the slices individually and combine them somewhere else.

Volumetric Perlin v003.ffxml
  Details E-Mail
tacomalo
Posts: 18
i was able to get something to work, but i had to muck around with my input value to get something that sorta looked ok.

i started with the example noise from the documentation.

ideally i would like to be able to make the noise seamless in the Z direction as well, so my and first last slices lined with each other, but it doesn't sound like the Z axis uses the same scale parameter that X and Y use to determine repeat size... smile:(

Script API - Seamless Perlin.ffxml
  Details E-Mail
emme
Posts: 718
Filters: 8
Yeah, I think you're right about the Z axis. Can't think of any good solution to that. smile:(

Let us know if you figure something out.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
FF doesn't seem like the best tool for it frankly. I would make something similar using AfterEffects. Use the Fractal noise effect, and keyframe the evolve parameter. Under Evolution Options there's a cycle evolution option, that lets you basically loop the fractal noise (you were saying you wanted Z to be seamless as well).

To create seamless textures, you can offset the texture and erase the corners via masking.

You'll probably have to convert the set of images exported from AE, later to DDS format.

Think this does you best.
  Details E-Mail
tacomalo
Posts: 18
AE does indeed give me the tiling in the W axis using the Evolution option, but it doesn't tile in U or V.

Post-processing the frames to eliminate seams is not the end of the world, but becomes tedious with a high number of frames.

Thanks.
  Details E-Mail
emme
Posts: 718
Filters: 8
Also, Houdini has all kinds of periodic 3d noises. Don't know if it supports DDS.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Quote
Post-processing the frames to eliminate seams is not the end of the world, but becomes tedious with a high number of frames.


You can do much of that in AfterEffects anyway.

1. Precomp the noise pattern you made. Make sure the noise layer is inside the comp.
2. Just like how you would erase seams in Photoshop by offsetting, you can offset the comp and do the same.
-- Duplicate the precomp and apply an offset effect to the bottom one. Go ahead and offset the image to your liking.
3. with the duplicated precomp, use a mask and draw the shape of the seams. Feather the mask if necessary and apply it on top of the seams showing in the offset areas.

That should make life a bit easier.
  Details E-Mail
tacomalo
Posts: 18
Thanks for the help, Skybase, I made some progress in After Effects, but ran into issues trying to use a Mask on a Noise Layer that has been offset. I abandoned AE, tiling on the X and Y is more important than tiling on the Z, so i'm gonna stick with Filter Forge, maybe add a feature request to make the noise tile-able on the Z axis.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Quote
but ran into issues trying to use a Mask on a Noise Layer that has been offset. I abandoned AE,


What were the issues?

Maybe I should just make an example file since describing it in words = pretty hard to understand.
  Details E-Mail
tacomalo
Posts: 18
Hey Skybase, I ran into two issues

1. After creating a sequence of 32 frames for the noise to evolve over, I made a copy of the layer.
2. I Offset the Transform of the Noise to 0,0.
3. I applied a Mask to the Layer
3a. This is where the first issue occurs. As soon as I apply the Mask, the Noise changes. I am not sure what changed about the noise, but it is no longer the same the initial Noise. If I change the Mask from Add (the default mode) to None, the Noise returns to the initial state. Of course, when the Mask is set to None, then I don't have a Mask anymore.
4. The second issue I encountered was the Noise Offset to 0,0 would flickered wildly over the 32 frames. The other 3 copies of the noise offset to the other corners did not flicker.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Quote
3. I applied a Mask to the Layer
3a. This is where the first issue occurs. As soon as I apply the Mask, the Noise changes. I am not sure what changed about the noise, but it is no longer the same the initial Noise. If I change the Mask from Add (the default mode) to None, the Noise returns to the initial state. Of course, when the Mask is set to None, then I don't have a Mask anymore.


Precomp the noise layer and then apply the mask on THAT precomp if you're using CS6 and below.
If you're using any CC version of AE, you can apply the mask TO a specific effect layer.

Quote
4. The second issue I encountered was the Noise Offset to 0,0 would flickered wildly over the 32 frames. The other 3 copies of the noise offset to the other corners did not flicker.


I'll investigate a bit more. Will upload example today!
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,712 Registered Users
+18 new in 30 days!

153,537 Posts
+6 new in 7 days!

15,348 Topics
+72 new in year!

Create an Account

Online Users Last minute:

16 unregistered users.