Difference between revisions of "EBM"
m (→Inserting ebm in MGED: inserting images) |
m (→Inserting ebm in MGED) |
||
(14 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | [[category:tutorials]] |
+ | ==Inserting an ''ebm'' shape in MGED== | ||
===Making an image with GIMP=== | ===Making an image with GIMP=== | ||
− | First, we must | + | First, we must make an image with GIMP. This image contains the text, or a two dimensional shape that should be loaded into MGED model as ''ebm''. |
− | The image must | + | The image must have a '''black''' background and a '''white''' foreground. |
− | To get a nice ''ebm'', the new GIMP image should | + | To get a nice ''ebm'', the new GIMP image should have at least (?) 350 x 350 pixels (width and height). |
− | In GIMP we must change the Image Mode | + | In GIMP we must change the Image Mode to Indexed Colors with <nowiki>'Black-white, using the (1 bit) palette'</nowiki> option. |
− | We must this image | + | We must save this image in PNG format. In the Save dialog box we must check the 'Save with Background' option. |
− | We must | + | We must write down somewhere the dimensions in pixels of this image. (e.g., 350x350) |
[[Image:Ychar.png|GIMP image of the Y char]] | [[Image:Ychar.png|GIMP image of the Y char]] | ||
Line 17: | Line 18: | ||
'''The GIMP image''' | '''The GIMP image''' | ||
− | ===Converting PNG into | + | ===Converting a PNG file into a bitmap file=== |
− | This can be done with the following command at the shell prompt in XTERM window on GNU/Linux systems. | + | This can be done with the following command at the shell prompt in an XTERM window on GNU/Linux systems. |
− | + | $ png-bw image_name.png > image_name.bw | |
+ | Warning: color image being converted to B/W!!! | ||
− | + | We get the warning shown above and this is good. :) | |
− | + | ===Inserting ''ebm'' in MGED=== | |
− | ===Inserting ebm in MGED=== | + | mged> in text1.s ebm image_name.bw 350 350 20 |
− | |||
− | If we don't type the | + | If we don't type the dimensions (in pixels) of the file ''image_name.png'' exactly as it was created, the ''ebm'' shape that we get will not be good. |
[[Image:Ychar_ebm_Wireframe.jpg|the wireframe of the inserted ebm]] | [[Image:Ychar_ebm_Wireframe.jpg|the wireframe of the inserted ebm]] | ||
− | '''The Wireframe of the ebm''' | + | '''The Wireframe of the ''ebm''''' |
− | If we made a region of this ''ebm'' and raytraced it then we can see something like | + | If we made a region of this ''ebm'' and raytraced it, then we can see something like the picture below. |
[[Image:Ychar_ebm_Raytraced.jpg|raytraced region of the ebm]] | [[Image:Ychar_ebm_Raytraced.jpg|raytraced region of the ebm]] |
Revision as of 07:57, 29 June 2013
Contents
Inserting an ebm shape in MGED
Making an image with GIMP
First, we must make an image with GIMP. This image contains the text, or a two dimensional shape that should be loaded into MGED model as ebm.
The image must have a black background and a white foreground.
To get a nice ebm, the new GIMP image should have at least (?) 350 x 350 pixels (width and height).
In GIMP we must change the Image Mode to Indexed Colors with 'Black-white, using the (1 bit) palette' option.
We must save this image in PNG format. In the Save dialog box we must check the 'Save with Background' option.
We must write down somewhere the dimensions in pixels of this image. (e.g., 350x350)
The GIMP image
Converting a PNG file into a bitmap file
This can be done with the following command at the shell prompt in an XTERM window on GNU/Linux systems.
$ png-bw image_name.png > image_name.bw Warning: color image being converted to B/W!!!
We get the warning shown above and this is good. :)
Inserting ebm in MGED
mged> in text1.s ebm image_name.bw 350 350 20
If we don't type the dimensions (in pixels) of the file image_name.png exactly as it was created, the ebm shape that we get will not be good.
The Wireframe of the ebm
If we made a region of this ebm and raytraced it, then we can see something like the picture below.