Seconded here! Great work and I could really do with that noise generator without the extra dependencies
Kev
Seconded here! Great work and I could really do with that noise generator without the extra dependencies
Kev
I was going to do that, but If bonbon want’s to keep doing her project and have a library that can be used in another program then there isn’t much point for me to work on mine.
Are you going to keep working on yours bonbon?
It would save me a lot of time to start on my new game if you did.
Though no reason why I couldn’t help you on yours.
This also looks intresting: http://www.codeproject.com/KB/graphics/quilting.aspx. It’s C#, but should be portable. And could someone PLEASE implement appearance-space texture synthesis: http://research.microsoft.com/projects/AppTexSyn/ 8)
interesting, but almost everything I’ve read from Hugues Hoppe was patented :persecutioncomplex:
There is my planing ;D :
I don’t known if I will go to the end but I want at least to do all the skeleton for the lib/editor. I each step I will give the source code so if for some reason I don’t continue, someone else will be able to.
Ok great then I’ll stop working on mine then.
The loading and saving is what I need. I’m thinking in making all my textures in it so I can send the data on the fly then the client will create a image out of it.
Not sure if this will help but here’s what I did for turbulence formula.
public static float turbulence(final float x,final float y,final float persistence,final int octave, final boolean smooth)
{
if(octave <1){
return 0;
}
float result = Math.abs(Noise.iNoise(x,y, smooth));
float amplitude=1;
int frequence=1;
for(int n=1;n<octave;n++)
{
frequence<<=1;
amplitude*=persistence;
result+=Math.abs(Noise.iNoise(x*frequence,y*frequence, smooth))*amplitude;
}
return result;
}
The smooth boolean just switches the use of lInterpoleLin to lInterpoleCos.
To speed up many areas I used look up tables like so:
if(setX >= 0 && setY >= 0 && setX < Noise.arraySize && setY < Noise.arraySize){
if(Noise.noiseValues[setX][setY] != 0.0){
return Noise.noiseValues[setX][setY];
}
}
//<code>
if(setX > 0 && setY > 0 && setX < Noise.arraySize && setY < Noise.arraySize){
Noise.noiseValues[setX][setY] = value;
}
Update : Save & Load (it was more dificult than expected :persecutioncomplex:… I should sleep more :P)
There is an example of file
For Perlin and it variation, I should study it a little more… there is something fishy ???
I have another problem : When you draw a color with alpha on another color, the code is :
color = color_origine * (1-alpha_dest) + color_dest * alpha_dest
But when you draw a color with alpha on another color WITH ALPHA ?
Not sure if you have notice but the apply button seems hide sometimes which you need to make the window larger to see it.
How do you remove filters or you haven’t got that option yet?
Great that you got the saving and loading working. Was it still hard with serializable or you did the saving manually?
Update : Version Alpha 0.2 out
Editor (Editor source) Lib (Lib source)
To use, the lib :
Note : color can be change on the fly. TextureLibrary.getColors() return an ArrayList of used color
Problem&Solution :
1) How to mix 2 colors with alpha :
With a simple calculation, i got :
New alpha : a = a1+a2-a1a2
New color : c = (c1a1*(1-a2)+c2*a2) / a
OK !
2) Problem with perlin noise :
What is the difference between :
c(x,y) = sum( iNoise(x,y,octave) * frequence^octave )
and
c(x,y) = sum( Abs(iNoise(x,y,octave))* frequence^octave )
?
Since my random number are [0,1], there is no difference. Even so, if i use [-0.5,0.5] number, the result will be the same with a shift of 0.5. Did I misunderstand something ?
What’s next ?
All people interrested in this project should play around with the editor/lib :
The editor is looking great, though I’m not great at creating tiles it seems hehe.
Can anyone create some good looking wood/grass textures?
I will surely use your library in my game once I’m to that stage.
[quote]What is the difference between :
c(x,y) = sum( iNoise(x,y,octave) * frequence^octave )
and
c(x,y) = sum( Abs(iNoise(x,y,octave))* frequence^octave )
?
[/quote]
My editor was using the random number between -1 to 1, but yours should be fine if you did -.5 to .5, it should still show the same turbulence effect.
Seems you apply button is still missing sometimes and need to make the window large to see it.
Just a few ideas:
Able to preview the texture, to see what it looks like tiled.
Able to create shapes, so we can do brick walls.
“New” in file menu.
A texture size for x/y just like in mine. So can add more detail, because currently making the image size large it gets blurry.
Update :
It is a quick implementation of the Voronoi from the mathematical definition (I don’t have time to search better algorithme right now)
Great. The only problem I’m having now is getting people to help out to create textures, that say the program is to hard. Wondering if you could add words to the buttons instead of just symbols, or add tool tips?
Maybe even a back button would help.
Or even include an example inside the program that people can load up and learn.
If I use a SVG file would it keep the file size still small? I don’t know much about the file type.
Ok, I will try to work out the editor now then (first I have to create icon, I think)
For SVG file, it is an XML format. It don’t keep this format since there is a lot of information that I don’t need. I store it in a binary format to reduce size.
Hoo, I didn’t answer one question :P. For the saving process, I use a custom binary format (no serialization). So if someone want to do another library/editor or want to port the lib in another language, he will have no problem to do so.
Ah I see, good work. I just want to have small files because the server will be sending this data. Do you compress the files too?
Update : version 0.22
To load compressed file with the library, just do a :
library.load( new GZIPInputStream(new FileInputStream(f)) );
Working much better now.
I think there might need to be a easier way to delete to a single item on a list.
Also on the mix options the apply button is really small.
I think you should show this off if you haven’t already, because many people will find this program handy. Like make a website for it.
This stuff is so cool to play with. I’m finding the editor a little hard work to use though.
Kev
I’ve recently tried MaPZone: it’s free and it can make commercial quality textures (well, if you know how at least, there’s a learning curve).
There is the little update of the week.
Update :
It try to make a wood texture too :
In the brick filter, I use a custom component for parameter. Feedback on it is apprecied
It seems that most people have difficulties to use the editor. But it is difficult to me to know where are those difficulties.
Can you explain where are your problems, what you fill unintuitive, … ?