admin
Ronounours 3:12pm, 7 September 2010
Here is a new version of this quite recent 1.4.x.x branch of G'MIC, with the release of the 1.4.1.0 package today.
Here are the changes :

* Bug corrections :
- Corrected bug related to the display of 3d objects containing point primitives.
- Corrected bad memory access happening sometimes in command '-input'.
- Corrected typos in various error/warning messages.

* New features :
- New command '-gyroid3d' that generates a 3d gyroid mesh (en.wikipedia.org/wiki/Gyroid).
- New command '-texturize3d' that maps an image onto any 3d object.
- New default colormaps available for function '-map' and '-index' (8 in total) : hot, jet, cube, ...
- New command '-label_points3d', to add numbered label to all vertices of a specified 3d object.
- New available 3d objects for the GIMP plug-in : sphere and gyroid.

As you see, I follow the 'Release Early, Release Often' philosophy
(en.wikipedia.org/wiki/Release_early,_release_often)
(previous release was 4 days ago..). Let me say few words about it :
The development of G'MIC has reached a quite stable state where the main improvements from one version to another is the correction of bugs and the apparition of new custom commands. This means this will hardly introduce new bugs that could be considered as regressions compared to previous versions.
Moreover, I have designed a 'release script' that basically does all the release work automatically, including the build of binary packages, of the documentation, and the update of the web page. So, the more I use it, the more it is amortized :)

Hope you will enjoy this version :

gmic.sourceforge.net/

David.
MOD
lylejk 7 years ago
Just what I've been waiting for. Thanks David. :)
MOD
lylejk 7 years ago
OK Dave; I'm too much a novice to use G'MIC at the command prompt and couldn't figure out how to export my concoction (nor play with settings for 3D; just kept the default). I then ported the result into GIMP for some additional tlc. The GIMP preset was too much to be desired; like the result of the command prompt 1000% better. Anyway, here's my first pass at it. Maybe you can help me with the GIMP plugin so that I can get similar results. As a side note, the GIMP Plugin interpretator crashed when I enterd teh gyroid3d command so I just went to the command prompt to do this one (and textureized and such within GIMP). :)

gyroid3d by lylejk
Mahvin 7 years ago
I'm not having much luck using the command line in Ubuntu 10.04 (amd 64). I figured I wasn't entering the command correctly for -gyroid3d.

I enter 'gmic image.jpg -gyroid3d' and the image opens but no changes are noticed. Am I missing something here?

I did play with the webcam on the command line which was a hoot, btw. Good job with that. :)
MOD
lylejk 7 years ago
Hey Mahvin. Figured out that the gyroid setting only takes 2 arguments; rez and range (maximum of 10 for range).

example: gmic -gyroid3d 128,10

Now 128 takes around 30 to 40 seconds on my PC at this range. A setting 32 is pretty rough though. Once the viewer screen launches, everything's fantastically fast w.r.t. controling zoom and orientation. Not sure how to save the result for higher rez then screen resolution though (not that proficient at command prompt interface), but still you should get a pretty cool result with the resolution you have available imo. Just did this cool coral rendering too. :)

coral by lylejk
admin
Ronounours 7 years ago
Hey Mahvin,
Thanks so much for your postcard, I've added it to the G'MIC hall of fame :)
Mahvin Posted 7 years ago. Edited by Mahvin (member) 7 years ago
Lyle:

It's not working for me in Ubuntu, not sure why. I'm attempting to command line the gyroid3d effect on a selected image.

David:

You're welcome. I use G'MIC more than anything else. I'm really impressed with the work you have done and the improvements you have made.
MOD
lylejk 7 years ago
OK; I created a seamless Gyroid texture (here ; transparent background) and used it to created these two concoctions. Man, you made a monster of me David. lol

gyroid_braclet by lylejk


glazed_gyroid_sphere by lylejk


:)
admin
Ronounours 7 years ago
Some tips about making Gyroid from the command line :

- The '-gyroid' command does not map an image onto a 3d gyroid, but just create a 3d gyroid (with default colors). Then, eventually, you can map an image on it (which is done with the GIMP plug-in), but this is damn slow ! So, if you type 'gmic image.jpg -gyroid3d', you will see first the 'image.jpg' displaying on a window, then if you press any key, a new window will open with the 3d gyroid. It is two distinct data that G'MIC has internally at the same time, and it will then display it one after the other.
If you want to map an image onto a gyroid, then you need to use this command :

gmic image.jpg -gyroid3d 16 -texturize3d

The '-texturize3d' command takes the two last image data (here, there are only two, so that is perfect), and map the first one on the 3d object represented by the last one (3d objects in G'MIC are stored as usual images containing a kind of magic header).
Here I put '16' as the argument of the '-gyroid3d' function, which is the resolution I want to consider for generating the gyroid. If you have a doubt about command arguments, just type :

gmic -h gyroid3d

(this works of course for all commands), and you'll get :

user@xxxx:~$ gmic -h gyroid3d

gmic : GREYC's Magic Image Converter (Sep 7 2010, 16:19:56).

Version 1.4.1.0, Copyright (C) 2008-2010, David Tschumperle
(gmic.sourceforge.net)

-gyroid3d _resolution>0,_range=10

Generate 3d gyroid at (0,0,0), with specified resolution.



So, now the question is : how to render a 3d object in a bigger image than the screen resolution (avoiding to do a snapshot, as lylejk did).
Well, there is another interesting command '-snapshot3d', which will do the job :

gmic -gyroid3d 64 -snapshot3d 2048,0.6,0,0,0

Just to let you know :

user@xxxx:~$ gmic -h snapshot3d

gmic : GREYC's Magic Image Converter (Sep 7 2010, 16:19:56).

Version 1.4.1.0, Copyright (C) 2008-2010, David Tschumperle
(gmic.sourceforge.net)

-snapshot3d _size>0,_zoom>=0,_backgroundR,_backgroundG,_backgroundB

Create 2d snapshots of selected 3d objects.
Set 'zoom' to 0 to disable object auto-scaling.
MOD
lylejk 7 years ago
No programmer David, but these are cool commands to know. Thanks a heap. :)
admin
Ronounours Posted 7 years ago. Edited by Ronounours (admin) 7 years ago
Well, just to illustrate the whole thing :

gmic ~/work/img/lena.bmp -gyroid3d 32,10 -texturize3d -snapshot3d 1024,0.7,-1 -to_rgba -replace_color 0,0,-1,-1,-1,255,0,0,0,0 -o gmic_gyroid.png

allows to render this 2048x2048 transparent image :
MOD
lylejk 7 years ago
Now that looks better then your original Lena. I actually got a little lazy and just did some texture blends (including displacement mapping). Might give image mapping a try later. Again, I very much appreciate it David. :)
admin
Ronounours 7 years ago
And what about this one ?

MOD
lylejk 7 years ago
How did you go about shaping it round? I do like it. I actually created a seamless texture and then spheremapped it, but I like the irregular sphere shape much better. :)
admin
Ronounours 7 years ago
lylejk : this is actually another surface, not a gyroid. I saw the formula on this web page, so I reproduced it with G'MIC :

iat.ubalt.edu/summers/math/platsol.htm

Adding some blue texture and making an animated GIF with it gives :



I have found a small but annoying bug in latest G'MIC release, I need to repost the binary archives. Maybe it would be cool to update tonight...
Sorry about that.

David.
MOD
lylejk 7 years ago
That's one cool animation; didn't notice the inner orb until that. Got to figure out how to enter formulas for plotting 3D inside G'MIC. Then the world would be my oyster. Going to check that site out now. :)
Mahvin Posted 7 years ago. Edited by Mahvin (member) 7 years ago
Holy awesomeness, Batman! Wow!

David...now we're talking. Now you have me convinced to command line G'MIC over using it internally with GIMP.

Are you going to be adding the other plots to G'MIC, David?
admin
Ronounours 7 years ago
Hi Mahvin, :)
Well, you make think about one thing : I should always put the gmic command (or set of commands) that I used to generate the results I show, when these are generated with the command line tool 'gmic'.
This would perhaps help to clarify how G'MIC is working, in an internal way. I'll try to think about it next time.
Mahvin 7 years ago
David:

I learn best when I see someone else's examples (monkey see, monkey do). Once I see how the syntax works, then "I get it". Until that happens, I'll struggle with it (unless I get lucky when parsing the syntax).

For instance, mapping the icosahedral with mathematical expressions with gmic isn't very clear to me, even as I read the information on the GMIC website for entering math expressions. If I saw how it was done on the command line, it would be far easier to learn and then future math expressions would be more clearly defined, thus making me more independent, needing less or no help at all.
admin
Ronounours 7 years ago
Ok Mahvin, I see.
I'm still experimenting, trying to render now parametric surfaces, as this one :
CImg_0002 by Ronounours


I'm very inspired by this site :
www.econym.demon.co.uk/isotut/real.htm

There are so nice things to do ! But, by the way, G'MIC cannot replace POVRAY or any other 3D modeler. But surprisingly, G'MIC has anyway some serious 3d capabilities, compared to its competitor (ImageMagick mainly) ;)

PS : I don't put the code I used here because it is quite long and experimental, I'm trying to clean it a little bit first before displaying.
Mahvin Posted 7 years ago. Edited by Mahvin (member) 7 years ago
Wow, David, that's impressive considering G'MIC isn't a 3D modeler. Like Lyle, I have a love for taking images outside the box of what is considered the "norm", and making animations, too. These examples fall in line with those interests.

I'm looking forward to the code examples. I am also very grateful for your willingness to help us understand G'MIC better. Thanks a heap, David!

:)

P.S. I visited the link you posted above and again, wow! Math certainly churns out some beautiful imagery. Impressive stuff!
MOD
lylejk 7 years ago
Just got back from taking Dad ot lunch. Man, that site is cool David and I do like your new rendering too. Like Mahvin, I'm a monkey too. lol

:)
Groups Beta