Editing EBM
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
==Inserting an ''ebm'' shape in MGED== | ==Inserting an ''ebm'' shape in MGED== | ||
===Making an image with GIMP=== | ===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''. | + | First, we must to make an image with GIMP. This image contains the text, or a two dimensional shape that should to be loaded into MGED model as ''ebm''. |
− | The image must have | + | The image must to have '''black''' background and '''white''' foreground. |
− | To get a nice ''ebm'', the new GIMP image should have at least (?) 350 x 350 pixels (width and | + | To get a nice ''ebm'', the new GIMP image should to have at least(?) 350 x 350 pixels (width and hight). |
− | In GIMP we must change the Image Mode to Indexed Colors with <nowiki>'Black-white, using | + | In GIMP we must change the Image Mode in to the Indexed Colors with <nowiki>'Black-white, using with (1 bit) palette'</nowiki> option. |
− | We must | + | We must this image to save in PNG format. In the Save dialog box we must to check the 'Save with Background' option. |
− | We must write down somewhere the dimensions in pixels of this image ( | + | We must to write down somewhere the dimensions in pixels of this image. (eg.: 350x350) |
[[Image:Ychar.png|GIMP image of the Y char]] | [[Image:Ychar.png|GIMP image of the Y char]] | ||
Line 18: | Line 18: | ||
'''The GIMP image''' | '''The GIMP image''' | ||
− | ===Converting | + | ===Converting PNG into x bitmap file=== |
− | This can be done with the following command at the shell prompt in | + | This can be done with the following command at the shell prompt in XTERM window on GNU/Linux systems. |
− | + | '''$''' png-bw image_name.png > image_name.bw | |
− | |||
− | We get | + | Warning: color image being converted to B/W!!! |
+ | |||
+ | We get this warning 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 image_name.png exactly as it have, the ''ebm'' shape that we get will be not good. |
[[Image:Ychar_ebm_Wireframe.jpg|the wireframe of the inserted ebm]] | [[Image:Ychar_ebm_Wireframe.jpg|the wireframe of the inserted ebm]] | ||
Line 35: | Line 36: | ||
'''The Wireframe of the ''ebm''''' | '''The Wireframe of the ''ebm''''' | ||
− | If we made a region of this ''ebm'' and raytraced it | + | If we made a region of this ''ebm'' and raytraced it then we can see something like this on the picture bellow. |
[[Image:Ychar_ebm_Raytraced.jpg|raytraced region of the ebm]] | [[Image:Ychar_ebm_Raytraced.jpg|raytraced region of the ebm]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |