It is currently Tue Jul 23, 2024 6:22 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 9:18 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
My results with your filter.This took a very long time to process by the way on my Windows 8 64 bit machine. :)
Size of the OBJ file is 8 MB.

Image

It is still drawing by the way. The size is already 2.2 gigs :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 9:41 pm  (#22) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
I blame gimp_pencil for speed

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 9:57 pm  (#23) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
I have added an auto-scale option.
Image
It will calculate to fit the furthest point from the center of image (to take up 90% so leaving 5% at the closest edge to border, see sample image below where autoscale is selected)
Image

Here's the auto-scale version of the plug-in
Attachment:
open-obj-file.zip [3.15 KiB]
Downloaded 200 times

See next post for an ULTRA-fast version (access pixel data directly instead of calling gimp_pencil)

_________________
TinT


Last edited by trandoductin on Fri Jun 13, 2014 11:17 pm, edited 1 time in total.

Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 11:16 pm  (#24) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
this latest version will run in seconds instead of minutes! :yes (doesn't call gimp_pencil but manually draws lines/edges by accessing the pixel raw data)
Attachment:
open-obj-file.zip [3.84 KiB]
Downloaded 512 times

another version that doesn't bother search for unique vertices/edges (it's actually faster to just draw them all than searching for them) that version is ->here<-
Image

_________________
TinT


Last edited by trandoductin on Sat Jun 14, 2014 1:46 am, edited 1 time in total.

Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 1:14 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
Yes that newest filter works much faster now. Thank you. :)
Same OBJ file and much smaller size results.

Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 1:17 am  (#26) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
thanks for trying it out Rod!

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 1:26 am  (#27) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
trandoductin wrote:
thanks for trying it out Rod!


Any time. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 1:43 am  (#28) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
I found that by searching for unique vertices/edges it's actually slower than just drawing it with the fast version so this version
just simply draws so it's even faster.
Attachment:
open-obj-file.zip [3.7 KiB]
Downloaded 343 times

Tried it out with a huge .obj file with 100000 triangles (buddha.obj) had to draw it on a really large canvas (6400x8000) then cropped.
Attachment:
buddha.zip [1.21 MiB]
Downloaded 165 times

Image
otherwise if drawn on a small image, you'll get a sort of gray shading (with some holes)
Image

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 2:14 am  (#29) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
Wow that draws really fast now. 37 seconds for Budda.obj file. :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 5:05 am  (#30) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
Trandoductin, Just letting you know the plugin works in Gimp 2.6.11 (win 7)

Image

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 5:32 am  (#31) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7316
Location: Göteborg at last!
Thank you very much for this trandoductin. I've been wanting something like it for a long time.


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 6:52 am  (#32) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
trandoductin wrote:
this latest version will run in seconds instead of minutes! :yes (doesn't call gimp_pencil but manually draws lines/edges by accessing the pixel raw data)
Attachment:
open-obj-file.zip

another version that doesn't bother search for unique vertices/edges (it's actually faster to just draw them all than searching for them) that version is ->here<-
[ Image ]

Wow! that is very cool... thank you
For Linux users, don't forget to allow permissions for this plug-in

@trandoductin, I downloaded your latest version, I selected an image and opened a black layer, rain the script at default and came up with this error.
What am I doing wrong? :oops:
Image

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 7:38 am  (#33) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
The fast script /plugin is fast. This airplane took about 1.5 secs. Problem is I had to redraw about 20 times to get a decent angle. I do not understand the x,y,z relationship. It does not seem to work the same as in the Map Object plugin but it probably does.(Not having a preview makes it very difficult)
My next question is what can you do with the image as you lose the vertex and line info. Is it intended to be a display only type filter, or are there uses for blender or other 3d display programs? Nice to play with though.
Image

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 7:43 am  (#34) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Wbool, did you just open an image to run that plug-in? or did you have to do something to it first?

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 7:57 am  (#35) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
molly wrote:
Wbool, did you just open an image to run that plug-in? or did you have to do something to it first?

Molly as far as I know the plugin will only work with files that have a .obj file type.
Have a look at http://tf3dm.com/3d-models/file/1/obj where you can find some free .obj files. I cannot guarantee that they will all work.

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 8:56 am  (#36) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Thanks wooble, I didn't know that.

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 11:02 am  (#37) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
molly wrote:
trandoductin wrote:
this latest version will run in seconds instead of minutes! :yes (doesn't call gimp_pencil but manually draws lines/edges by accessing the pixel raw data)
Attachment:
open-obj-file.zip

another version that doesn't bother search for unique vertices/edges (it's actually faster to just draw them all than searching for them) that version is ->here<-
[ Image ]

Wow! that is very cool... thank you
For Linux users, don't forget to allow permissions for this plug-in

@trandoductin, I downloaded your latest version, I selected an image and opened a black layer, rain the script at default and came up with this error.
What am I doing wrong? :oops:
[ Image ]

Molly can you attached a zipped up of the .obj file that you got this error on?

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 11:08 am  (#38) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Sorry trandoductin, I didn't use a .obj file. I didn't know I was supposed to. I tried downloading one from Wbool's link but it didn't work.

_________________
Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 11:15 am  (#39) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
wbool63 wrote:
The fast script /plugin is fast. This airplane took about 1.5 secs. Problem is I had to redraw about 20 times to get a decent angle. I do not understand the x,y,z relationship. It does not seem to work the same as in the Map Object plugin but it probably does.(Not having a preview makes it very difficult)
My next question is what can you do with the image as you lose the vertex and line info. Is it intended to be a display only type filter, or are there uses for blender or other 3d display programs? Nice to play with though.
[ Image ]

The rotatation is different than the Map Object. Map Object seems to rotate the axises as well. While with this plugin, rotate x will rotate the object around the x-axis (a line going left-right), rotate y will rotate the object around the y-axis (a line going top-bottom), rotate z will rotate the object around the z-axis (a line going from you into the screen).
I guess it's just a display only type filter (for fun) because you're right, after it draws it all the vertex/line/face information is lost.

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Sat Jun 14, 2014 11:20 am  (#40) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
molly wrote:
Sorry trandoductin, I didn't use a .obj file. I didn't know I was supposed to. I tried downloading one from Wbool's link but it didn't work.

Molly, the plugin opens the .obj file that you select in the first option when the script runs and draws a wireframe of it onto your active/selected layer (have this layer black/dark colored, because the wireframe will be drawn in gray scale from dark to light so it's better on a dark background)
So you have to have an .obj file somewhere on your computer (or downloaded) select an .obj file to open.
hope that helps

here's a try of statueLiberty.obj file found on wbool's mentioned link
Image

_________________
TinT


Top
Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Script-fu select outline of image inside png

1

No new posts Attachment(s) manipulate a portion of text inside a text layer using python-fu

2

No new posts "New"file replacing "open" file?

2

No new posts Attachment(s) Baby's first GEGL plugin - a very basic GEGL plugin anyone can make.

9

No new posts GIH FILE

2



* Login  



Powered by phpBB3 © phpBB Group