Just wondering if there’s any work/tools in the area of creating textures like
http://www.werkkzeug.com
Would be great when I start on a 3d game that I can create textures on the fly to keep downloads small.
Yes you can.
A texture is just a bunch of bytes.
You must code a few nice algorithms that put values in those bytes.
Heck, you can even make procedural textures in DHTML.
But… don’t waste your time on it, because it’s darn hard.
I used to code procedural textures, a youtube video of the result is here
But sadly I don’t have the source code anymore…
The most important book for me was:
Texturing & Modeling: A Procedural Approach
You can just google the different chapters and you should find a lot of material and source code.
A slick implementation in Java of Perlin Noise (da mother of all procedural textures) is here
[quote]A texture is just a bunch of bytes.
You must code a few nice algorithms that put values in those bytes.
[/quote]
I know what a texture is : just wanting to know if there was a library of the such.
Thanks Hansdampf and DzzD, that’s a start.
I responded like that because you asked whether that could be done in Java, which is kinda obvious.
Yea sorry should of made it more clear.
Maybe I will make my own program like werkkzeug(slimmed down version) but written in Java and then create a library to use the textures.
Though really don’t know much in this area but I’m a quick learner.
I’ll see what I can come up with when I have time. If anyone else finds other useful links that will help, please post here.
DzzD that link you posted worked wonders. I can create and control perlin textures. I’ll be creating a editor, I’ll post it when I ever finish it
Ok finally built something slightly useful.
Can’t do much currently, but does let you play around with colours, size, octave,etc…
I optimised the code much as possible and used look up tables which it’s 100-140% faster then DzzD example iirc. Which should help in the future when creating advance textures.
I have added a few more things like turbulence but haven’t done the gui for them yet.
No webstart yet. That will come soon
Download
One problem I’m having is making it tileable with using the above formulas. Anyone able to help me out there?
you can just flip the generated texture to the right than the first texture an the flipped one to the bottom, no ? but they should be already tilable that’s strange
here we go:
http://www.cs.cmu.edu/~mzucker/code/perlin-noise-math-faq.html
that works with ANY proc. texture which has a “height” value.
For cellular textures you need a “wrapping” space. Hm I hope you understood me.
I tried doing what was written on the site, but still wasn’t tilable.
I’m meant replace this code with this in sNoise right?
[quote]you can just flip the generated texture to the right than the first texture an the flipped one to the bottom, no ? but they should be already tilable that’s strange
[/quote]
I was thinking something like this but I don’t think it would look as great.
It can look tilable when zoomed out, but horrible zoomed in as you can see in my program.
I’m not really interrested by Procedural Texture by them self but… It make me want to try to make an editor ;D
So there is a try out (source code).
Basicly, it work like in 3D Studio Max ( “+” button to add a “filter”, “>>” to go the “filter” ) and i add a tree (click on filter to go to it)
[quote]I’m meant replace this code with this in sNoise right?
[/quote]
I hadn’t enought time to look to the tile problem yet, I will do that soon. one hyper-logical point is that if texture is not tilable it is because one of the function is not, so just have to found wich one.
Ok thanks because my math is a little rusty. :-
Chan looking good. That’s something I’m planning too. I’m going to make mine a really good editor, but haven’t got the time atm. My first step to my 3d game I’m designing
I manage to create “seamless perlin noise”. The problem come from the noise(x,y) method. For each octave pass, the noise method must be “titleable”.
I have update the jnlp and the source code, if you want to see how i do it (net/bonbonchan/bptest/filter/filter2d/JPerlin)
cool, that’s a nice result
Nice work there bonbon, I’ll sure check out your how you did it tilable.
Looks good, BonBon-Chan!
What about extracting a self contained class from it (something like ‘TiledPerlin’ without the GUI stuff, without the net.bonbonchan.** dependencies, just a class generating an array of doubles with 2d perlin noise) and adding it to shared code?
I bet it would be very useful for many (me included).