Jump to content

Sabrina Tamerlane

Resident
  • Posts

    130
  • Joined

  • Last visited

Posts posted by Sabrina Tamerlane

  1. 5 hours ago, Wulfie Reanimator said:

    Well, I wasn't exactly responding to you, I was more focused on the math they were explaining, to explain to them how SL offsets affect their (kind of correct) math.

    You don't need that math since you've just figured them out by hand (which is fine, I need a lot of fumbling as well). The texture rotation is only necessary depending on which way the face is rotated. I assume you're using cube prims, so if you haven't rotated the cubes at all, the side that's visible on your HUD is the object's west surface (negative X direction).

    I'm using a mesh I made with Blender. Probably I could have done it in such a way that it is easier to texture, but hey it works now...

    • Like 1
  2. 36 minutes ago, Da5id Weatherwax said:

    Depends if the mesh was designed to be an easily textured HUD or not. To use the trivial example of 8 square buttons that make up a single planar mesh you make one button first. Look at it straight on in blender, down the appropriate axis and UV unwrap it as "project from view (bounds)" Your square button will fill the entire UV map, give it a square image as a texture inworld and it will be no different from texturing one face of a cube. To make the 7 other buttons, go back into edit mode and duplicate the first 7 times, arranging the dups how you'd want the buttons laid out on screen. - Now you've got 8 buttons, each with the same square UV mapping, all buttons overlaying each other in the map. Now assign a different material to the two tris making up each button. Those 8 buttons are now 8 faces in SL and can be textured independently, each with its own square texture. If you want to use a texture atlas with all the button faces in one texture just with different offsets you can - exactly the same way as if you were wanting the different parts of your texture atlas to appear on different faces of a prim.

    Identical methodology applies to buttons of any arbitrary shape. You don't have the issues of unwrapping a curved shape like you do with a 3d object that can be viewed from any angle. A planar mesh hud only ever interacts with Mr A Square of Flatland and is only ever viewed down one axis so you use "project from view" to make the hud shapes look EXACTLY like they would on the screen in the UV map - because there's no geometry to see other than from that angle. Then you just stack as many of these planar meshes as you need on top of each other inworld (with a small offset to ensure no z-fighting) and link them to create the HUD object - the "depth" of the stack makes no difference to the HUD displayand it remains as easy to texture as a HUD made of prims.

    Thank you but using 8 textures is not very efficient... I am using a tilemap, which works nicely and smoothly but this is what is difficult to setup properly :)

    This is how it looks like:

    image.png.bb3e74acc9e08ef17be65fdc40a92821.png

     

    I can put any icon on any face with just one texture...

  3. This is an AO HUD i am currently making... You can fold it by pressing the bottom left button. This is not my idea, many HUDs behave like that...

    image.thumb.png.fb8b327e99a3b0d3b26932e9e9d3ae0b.png

    1 hour ago, Da5id Weatherwax said:

    A planar mesh button (or group of buttons, even just relying on face detection rather than detecting where on the face you click you can still have 8 functional buttons in a single mesh) rotated on its side to hide it isn't just "invisible", it's gone, takes up no screen space - do remember to make sure you have something to "show" it again that stays visible - because you CANNOT click on the faces of a planar mesh when its edge-on to you.

    This is a good idea! I didn't think about rotating it... Mesh HUDs are very difficult to texture properly and I will have to return to Blender  but I can do this!

  4. It is more complicated to explain than to write so here is how I would do it:

     

    integer ElapsedTime = 0;
    integer Running = FALSE;
    
    default
    {
        state_entry()
        {
        }
    
        touch_start(integer total_number)
        {
            if (Running)
            {
                llSetTimerEvent(0) ;
                Running = FALSE;
            }
            else {
                llSetTimerEvent(1) ;
                Running = TRUE;
            }
        }
        
        timer() 
        {
            llOwnerSay((string)ElapsedTime) ;
            if (ElapsedTime > 0 && ElapsedTime % 3 == 0) {
                llOwnerSay("3 seconds timer") ;
            }
            if (ElapsedTime > 0 && ElapsedTime % 7 == 0) {
                llOwnerSay("7 seconds timer") ;
            }
            ElapsedTime++ ;
        }
    }

    If you need more precision you can use one of the time functions such as llGetTime() to read the time directly... but of course they have a cost and might slow you down...

    • Like 1
  5. In the list of bones the top one is the root. It should be named mPelvis which is a synonym in SL for hip. You have to be in Pose Mode and select it then move it. I remember the R key is for rotation but can't remember the right key for translation sorry... is it G? You should also be able to use the gizmos, I don't animate with Blender so that is about as much as I know about it...

  6. If you like cyber punk you should visit Contraption...


    ETA: it is more steampunk my mistake but some items can be used in cyberpunk I think...

    • Like 1
  7. 1 minute ago, chrixbed said:

    I try to apply this on all the prim that Avatar will sit on by modifying only llSitTarget() and not call the rotation for the prim it self. But his case is not working.

     

    You can verify with this:

     

     llSetLocalRot(ZERO_ROTATION) ;
     llSitTarget(<0.0, 0.0, 0.4>, ZERO_ROTATION);

    If the avatar is not facing the root prim then you need to make some corrections, in my case I ended up with this, which is quite similar to Rollig's code:

     

    llSitTarget(<0.0, 0.0, 0.4>, llEuler2Rot(<0.0,0.0,PI/2>)*ZERO_ROTATION/llGetLocalRot());

     

  8.  

    Second Life was advertised like that: if you want to be "someone else" than who you are then come to Second Life and make yourself a new personality... Does it mean if you are sailor in real life you can become an architect or does it mean you can become someone with different skin color, gender, or even a non-human? Naturally it can be done wrong, the purpose is to to leave your comfort zone and explore new things...

    • Like 3
×
×
  • Create New...