Jump to content
Sign in to follow this  
CordeliaDeLear

Just want it to be seen as intended

Recommended Posts

Is there any way, if you send an image (texture) to someone, to force it to be viewed by the recipient in its original aspect ratio (or close enough) so that the recipient doesn't have to fiddle around with viewer sizing?

Share this post


Link to post
Share on other sites

Uploads will always be powers of 2 and most clients will set the aspect ratio accordingly.  So 512x512 will default to 1:1 and 256x512 will default to 1:2.  Your mileage may vary depending on the viewer they're using.

If you want to achieve any aspect ratio by 'force' you'll need to apply the texture to the face of a prim.  A HUD attached cube can work well.  (^_^)

When scaling a HUD, the size in meters becomes a percentage of the vertical in-world window.  So, say you're after a 4x6 portrait to fill half the screen.  Set vertical to 0.5 and horizontal to 0.33 (Vertical and horizontal can be any combination of X, Y, or Z depending on rotation).  (^_^)y

Share this post


Link to post
Share on other sites

Just to quell some early morning boredom, I whipped up a script which will do the maths accordingly.  Just set the description to the values separated by commas.  So, 4x6 at 50% of the screen will have a description of "4,6,0.5". (^_^)y

default{    state_entry()    {        string descContent = llList2String(llGetObjectDetails(llGetKey(),[OBJECT_DESC]),0);        list eachItem = llParseString2List(descContent,[","],[]);        integer itemQuan = llGetListLength(eachItem);                if(itemQuan < 2)        {            llOwnerSay("Description Err");            return;        }                float hudVertical = 0.5; //Default Height        float imgVertical = llList2Float(eachItem,0);        float imgHorizontal = llList2Float(eachItem,1);        if(itemQuan >= 3) hudVertical = llList2Float(eachItem,2);        float hudHorizontal = hudVertical * (imgVertical / imgHorizontal);        vector primSize = <0.01,hudHorizontal,hudVertical>;                llSetLinkPrimitiveParamsFast(LINK_THIS,[        PRIM_ROTATION,ZERO_ROTATION,        PRIM_SIZE,primSize        ]);    }        on_rez(integer StartParameter)    {        llResetScript();    }}

***Not saying this is a good or right way.  Just bored and had some time to fill. =^-^=

Share this post


Link to post
Share on other sites

Only way to have the image automatically appear in its original ratio, without the receipient to do anything goes like this:

1. In your image editing program create a new file with aspect ratio closest to the image you need to be viewed corrrectly (the simplest one is 1:1 ratio I think);

2. Fill that image with black;

3. open your desired photo and copy/paste it to this new document, center it to look nice;

4. flatten and save. 

You will have an image with black borders on top and bottom. 

 

Another way is to crop your image in one of the ratios that the viewer uses and, while uploading the photo, write the correct ratio in the description of the texture.

Share this post


Link to post
Share on other sites

Thanks Tamara, I must admit that I hadn't thought of that trick. Of course, if it is a long way from 1:1 it can look pretty ugly but it is worth thinking about and, of course, you don't have to use black ;)
Thanks ImnotgoingSideways, I don't have any problem dealing with sizing for objects, I often create artwork for my walls and I just never thought of sending people a prim, as opposed to a texture.
I guess I didn't think enough ;) However, I still think that, in a complex game like this, there is no reason that a texture can't be displayed automatically in its original aspect ratio (or that determined by the creator) or close enough.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...