Wednesday, August 24, 2011

Realtime Preview of Procedural Textures

I've been thinking about this for over a year already and haven't found the right words to explain it, I do hope now I do.

Since I started with 3D years ago, I haven't been able to find a way to preview in realtime the procedural textures that are mapped to a surface.  To those of you who are not aware, procedural textures are mathematically-computed textures that represents some elements like cloud, marble, wood, etc.  I do not have the super accurate technical description of them, so I guess this Wikipedia article might help you a bit > http://en.wikipedia.org/wiki/Procedural_texture.

I would like to pose this question to the entire CG community, or if I may, to the Blender community as well.  So far the only methods I have found to show the procedurally-generated textures is to bake them into an image and map them consequently to your object's surfaces.  However, if you wanted to make quick and often random changes to your procedural textures, you have to rebake the textures and save them to disk and view them on the viewport, and this will go on and on.  It would be nice to see a feature whereby as you tick some values like scale, rotation, depth, contrast, turbulence, etc. the results are being shown to you in realtime, which would make more sense instead of trying to guess everytime and relying on the small previews alone to visualize how this texture will affect the surface of an object, which could have several contours and weird shapes for example.

Another option I have thought of would be (if the above case is not possible) would be to "fake" it and tell the program to generate images from the procedural textures, something like an on-the-fly  baking of textures in the background then sending them to a fake mapping of some kind thus viewable on the viewport.  Though I am not entirely aware how this could affect processing and memory issues on the system, but I'm confident there would be ways to speed up the process using some kind of emulation techniques or some code hacks (I think I don't know what I'm taking about there for a sec). ;)

I would like to directly ask the developers themselves if there was a way to implement this but I don't have access to some of their contact details.  Hopefully they'll be able to comment on this post and let me know their thoughts on this topic.

On a sidenote, I'm not sure if this, in any way, is related to the Infinite Detail technology that has been recently developed.  Though I would not want to directly relate this to voxel data and what not.  What I would love to see would simply be procedural textures being viewed on the 3d window (be it DirectX, GLSL, OpenGL, etc.).  I know it sounds too simple but might be harder to implement.

This is just my two cents and please let me know if you have any wild or constructive thoughts on this that might clear things up or benefit someone or something in the future.

Also, let me know if this technique was already implemented in some packages like Blender, Maya, 3dsmax, Houdini, Cinema4d, Lightwave, and XSI (I know I missed a lot, pardon me for that).


Happy CGing, everyone! ^_^

-Reyn

2 comments:

dsavi said...

"Infinite Detail" is a scam. It's old technology that's being marketed as new. It doesn't solve any problems or improve anything.

This problem shouldn't be too hard to solve. It's a similar situation to painting on a texture in the UV/Image editor and viewing it in the 3d viewport.

As for contacting developers- Just get on irc at chat.freenode.net on the channel #blendercoders. All the devs hang out there, they're really friendly and helpful. :)

Hart said...

it might even be possible to do this entirely from Python, that automatically cooks procedural's to textures. The advantage is no changes to trunk and people can start using the addon right away. Disadvantage is speed of course.

import noise
dir(noise)
cell, cell_vector, distance_metrics, fractal, hetero_terrain, hybrid_multi_fractal, multi_fractal, noise, random, random_unit_vector, ridget_multi_fractal, seed_set, turbulence, turbulence_vector, voronoi

looks like its all there?