It is currently Mon Apr 15, 2024 8:16 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 6:34 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I am trying to use the "plug-in-map-object"
for a script but don't know what to set
view-point (x,y,z) values
to have the default values of when you open up the Map/Map Object
And also
first and second axis (x,y,z) values
now i just have them all as zeros and not sure if that's the default of Map/Map Object or not.

Thanks in advance.

_________________
TinT


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 6:42 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
The default values can be found in the map-object-main.c file.

When using plug-in-map-object, I find it best to treat it as four separate plug-ins: one for mapping to a plane, one for mapping to a box, one for mapping to sphere, and one for mapping to a cylinder. This will eliminate worrying about many of the nearly fifty arguments that need to be provided.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 6:57 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Trandoductin maybe this will help to make sense of the plugin

(plug-in-map-object RUN-NONINTERACTIVE image drawable
         3                  ; Type of mapping (0=plane,1=sphere,2=box,3=cylinder)
         0.5 0.5 2.0           ; viewpoint
         0.5 0.5 0.0           ; object pos
         1.0 0.0 0.0           ; first axis
         0.0 1.0 0.0           ; 2nd axis
         0.0 0.0 0.0            ; axis rotation
         1 '(255 255 255)     ; Type of lightsource (0=point,1=directional,2=none)and Lightsource color (r,g,b)
         -0.5 -0.5 2           ; light position
         -1.0 -1.0 1.0        ; light direction
         0.3 1.2 0.7 0.0 27.0 ; material (amb, diff, refl, spec, high)
         TRUE               ; antialias
         FALSE                ; tile
         FALSE                ; new image
         TRUE                ; transparency
         .5                   ; Sphere/cylinder radius (only used when maptype=1 or 3)
         0.5 0.5 0.5            ; box size
         1.00                 ; unused parameter Cylinder length
         -1                   ; Box front face (set these to -1 if not used)
         -1                   ; Box back face
         -1                   ; Box top face
         -1                   ; Box bottom face
         -1                   ; Box left face
         -1                   ; Box right face
         -1                   ; Cylinder top face (unused parameter)
         -1)                  ; Cylinder bottom face (unused parameter)

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 6:58 pm  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
thanks guys.
got it to work
but i don't see an option for creating a new layer like in Map/Map object.

_________________
TinT


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 7:00 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
i guess i might have to manually create a copy of a layer then run plug-in on that.

_________________
TinT


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 7:05 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
The plugin setting is 'New Image' not 'New Layer' for 'New Layer' copy the layer and run plugin on that

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Sun Aug 03, 2014 7:40 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
trandoductin wrote:
thanks guys.
got it to work
but i don't see an option for creating a new layer like in Map/Map object.

If your original layer does not have an alpha channel and the "transparency" argument is TRUE, a new layer will be generated. This seems to me as somewhat anomalous behavior so it probably should not be relied upon.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: trying to use "plug-in-map-object"
PostPosted: Mon Aug 04, 2014 4:41 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
saulgoode wrote:
...
When using plug-in-map-object, I find it best to treat it as four separate plug-ins: one for mapping to a plane, one for mapping to a box, one for mapping to sphere, and one for mapping to a cylinder. This will eliminate worrying about many of the nearly fifty arguments that need to be provided.

Yes, Saulgoode, you are perfectly right, and it would be nice, for those trying to use it, if some gimp-chat-coder would take the challenge of either:
1-take the original c code and create four different c plug-ins, one for each mapping type
or:
2-create four front-end scripts, one for each mapping type, so the user can deal with a more reasonable number of parameters
who knows...

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Don't work procedures plug-in-bump-map, plug-in-displace

2

No new posts Map to Object

3

No new posts Attachment(s) Pots & Bowls Using 'Map Object>Sphere'

41

No new posts Attachment(s) Extract Object plugin question

7

No new posts Attachment(s) Quick and Dirty Lightning Object

2



* Login  



Powered by phpBB3 © phpBB Group