Impresario Beaumont Posted December 22, 2023 Share Posted December 22, 2023 I've written a game that involves the display of playing cards on a table. It's working fine except that i use one prim for every card on display. I've come across a number of table card games where the card images appear to be part of a mesh that's linked to the table. Does anyone know how that's done? 1 Link to comment Share on other sites More sharing options...
elleevelyn Posted December 22, 2023 Share Posted December 22, 2023 4 minutes ago, Impresario Beaumont said: I've come across a number of table card games where the card images appear to be part of a mesh that's linked to the table a mesh can have upto 8 faces, each with its own (card) texture. Two linked mesh gives 16 faces, etc 1 Link to comment Share on other sites More sharing options...
Marvin Benelli Posted December 22, 2023 Share Posted December 22, 2023 And now for the good news: https://marketplace.secondlife.com/p/Parz-8-face-Mesh-Plane/6777430 1 Link to comment Share on other sites More sharing options...
Chic Aeon Posted December 22, 2023 Share Posted December 22, 2023 The marketplace link isn't what you want as far as I can tell. You would need up to seven cards all in one mesh. The card on each face would be a different material (a 3d modeling term that represents a texture you could put on it). ONE material would be needed for the edges of the cards and perhaps one for the back of the cards depending on your game. So six or seven cards could be one mesh object which could be .5 land impact. You could link two mesh objects like this to be 1 land impact. FROM THERE you would use scripting to change the faces of the cards (I am assuming that is part of the game). So you need someone to make the mesh to order and someone to script -- unless the same person can do this or you can :D. Not terribly simple but possibly not too hard either depending on what you want to do. So maybe post more info in the wanted section if you need someone to help --- or maybe this was enough info to answer your question. Good luck. 1 Link to comment Share on other sites More sharing options...
Qie Niangao Posted December 22, 2023 Share Posted December 22, 2023 (edited) 3 hours ago, Chic Aeon said: ONE material would be needed for the edges of the cards and perhaps one for the back of the cards depending on your game. So six or seven cards could be one mesh object which could be .5 land impact. I think eight cards could still be in one mesh. The edges could be part of the texture for the card faces (front or back) wrapped around the card's UV map, and depending on the situation each card is either on the table showing either front or back, or attached in a "hand" showing both front and back, in which case the back is part of each card's texture, same as the edges. It's kind of a shame to spend resolution on duplicating the card back image for each card value, so that would be a tradeoff with Land Impact (as so many things are). If they're really held in a hand as an attachment, Land Impact is no big deal anyway, but there's an extra complexity: both front and back of an individual card must be made invisible simultaneously when the card is "played" from the "hand", so either each card back is its own side (one card-back image per card), cutting the count to four cards per mesh, or the back would have one side textured with up to seven card back images in one texture which would mean relatively low-res card backs in an attachment: not ideal. [EDIT: That's confusing, sorry. The "hand" is just fine as described in the bullet, up to eight per attached mesh, where the card image includes both front and back, spending that resolution on duplicating the card back image for each card front value. When the card is "played" the whole card goes transparent, both front and back the same material. Trying to save that resolution is where the options get messy, either fewer cards or ugly card backs.] Edited December 22, 2023 by Qie Niangao 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 22, 2023 Share Posted December 22, 2023 8 hours ago, Chic Aeon said: So maybe post more info in the wanted section if you need someone to help --- or maybe this was enough info to answer your question. Good luck. Actually, the InWorld Employment forum. 😏 4 Link to comment Share on other sites More sharing options...
Impresario Beaumont Posted December 22, 2023 Author Share Posted December 22, 2023 Thank you so much for the overwhelming responses to my question. For my purposes, I only ever display one side of the cards as they lie on the table, either face up or face down. the sides can be invisible. I'll work with the suggestions made and see where it leads me. I'm a pretty competent scripter, but my Blender skills are minimal, A further complication is that I want the cards to overlap as they are dealt out to save table space. I've accomplished all that by having each card as a separate object and shrinking the card and texture as I deal the overlapping cards, but that comes at a very high prim cost as you can imagine in a multi-player game. Thanks again, everyone. It's a challenging, yet interesting problem to solve! 1 Link to comment Share on other sites More sharing options...
Chic Aeon Posted December 22, 2023 Share Posted December 22, 2023 10 hours ago, Qie Niangao said: I think eight cards could still be in one mesh. The edges could be part of the texture for the card faces (front or back) wrapped around the card's UV map, and depending on the situation each card is either Never meant to suggest that they wouldn't be one MESH -- just each card a different material so that scripting would be easier. Sorry if I wasn't clear. I am assuming that different cards would come up at different times and there were be a variety of textures that could be pointed to in order to display the certain CARD in the certain PLACE. I have done this many times on home and garden items. 1 Link to comment Share on other sites More sharing options...
Qie Niangao Posted December 22, 2023 Share Posted December 22, 2023 @Chic Aeon Right, I probably wasn't clear either. I was referring to the limit of eight materials per mesh and was compulsively squeezing one more past "up to seven cards all in one mesh"—although this probably isn't bridge and seven may be all the cards anybody could want in one place! Link to comment Share on other sites More sharing options...
Chic Aeon Posted December 22, 2023 Share Posted December 22, 2023 28 minutes ago, Qie Niangao said: @Chic Aeon Right, I probably wasn't clear either. I was referring to the limit of eight materials per mesh and was compulsively squeezing one more past "up to seven cards all in one mesh"—although this probably isn't bridge and seven may be all the cards anybody could want in one place! Well you are right about using a border on each card for edges. I guess I was thinking that having an separate material for the edges might be wanted - needed depending on the game (like touch a card and the border changes color?). So really all depends LOL. I really don't LIKE texture changing scripting and such but I DO it now and then to keep in practice. AND I almost always put all the textures of an object on one texture plane so THAT I do understand well Link to comment Share on other sites More sharing options...
elleevelyn Posted December 23, 2023 Share Posted December 23, 2023 14 hours ago, Impresario Beaumont said: A further complication is that I want the cards to overlap as they are dealt out to save table space the mesh is typically crafted for the specific game. I leave you to ponder on how you might get this done but if was me in this 8-9-A game 8 would be a card size face. Overlaid (half-way) with a same size face for 9, and a 3rd face overlaid for the A. Extending this for however many face-up cards there are in the hand then I would make 1 big texture with all 52 face cards on it laid out in a regular sized grid. And script llSetPrimitiveParams PRIM_TEXTURE offsets, to display the cards on the faces as they are dealt begin: Face 8, 9, A - all faces transparent Deal 8: Display 8. 9, A faces transparent Deal 9: Display 8, 9. A face transparent Deal A: Display 8, 9, A . - As above image you can do a flip effect as well. Like when 8 is dealt. Display the back of the card on the 8 face. then after some small time flip it - display the 8 card 1 Link to comment Share on other sites More sharing options...
Impresario Beaumont Posted December 24, 2023 Author Share Posted December 24, 2023 I've got it working. Thank you so much for all the advice!!! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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