Jump to content

Just want it to be seen as intended


You are about to reply to a thread that has been inactive for 2649 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

Link to comment
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. =^-^=

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2649 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...