Procedural texture generator (concept)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Procedural texture generator (concept)

Post by TechnoCat »

RPG wrote:
Taehl wrote:Faster than .werkkzeug?! That's a tall order...
Much, much faster. .werkkzeug is a good assembly code. I wrote messy glsl code, but my video card about 20 times faster than my CPU. I use shaders to generate random noise and it is fast as hell. I dont think that .werkkzeug uses shaders to generate textures (it is quite slow on my Pentium IV) while my GPU renders 25 perlin noise textures in one second, over 120 cellular noise textures in one second, 1000 white noise textures, 10-20 gaussian blur filters.

Note, how long .frabrauch demos are loading due to texture generation.

When I can demonstrate better texture editor, you can compare .werkkzeug and my method. Of course, my program targeted on modern GPU's, but my GeForce 6600 works very well. It can easily generate 4096x4096 textures with supersampling (not too fast, but try to generate 4096x4069 texture in .werkkzeug or Genetica. .werkkzeug crashes, and Genetica uses 3-5 Gb RAM!) .
I have no doubt in my mind that performing noise generation in a massively parallel fashion will yield much faster results. This is under the assumption the pixels can independently calculate themselves.
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Procedural texture generator (concept)

Post by RPG »

Procedural generation — easy task for parallel execution on GPU. Non-parallel tasks I compute on CPU. Of course there is much work about improving quality of generators, maybe I have to use 32 bit per channel instead of 8 bit per channel — but LOVE doesn’t give me choice.
I think luajit with ffi may help: calling some OpenGL functions directly from lua. I started to develop engine, that uses power of luajit. Main advantage — using C calls inside lua program (for example, creating framebuffer with 32bit per channel) and possibility to load and use C libraries directly from lua.

I love lua because I can easily develop node editor using lQuery and lQuery UI in few lines of code.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Procedural texture generator (concept)

Post by Taehl »

That all sounds great. I wish you luck with it. I would be very, very happy if you ended up making a Love tool with which I could replace Genetica.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Procedural texture generator (concept)

Post by kikito »

Taehl wrote:Genetica.
And what is that?
When I write def I mean function.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Procedural texture generator (concept)

Post by Taehl »

kikito wrote:
Taehl wrote:Genetica.
And what is that?
Taehl wrote:Oooh, I like it. Have you ever used Genetica? That could be a source of inspiration for you. It's a damn good procedural texture program.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Procedural texture generator (concept)

Post by RPG »

Taehl wrote:That all sounds great. I wish you luck with it. I would be very, very happy if you ended up making a Love tool with which I could replace Genetica.
I don't promise. Genetica is a commercial program, that costs many $$$. My project has no budget and has no team of programmers:)

I added two new filters: lighting and normal map generator.

This normal map is generating in real-time from source image (660 FPS, filter works less than 2 milliseconds!):
Image

Lighting:
Image
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests