Forms, TForms, and TFormManager (was:CCPainter for KAT)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Forms, TForms, and TFormManager (was:CCPainter for KAT)

David Faught
Okay, let me ask my main question a different way.  Excuse me if I get
some of the names wrong because I don't have the code available at the
moment.  If I take an odd-sized Form instance and create a TForm in a
TTexture, somewhere along the way the Form is resized to
smallerPowerOfTwo dimensions (assuming shrinkMap is true).  After that
point, if a copy of the Form is pulled back from the TForm, it is the
resized Form that is copied.  Since I am dealing with Forms that are
potentiallly not saved to external disk, there is no URL saved in the
TForm, so I think it is not handled by the TFormManager.

So the question is this:  when the TForm is created, assuming that
there is a (possibly fake) URL, will the TFormManager cache the
original odd-sized Form?  Actually now that I write that, I know the
answer is no because the TFormManager caches the original file
contents, be it gif or jpg or png.

So I could possibly create png file contents in an array from the
original Form and create the TForm from that so that the original Form
contents could be passed around to TeaParty participants in the
asynchronous manner of the TFormManager.  So now I guess the question
is:  will this method of creating a png only in memory and giving it a
fake URL cause some other unforseen problems?

Thanks for any comments.


On 5/14/07, David Faught <[hidden email]> wrote:

> Hi,
>
> I have been slowly working on some enhancements to CCPainter for the
> Croquet Collaborative's KAT environment.  One of the improvements is
> the ability to repaint the texture from a "handmade" object that is
> already in the island scene, in a similar manner to how Plopp allows
> repainting.  I'm looking for some discussion on how this should work.
>
> When I repaint a texture from a "handmade" item that's in the scene,
> what I get back for a Form to paint is a "smallerPowerOfTwo" sized
> Form, not the size of the original painting.  I have the impression
> that's just how it's going to work, but I could be wrong.  Is this
> correct?  Anyway, I started down the path of just making sure that the
> original blank painting surface is already dimensioned by powers of 2,
> so that when it gets repainted, it comes out the same size.
>
> Currently for an initial painting started by the menu sketch item, the
> Tweak screen size is used as a starting point, then reduced by 100 in
> each direction mainly to make room for the navigation and dock at the
> bottom, then potentially/probably reduced to the smallerPowerOfTwo
> (smallerPowerOfTwo does each dimension separately).  That is taken as
> the painting size, then the CCPainter palette and bottom buttons are
> positioned around it.  This seems to work okay, but there may be some
> implications of this that haven't occurred to me yet, maybe depending
> on what the Tweak screen size is.  I guess that it's a little
> dangerous to assume that there is room for the palette, although the
> reduction by 100 in each direction seems to take care of this.
>
> -----
>
> After I wrote this, I though that it might be better if you could try
> it for yourself, so attached is a Monticello package and a changeSet
> (to hook into the KAT menus).  The changeSet also includes a fix from
> Andreas for a skinned button problem that affects CPainter.  Load
> these in a Collaborative or SDK image, start the KAT demo, then
> CCPainter will be in the New->Sketch menu item.  Try painting an
> object, put it in the scene, and then repaint it.  Let me know how it
> works for you.
>
> There is a Flash demo of a slightly older version of CCPainter at
> http://hedgehog.software.umn.edu/croquet/croquetMovies/ccpainter1.htm
>
> Dave
>
> P.S.  Please DO NOT attach to the Collaborative's server with this
> code loaded, use it only locally for now.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Forms, TForms, and TFormManager (was:CCPainter for KAT)

Joshua Gargus-2
I think that your idea will work.

Josh


On May 15, 2007, at 5:52 AM, David Faught wrote:

> Okay, let me ask my main question a different way.  Excuse me if I get
> some of the names wrong because I don't have the code available at the
> moment.  If I take an odd-sized Form instance and create a TForm in a
> TTexture, somewhere along the way the Form is resized to
> smallerPowerOfTwo dimensions (assuming shrinkMap is true).  After that
> point, if a copy of the Form is pulled back from the TForm, it is the
> resized Form that is copied.  Since I am dealing with Forms that are
> potentiallly not saved to external disk, there is no URL saved in the
> TForm, so I think it is not handled by the TFormManager.
>
> So the question is this:  when the TForm is created, assuming that
> there is a (possibly fake) URL, will the TFormManager cache the
> original odd-sized Form?  Actually now that I write that, I know the
> answer is no because the TFormManager caches the original file
> contents, be it gif or jpg or png.
>
> So I could possibly create png file contents in an array from the
> original Form and create the TForm from that so that the original Form
> contents could be passed around to TeaParty participants in the
> asynchronous manner of the TFormManager.  So now I guess the question
> is:  will this method of creating a png only in memory and giving it a
> fake URL cause some other unforseen problems?
>
> Thanks for any comments.
>
>
> On 5/14/07, David Faught <[hidden email]> wrote:
>> Hi,
>>
>> I have been slowly working on some enhancements to CCPainter for the
>> Croquet Collaborative's KAT environment.  One of the improvements is
>> the ability to repaint the texture from a "handmade" object that is
>> already in the island scene, in a similar manner to how Plopp allows
>> repainting.  I'm looking for some discussion on how this should work.
>>
>> When I repaint a texture from a "handmade" item that's in the scene,
>> what I get back for a Form to paint is a "smallerPowerOfTwo" sized
>> Form, not the size of the original painting.  I have the impression
>> that's just how it's going to work, but I could be wrong.  Is this
>> correct?  Anyway, I started down the path of just making sure that  
>> the
>> original blank painting surface is already dimensioned by powers  
>> of 2,
>> so that when it gets repainted, it comes out the same size.
>>
>> Currently for an initial painting started by the menu sketch item,  
>> the
>> Tweak screen size is used as a starting point, then reduced by 100 in
>> each direction mainly to make room for the navigation and dock at the
>> bottom, then potentially/probably reduced to the smallerPowerOfTwo
>> (smallerPowerOfTwo does each dimension separately).  That is taken as
>> the painting size, then the CCPainter palette and bottom buttons are
>> positioned around it.  This seems to work okay, but there may be some
>> implications of this that haven't occurred to me yet, maybe depending
>> on what the Tweak screen size is.  I guess that it's a little
>> dangerous to assume that there is room for the palette, although the
>> reduction by 100 in each direction seems to take care of this.
>>
>> -----
>>
>> After I wrote this, I though that it might be better if you could try
>> it for yourself, so attached is a Monticello package and a changeSet
>> (to hook into the KAT menus).  The changeSet also includes a fix from
>> Andreas for a skinned button problem that affects CPainter.  Load
>> these in a Collaborative or SDK image, start the KAT demo, then
>> CCPainter will be in the New->Sketch menu item.  Try painting an
>> object, put it in the scene, and then repaint it.  Let me know how it
>> works for you.
>>
>> There is a Flash demo of a slightly older version of CCPainter at
>> http://hedgehog.software.umn.edu/croquet/croquetMovies/ccpainter1.htm
>>
>> Dave
>>
>> P.S.  Please DO NOT attach to the Collaborative's server with this
>> code loaded, use it only locally for now.
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Forms, TForms, and TFormManager (was:CCPainter for KAT)

David Faught
I am a little unsure of the right way to use the TFormManager.  If the
formManager cache is being used for a particular tForm, then that
tForm in the replicated island will always have #isThumb being true,
yes?  Even though the full non-thumb object is passed around to
participant caches, it never gets put into the replicated island to
replace the thumbnail.  Is that correct?  And #isThumb being true is a
way to tell that the formManager cache is actually being used for that
replicated object?

Thanks for any input.


On 5/15/07, Joshua Gargus <[hidden email]> wrote:

> I think that your idea will work.
>
> Josh
>
>
> On May 15, 2007, at 5:52 AM, David Faught wrote:
>
> > Okay, let me ask my main question a different way.  Excuse me if I get
> > some of the names wrong because I don't have the code available at the
> > moment.  If I take an odd-sized Form instance and create a TForm in a
> > TTexture, somewhere along the way the Form is resized to
> > smallerPowerOfTwo dimensions (assuming shrinkMap is true).  After that
> > point, if a copy of the Form is pulled back from the TForm, it is the
> > resized Form that is copied.  Since I am dealing with Forms that are
> > potentiallly not saved to external disk, there is no URL saved in the
> > TForm, so I think it is not handled by the TFormManager.
> >
> > So the question is this:  when the TForm is created, assuming that
> > there is a (possibly fake) URL, will the TFormManager cache the
> > original odd-sized Form?  Actually now that I write that, I know the
> > answer is no because the TFormManager caches the original file
> > contents, be it gif or jpg or png.
> >
> > So I could possibly create png file contents in an array from the
> > original Form and create the TForm from that so that the original Form
> > contents could be passed around to TeaParty participants in the
> > asynchronous manner of the TFormManager.  So now I guess the question
> > is:  will this method of creating a png only in memory and giving it a
> > fake URL cause some other unforseen problems?
> >
> > Thanks for any comments.
> >
> >
> > On 5/14/07, David Faught <[hidden email]> wrote:
> >> Hi,
> >>
> >> I have been slowly working on some enhancements to CCPainter for the
> >> Croquet Collaborative's KAT environment.  One of the improvements is
> >> the ability to repaint the texture from a "handmade" object that is
> >> already in the island scene, in a similar manner to how Plopp allows
> >> repainting.  I'm looking for some discussion on how this should work.
> >>
> >> When I repaint a texture from a "handmade" item that's in the scene,
> >> what I get back for a Form to paint is a "smallerPowerOfTwo" sized
> >> Form, not the size of the original painting.  I have the impression
> >> that's just how it's going to work, but I could be wrong.  Is this
> >> correct?  Anyway, I started down the path of just making sure that
> >> the
> >> original blank painting surface is already dimensioned by powers
> >> of 2,
> >> so that when it gets repainted, it comes out the same size.
> >>
> >> Currently for an initial painting started by the menu sketch item,
> >> the
> >> Tweak screen size is used as a starting point, then reduced by 100 in
> >> each direction mainly to make room for the navigation and dock at the
> >> bottom, then potentially/probably reduced to the smallerPowerOfTwo
> >> (smallerPowerOfTwo does each dimension separately).  That is taken as
> >> the painting size, then the CCPainter palette and bottom buttons are
> >> positioned around it.  This seems to work okay, but there may be some
> >> implications of this that haven't occurred to me yet, maybe depending
> >> on what the Tweak screen size is.  I guess that it's a little
> >> dangerous to assume that there is room for the palette, although the
> >> reduction by 100 in each direction seems to take care of this.
> >>
> >> -----
> >>
> >> After I wrote this, I though that it might be better if you could try
> >> it for yourself, so attached is a Monticello package and a changeSet
> >> (to hook into the KAT menus).  The changeSet also includes a fix from
> >> Andreas for a skinned button problem that affects CPainter.  Load
> >> these in a Collaborative or SDK image, start the KAT demo, then
> >> CCPainter will be in the New->Sketch menu item.  Try painting an
> >> object, put it in the scene, and then repaint it.  Let me know how it
> >> works for you.
> >>
> >> There is a Flash demo of a slightly older version of CCPainter at
> >> http://hedgehog.software.umn.edu/croquet/croquetMovies/ccpainter1.htm
> >>
> >> Dave
> >>
> >> P.S.  Please DO NOT attach to the Collaborative's server with this
> >> code loaded, use it only locally for now.
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Fwd: Forms, TForms, and TFormManager (was:CCPainter for KAT)

David Faught
Well, it looks like I've been chasing my tail a bit.  It appears that
the actual bitmap data that is cached and passed around outside of the
replicated island by the formManager IS the resized-as-powersOfTwo
size, NOT the original media size.  Am I right or wrong?  The
thumbnail and cache can still be used to reduce the size of the
directly replicated data, but there is no simple way for clients to
get the original artwork if it is not already powersOfTwo sized.  Oh
well!


---------- Forwarded message ----------

I am a little unsure of the right way to use the TFormManager.  If the
formManager cache is being used for a particular tForm, then that
tForm in the replicated island will always have #isThumb being true,
yes?  Even though the full non-thumb object is passed around to
participant caches, it never gets put into the replicated island to
replace the thumbnail.  Is that correct?  And #isThumb being true is a
way to tell that the formManager cache is actually being used for that
replicated object?

Thanks for any input.


On 5/15/07, Joshua Gargus <[hidden email]> wrote:

> I think that your idea will work.
>
> Josh
>
>
> On May 15, 2007, at 5:52 AM, David Faught wrote:
>
> > Okay, let me ask my main question a different way.  Excuse me if I get
> > some of the names wrong because I don't have the code available at the
> > moment.  If I take an odd-sized Form instance and create a TForm in a
> > TTexture, somewhere along the way the Form is resized to
> > smallerPowerOfTwo dimensions (assuming shrinkMap is true).  After that
> > point, if a copy of the Form is pulled back from the TForm, it is the
> > resized Form that is copied.  Since I am dealing with Forms that are
> > potentiallly not saved to external disk, there is no URL saved in the
> > TForm, so I think it is not handled by the TFormManager.
> >
> > So the question is this:  when the TForm is created, assuming that
> > there is a (possibly fake) URL, will the TFormManager cache the
> > original odd-sized Form?  Actually now that I write that, I know the
> > answer is no because the TFormManager caches the original file
> > contents, be it gif or jpg or png.
> >
> > So I could possibly create png file contents in an array from the
> > original Form and create the TForm from that so that the original Form
> > contents could be passed around to TeaParty participants in the
> > asynchronous manner of the TFormManager.  So now I guess the question
> > is:  will this method of creating a png only in memory and giving it a
> > fake URL cause some other unforseen problems?
> >
> > Thanks for any comments.
> >
> >
> > On 5/14/07, David Faught <[hidden email]> wrote:
> >> Hi,
> >>
> >> I have been slowly working on some enhancements to CCPainter for the
> >> Croquet Collaborative's KAT environment.  One of the improvements is
> >> the ability to repaint the texture from a "handmade" object that is
> >> already in the island scene, in a similar manner to how Plopp allows
> >> repainting.  I'm looking for some discussion on how this should work.
> >>
> >> When I repaint a texture from a "handmade" item that's in the scene,
> >> what I get back for a Form to paint is a "smallerPowerOfTwo" sized
> >> Form, not the size of the original painting.  I have the impression
> >> that's just how it's going to work, but I could be wrong.  Is this
> >> correct?  Anyway, I started down the path of just making sure that
> >> the
> >> original blank painting surface is already dimensioned by powers
> >> of 2,
> >> so that when it gets repainted, it comes out the same size.
> >>
> >> Currently for an initial painting started by the menu sketch item,
> >> the
> >> Tweak screen size is used as a starting point, then reduced by 100 in
> >> each direction mainly to make room for the navigation and dock at the
> >> bottom, then potentially/probably reduced to the smallerPowerOfTwo
> >> (smallerPowerOfTwo does each dimension separately).  That is taken as
> >> the painting size, then the CCPainter palette and bottom buttons are
> >> positioned around it.  This seems to work okay, but there may be some
> >> implications of this that haven't occurred to me yet, maybe depending
> >> on what the Tweak screen size is.  I guess that it's a little
> >> dangerous to assume that there is room for the palette, although the
> >> reduction by 100 in each direction seems to take care of this.
> >>
> >> -----
> >>
> >> After I wrote this, I though that it might be better if you could try
> >> it for yourself, so attached is a Monticello package and a changeSet
> >> (to hook into the KAT menus).  The changeSet also includes a fix from
> >> Andreas for a skinned button problem that affects CPainter.  Load
> >> these in a Collaborative or SDK image, start the KAT demo, then
> >> CCPainter will be in the New->Sketch menu item.  Try painting an
> >> object, put it in the scene, and then repaint it.  Let me know how it
> >> works for you.
> >>
> >> There is a Flash demo of a slightly older version of CCPainter at
> >> http://hedgehog.software.umn.edu/croquet/croquetMovies/ccpainter1.htm
> >>
> >> Dave
> >>
> >> P.S.  Please DO NOT attach to the Collaborative's server with this
> >> code loaded, use it only locally for now.
> >>
> >>
>
>