It is currently Tue Jul 23, 2024 4:15 pm


All times are UTC - 5 hours [ DST ]



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

Joined: Mar 04, 2011
Posts: 2446
trandoductin wrote:

Can you attached your .obj file zipped up so i can debug it and see why it crashes.


Two files, as a comparison. One with a cylinder (crashes here) and one without (renders ok).

I did dig up a blender cylinder from the web and that crashed as well.

edit: still have that one, give it a try.


Attachments:
blender_cylinder.obj.zip [746 Bytes]
Downloaded 83 times
cylinder.obj.zip [4.16 KiB]
Downloaded 82 times

_________________
Image
Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 2:07 pm  (#12) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
rich2005 wrote:
trandoductin wrote:

Can you attached your .obj file zipped up so i can debug it and see why it crashes.


Two files, as a comparison. One with a cylinder (crashes here) and one without (renders ok).

I did dig up a blender cylinder from the web and that crashed as well.

edit: still have that one, give it a try.


rich2005, try this version (i've changed it so that i recognizes different types of faces' definitions)
Attachment:
open-obj-file.zip [2.29 KiB]
Downloaded 477 times

an even more updated version of this plug-in: ->here<-

_________________
TinT


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

Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 2:54 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
May try this one later trandoductin; looks cool for importing wireframes of Sculpture Generator output. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 3:30 pm  (#14) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2446
That is working with cylinders now.

I thought I would be a bit more ambitious and try some extruded text. Took some time to render but it got there.

However, I need to do some work on the orientation. ;)

Image

All good fun, thanks

_________________
Image


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

Joined: May 07, 2014
Posts: 4041
Location: Canada
rich2005 wrote:
That is working with cylinders now.

I thought I would be a bit more ambitious and try some extruded text. Took some time to render but it got there.

However, I need to do some work on the orientation. ;)

[ Image ]

All good fun, thanks


looks better if you try it on black background because i draw it with gray shades fades to white where white is the closest edges and and dark gray are further edges.

_________________
TinT


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

Joined: May 07, 2014
Posts: 4041
Location: Canada
lylejk wrote:
May try this one later trandoductin; looks cool for importing wireframes of Sculpture Generator output. :)


I looked up Sculpture Generator and gave it a try. It exports to .stl file. So i used an converter (http://www.greentoken.de/onlineconv/).

I found that the .obj file converted had duplication of vertices and faces defined. So I changed the plug-in to find unique vertices and unique edges only.

With the below test/sample (from 12601 vertices down to 2099 unique vertices, from 12600 edges down to 6300 unique edges)
so it reduces the workload to call gimp_pencil so not as slow (still slow since there's a lot of edges to draw)
Image


Here's the updated version of the plug-in that finds unique vertices and edges only.
Attachment:
open-obj-file.zip [2.76 KiB]
Downloaded 183 times


Go ->here<- for later version (auto-scale version)

_________________
TinT


Last edited by trandoductin on Fri Jun 13, 2014 9:58 pm, edited 2 times in total.

Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 7:20 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
Oh great now you have me breaking out Sculpture Gen again. :lol
Lyle will know what i mean.

Nice filter by the way.

_________________
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 7:40 pm  (#18) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
break it out :hehe

_________________
TinT


Top
 Post subject: Re: draws .obj file inside gimp (just for fun) (Plugin)
PostPosted: Fri Jun 13, 2014 7:54 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
trandoductin wrote:
break it out :hehe

Already have. Notice the change in the interface :lol

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: Fri Jun 13, 2014 8:13 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
www.youtube.com Video from : www.youtube.com

_________________
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: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 511 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 164 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 new topic Reply to topic  [ 51 posts ]  Go to page 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