When I started my Random Material Generator ( http://blenderartists.org/forum/show...ial-Generator-) ) I knew that no material can look really interesting without some kind of use of textures. The reason is obvious a texture not only adds detail on a material but also brakes its uniformity making it much more interesting and natural. So it was always my intention to implement some kind of texture randomisation inside my material randomisation. However the issue was that RMG grow bigger , more complex and much more powerful I did not want to cram the interface so I decided to implement texture randomisation as a separate tool always from inside GYES.
The big diffirence between RMG and RTG is that the gui in RTG is adaptive to the texture type choosen. That means that GUI changes each time a diffirent type of texture is chosen making sure that only the necessary parameters are displayed keeping the GUI as compact as possible.
The tool is still a WIP but I have finished implementation , for texture types "BLEND", "NOISE", "CLOUDS" ,"DISTORTED_NOISE" and create my own type called "RANDOM" that chooses randomly one of the above 4 texture types and of course it randomises it too.
As in RMG simple mode give you the ability to choose which parameters you want to randomise and percentage mode gives you the ability to choose how much those parameters will be randomised . General percentage is used in case any of the parameter percentage randomisation is 0% , it makes it easy to have the same percentage for any amount of parameters. Percentage means the following : 100% is the full range of available values for the specific parameter, any percentage is divided in half, half going bellow the current value and half going above , so for example 50% of parameter that its minimum value is 0 and its maximum 6 and current value 3 , it will give a random value value in the range of 1.5 to 4.5.
Many things are yet to implemented till this is done, but its no less a released script that should be very useful for you. Bare in mind there is an error each time you change the type of the texture from inside RTG gui, I dont know why this happens but I will speak with blender devs to see if its a blender bug or a mistake from my part. This bug has not crashed my blender or stoped the script from working properly , but caution should be exercised and always save your work before trying this script.
RTG is part of my GYES addon so chances are if you got the latest version of RMG you already have RTG as well. Dont hesitate to ask any questions and here is the link of the download.
https://github.com/kilon/Gyes
Sunday, October 02, 2011
Gyes : RTG (Random Texture Generator)
Thursday, July 21, 2011
GYES -- Random Material Generator (Percentage Randomisation)
Percentage randomisation means that the parameter is randomised inside a range of percentage of the full range of the value. For example a 50% randomisation of the specular intensity means the following :
specular intensity start from 0 and end 1 , 1 being the maximum value , 50% of 1 is 0.5 . If your existing specular intensity value is 0.3 then randomisation will range from 0.05 to 0.55 , which mean it can be any value that exists in this range which is a diffirence of 0.5 or 50% of full range. Of course randomisation takes always the current value as starting point so the next randomisation will use the current randomised value. Randomisation is always 50% of the specific percentage bellow the current value and 50% above . If the percentage exceeed minimum and maximum values of the full range, then it will default to minimum and maximum accordingly.
There is a "help" gui page that offers a summary help for quick reminder of the functionality. "Template" page is empty as templates are yet to be implemented. "Simple" page has the old enable disable checkboxes which I have replaced them as enable / disable switch buttons (enable / disable randomisation for a specific group of parameters ) along with a general percentage that for convenience also exists in percentage page.
Did 3 minor updates, one fixes a nasty bug that did not allow the script to load on startup as addon and another one where for some reason the register_module functions fails in future builds from graphicall,org after the official 2.58a from blender.org . I have replaced it with register_class() for each class i use so it should work now and for every future build.
However both problems were critical to the execution of the script so I had to bump the thread.
After a complaint I changed the "mode" button , to a list box to make it more visible and easier to use , blender developers need to fix the menu button (prop_enum_menu()) to make it more visible.
I also reorganised the file structure. Now everything is located in a folder called "gyes" just copy paste the entire folder to your addon folder and you will be fine. Inside gyes/doc you will find gyes.pdf which is the official Gyes Manual. I no longer support wiki as its difficult to work on both (Wiki and Pdf) at the same time , that means that wiki will no longer be updated with latest features. The reason is no longer called "gyes random material generator" is because I decided instead of creating several scripts that do diffirent things, to unite all of them in one add on script that will make installation and activation alot easier, so that means that gyes will be alot more than just a random material generator in the future. I plan to finish a new script every year.
The download link has not changed, remember you can use the same link as it always has the very latest update and I am constantly uploading new updates everyday that I dont report here as often cause I dont want to bump this thread unnecessarily.
Here is the download link => https://github.com/kilon/Gyes
Here is a screenshot of the new mode button
Simple mode :

Simple Percentage Mode :

Help mode :

!! Important Note !!
Sunday, June 05, 2011
Gyes (Random Material Generator) for Blender 2.5
Monday, August 30, 2010
Vriareon (first Draft)
So enter Vriareon. Basically its an app for transmiting multipoint envelopes to hardware synthesizers. If you did not understand what I just said, well, its normal if you dont use a synthesizer , software or hardware.
Bottom line is that most synths out there dont ever go being simple ADSR , which is a 3 point envelope , mine will go as much as you want.
Basically an envelops is nothing more than a graph that says to a parameter when to increase and when to decrease automatically. In most cases an envelope is made of no more than 4 points (A,D,S,R for Attack, Decay, Sustain, Release) . Attack is triggerd when a note is played, decays is after the attack, sustain when a not is keep pressed down, and release when a note is released. However in software synths like Absynth, Zebra, Alchemy this restriction is droped, and the user can make envlopes using an almost unlimited amount of points, thus creating incredible deep and complex sounds.
Vriareon uses midi protocol, either CC or NRPN to transmit midi data that makes up the envelope.
Currently the app, implements simple functionality. It support, add , move and delete of points, together with zoom in , zoom out and pan.
This is a video showing the app in action.
The app of course is far from finished, but I am in no hurry either. I want to take my time and make this into a very useful and very impressive app. The ultimate goals is to impement more features than multipoint envelops, but for the time being this is the only goal. Gui is still very crude and it may not seem impressive, but most the basic architecture of the app is almost finished. I have to , as a next step, transmit the midi to the the hardware synth. But its the Gui stuff that will take me long cause I want to build a very felxible gui from zero.
I use python and the python library Pygame, for gui and midi, as pygame has included the pyportmidi library which is very easy and efficient into sending and receiving midi signals.
I will keep you posted with monthly updates of my pogress.
Saturday, February 06, 2010
Cython , probably the best programming language in the world.
So I guess you have heard all those people saying that there is no such thing as the best programming language in the world, only the right tool for the job. And its true , each language has its advantages and disadvantages.
But Cython , makes me make an exception to this rule.
Why ?
Well because it combines the best a programming language has to offer leaving all the negatives out.
2. What is Cython ?
So what is Cython ?
Well Cython is Python. It will accept any Python code , even Python 3 , subject to some limitation because it is an ongoing project .
However Cython is more than python. The first thing making Cython different is that it converts python code to C code. This code can be compiled with any C compliant compiler and produce either an executable or dynamic linked library (Known as DLL on windows) .
ok so whats the big deal ?
Well this alone offers double the speed for python which is fine but not very impressive if you take a look to tools like ctypes an psyco.
The next cool thing is that it allows you to mix C code with python code, so if you happen to code in C it can be the perfect bridge between C and Python. Again fine but it can be done with other tools as well.
However what makes what makes Cython REALLY interesting is that it expands the Python syntax. It expands it in such way to implement C features. One of these features is statically typed variables.
The key word here is "expands" not "replaces" , which means that you can use dynamically typed variables with statically typed variables.
But why we need statically typed variables in python ?
Well the answer to this is speed. To put it simply Cython code taking advantage of statically typed variables, to increase speed from 2 to 1000 times. Yes you heard correctly there are benchmarks that show Cython run 1000 times faster than Python . Here a benchmark that sho ws Cython being faster than C !!!. And if you think that this requires any major recoding , then think again, it only requires putting the name of the type infront of your variable which is nothing more than on or two words.
Remember that Cython is Python, which means that all you write is 99% python you just add a couple of words here and there with no major editing.
Even the compilation process is automatic taking advantage of the onboard python distribution tools, requiring the usual setup.py script.
Cython Advantages
1) 100% Python syntax, making dead easy to use and code with. You can use any existing python code with no change to your code.
2) C speed, cause it supports many of the features of C language making it extremely faster alot faster than psyco and ctypes.There is some overhead because of the conversion but it usually quite small from 40% to 100%. However there have been benchmarks that have show Cython outperform C by 40% which is is not unusual. Usually for statically typed variable except a boost in speed from 50 to 1000 times compared to the same python code
3) you can use any C code any time, just import it and it becomes accessible to your Cython code. Excellent for wrapping C libraries
4) Cython now supports and C++.
5) You never need to mess with C code all happens from inside python syntax.
6) Converts the python code to C code. Well I do not know how useful that is as a few lines of python code turns to thousnads of lines of c code but for those who want to edit code to kingdom come it will be useful. Again I remind you that Cython does not force you to write any C code to take enjoy its advantages.
7) Cython can be compiled to dynamic link libraries that can be imported and used like any python library out there.
8) Has the support of Google , so it is actively developed.
Disadvantages
1) Cython is Python, meaning it will still require python installation and will run from inside a python VM as any python app. I dont know whether this is a disadvantage per se but for those that think that what to consider Cython as a complete replacement to C , must take this into consideration.
2) Its does not offer automatic wrapping for C libaries like Swig , so if you want to wrap Alot of C functions/ Libraries , then Cython is not the best tool for that job , but it may provide support for this in the future.
Sum Up
Cython offers C speed from inside python with a tiny amount of recoding, it can be uses . Bare in mind that it offers alot of C features not mentioned here so the best you can do is visit the website and read the excellent documentation .
Here is the Cython website.
Monday, November 23, 2009
Java vs Python
There some things that made me conclude that Java is easier than python
1) Good documentation. Yes python has a very simple syntax , while java is more verbose but nothing can make thing any easier than good documentation, especially with third party libraries. Many of them actually require their users to read C++ documentation that defeats the purpose of using python in the first place.
2) Speed. Python is very slow, and even this does not show very often only for CPU intense tasks , that does not mean that python does not consume too much CPU. Again this might not be the problem for non intense CPU stuff, but because I working with midi and audio it makes my life harder.
3) Lack of a good IDE, IDEs is an essential part of RAD and none of the IDEs that support python works in a way that is hassle free. Especially in the GUI design department these IDEs leave alot to be desired.
I love the python syntax, it is surely the best of the best, that is why I have jython close at hand , but overall, at least for me what killed python is bad documentation and fragmented cross platform availability of libraries ( I have even experienced severe problems into making python work on macos).
I dont see python conquering the universe, the best language is yet to be invented. Its a great language however and alot of fun to use.
I do understand that the 3 above may not apply in all cases. Some people do not use IDEs, their python libraries have very good documentation, and do not real need speed.
My issue with python are quite old, but it was now that I decided to make an app that via MIDI protocol will control external hardware synthesizers ( I make music as well -> www.soundclick.com/kilon ) . Problem one , finding the right GUI. Qt is not free, GTK need X11 to work in mac, and Wxpython has non existent official documentation. Problem two, finding the right MIDI library, again the documentation is non existent.
Also I did not like the pure python ides or the IDEs that support python via plugin. I ended up that I would had to use several programm to do what I want and that is not good.
Java already solved the above problems.
Another motivation is jython. Java developers hate it beacause it inherits the slowness of python. Python developers hate it because it does nto allow of the use of cpython libraries unless they are already implemented in jython and thus is tied to java library and thus is not really pythonic. And other people love it ,like me, because it unites easy python syntac with the power and popularity of java libraries.

