gotcha

Author Topic: 3D Card Game Perspective. Possible for Beginners?  (Read 924 times)

September 30, 2018, 08:36:04 PM
Read 924 times

Agrajag

  • Full Member

  • Offline
  • ****

  • 56
Our card game project is moving along nicely. All the cards and several other assets were all completed in Inkscape (about 300 different items). We're now working on completing the manual and we need several example graphics to convey how to set up the game, how certain game elements work, etc.

It's one thing to design cards and other stock that are meant for printing as those are all 2D elements. For the example graphics we need something with perspectives. Consider trying to draw an example of a poker hand with all hands laid out face-up on the table (including the deck). The cards need to appear to have some depth (or a trick for the draw deck to look like a deck) and the cards need to be different sizes (player closest to the "camera" has larger cards, player farthest from the "camera" has smaller cards. The cards need to go from rectangular to trapezoidal.

Is this perspective within reach of a beginner like me or way out of the range of simplicity? If it's reachable, what steps should I know about up front? Is there a tool to make these perspectives more.... automatic?Will I need to manually create four different versions of every card for display at each of the four different "seats" at the "table"?

Thanks!
  • Windows 10

October 01, 2018, 04:23:07 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well, if you've created 300 assets, including decks of cards, and if you drew everything, the back of the cards, the face cards, and all that, then maybe you're a little bit more than a beginner by now?

I started learning Inkscape with absolutely no experience with computer graphics of any kind.  So I always encourage Inkscape users to jump in with both feet.  There are tons and tons of resources to help, such as tutorials and the manual (a couple of manuals around).  And plus, we're always here to help if you get stuck.

So you want to create an image of something like a card table with a card game that has been dealt out.  I'm not clear if you want it to look like a hand of cards that are upright as if someone were holding a hand of cards, or if you want the hand of cards lying on the table.

To have all the cards on the table (pun not intended, but it does seem to fit!), you could use either Extensions menu > Modify Path > Perspective, or Path menu > Path Effects > Perspective/Envelope.  I find the path effect to be hard to use, and haven't really figured out an easy way to use it.  As far as I can tell, it's trial and error.  But the extension should be easy enough to use.  So that should cover the perspective issue.

For the 3D issue, it shouldn't be very hard at all.  To me, that would be the easy part.  You probably already have the skills to create the illusion of 3D, but you just haven't sorted out exactly how to put it together.  Give me a little while to catch up with all the forum messages, and I'll make an SVG file for you, showing how you could make a deck of cards and make single cards look real.

For the deck of cards, you might want to play with the 3D Box tool.  It can be confusing.  To make it less confusing, start by always using it in the middle of the page.  That's how it's set up.  You can change the handles (the horizons) so that it will draw a 3d box outside the page.  But if you don't remember what you did, the next time you use that tool....well as I said, it can be confusing!  But to start, just draw in the middle of the page borders, and it will draw 3d boxes perfectly.  I would suggest not to change anything on the control bar for 3d box tool, at least to start with.  Also, don't forget the manual will tell you how it works too.

That's not the only way to draw a deck of cards, but it's one way to start.  I'll be back before too long with an SVG file to give you some ideas.

Edit
Just re-reading your message, I forgot to answer your last question.  I would apply the Perspective extension to the whole table full of cards, rather than once for each of the four hands.  To use the Perspective extension, you have to combine everything into a huge compound path.  So I would only draw all the cards and the deck with just the outlines of everything.  After you apply the extension, and the paths are altered according to the skeleton path (which would essentially be the shape of the card table), then you would break everything apart, and apply all the styling - the numbers on the cards, the back of the top card on the deck, including all the 3d effects such as highlights and shading.  I'll show in the SVG file.

Edit #2
I just had a thought about the perspective path effect.  Maybe I figured out the key to using it.  If it ends up working, I'll show it in the SVG file too  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 01, 2018, 07:19:57 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok here's a little tutorial about using the perspective extension.  I was working on the SVG file which I promised, but Inkscape crashed when I hit undo, and lost everything.  So I got frustrated and decided to take a break.  But I managed to get a couple of screenshots so I can at least explain the perspective part (well, at least one way to do it).  And I'll get back to the 3d part after I post this.

1 -- Draw the outlines for everything.  Here's my quick little example.  Just ignore the trapezoid shape for now.

cg1.png
*cg1.png
(14.26 kB . 945x420)
(viewed 169 times)


2 -- Make sure there are no shapes or clones or groups.  Everything has to be a path.
3 -- Select them all, and do Path menu > Combine
4 -- Now draw the trapezoid.  You must start drawing it in the bottom-right corner, and go counter clockwise (and of course end there as well, making sure the path is closed).
5 -- Select both the combined path of all the outlines and the trapezoid.
6 -- Extensions menu > Modify path > Perspective  (there is no dialog for this extension - when you select it, Inkscape starts working)
7 -- After it's finished (might take 30 seconds or something like that) do Path menu > Break Apart.  And here's what my results look like.

cg2.png
*cg2.png
(21.11 kB . 916x418)
(viewed 172 times)


Looking at my results, I'm thinking my trapzoid maybe needed to be shorter or flatter.  But I guess you can get the idea.  Anyway, you can move the trapezoid out of the way now.  I wouldn't delete it, just in case you might need to use it on something else later.  Like I guess I would probably duplicate it, and make it a little larger, to become the actual table top.

And now you can start with the styling and the 3d effects.  There are probably many ways to create the illusion of 3d.  It depends on how realistic you want it to be.  Well anyway, I'll get busy on that again now.  Maybe I can even figure out the LPE..... :-S
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 01, 2018, 09:20:49 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, here's an SVG file.  So you can "take apart" the cards where I've created my version of 3d for playing cards.  Other people may have a different type of vision and use different techniques.  Rather than explain everything I did, you can just examine everything and ask me questions if you can't figure something out.

The corners on the deck were made with the Stitch Sub-Paths LPE.  The manual explains how to use it, or I could help  if you can't figure it out.  I don't know if you would want to use a simulation of stacked cards for the deck.  Maybe you would just use a box type of object to represent the deck, without all the lines to simulate the cards.

For the single card, I did 2 things to give it a 3d appearance.  First, I applied a gradient to the stroke with zero opacity in the top-left corner, and gradient down to a blue-gray color bottom-right.  Just that by itself works pretty well.  But I also made a very slight drop shadow by duplicating the card, giving it a darker and grayer fill color, remove the stroke, move to the bottom, down-arrow key then right-arrow key, to shift its position slightly, then finally, a 2% blur.

Hhm, I just realized that I have the lighting backwards.  For the single card, the light comes slightly from the left, and for the deck, it's coming from the righ.  Oh well, at least you can get the general idea.

Any other questions, just ask.  There's a lot more in the file than what I've explained, but I don't know how much you've learned, exactly.  So just ask if there's something you can't figure out.

Oh, almost forgot.  Over on the right side, probably outside the page border (which I have hidden) I figured out how to use the Perspective/Envelope LPE.

First, I would use guides to set up the table size, to help keep the perspective in good proportions.  (Enable guides in my file and you'll see what I did.)  Start out just like for the extension.  Make outlines of everything and combine them all into a large compound path.  Select, then apply the LPE. 

Nothing happens yet, that you can see.  But switch to the Rectangle tool, and you'll see 4 tiny diamond shaped....I guess they are handles, in the corners of the still selected outlines.  Notice that they represent those x and y coordinates that you see in the LPE dialog.  And when you move the handles, the x and y values in the dialog change.

Using the guides that you set up, you can move those diamond handles, and then you can see that your outlines are being warped.  By the time you have all 4 handles in place, you'll see the objects are changed into a perspective effect.

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 02, 2018, 01:11:25 AM
Reply #4

Agrajag

  • Full Member

  • Offline
  • ****

  • 56
So you want to create an image of something like a card table with a card game that has been dealt out.  I'm not clear if you want it to look like a hand of cards that are upright as if someone were holding a hand of cards, or if you want the hand of cards lying on the table.

Laid out on the table, just as you did it. I had been thinking (for some reason I'm not getting notifications from this forum) while waiting for a reply, that I could just draw everything as a 2D "overhead" view and then use some sort of tool to "stretch" that view into the right "3D" perspective.

Your example is fantastic. The only think missing is to add some sort of card "thickness" to make the draw deck look realistic and to slightly adjust the cards so they look less uniformly laid out (this one is minor).

Quote (selected)
if you drew everything, the back of the cards, the face cards, and all that, then maybe you're a little bit more than a beginner by now?

Well, much of the art was done by a graphic artist and I just took the PNGs and imported them into each Inkscape card. The title, card number, flavor text and some other small bits are all me including the layout, so it's getting there, but certainly nothing that will lead to a second career in graphic arts. heheh.

I'll need to absorb the last post for a bit. I had assumed I'd want to essentially take 2D cards already fully designed, and then just change the perspective of the "overhead" view all in one go. I'm not sure how I would add all of that after that fact to the "cards" in your last image.

Thanks so much for all this, as usual. Attached is a rough PNG of a raw card.

« Last Edit: October 02, 2018, 02:59:07 PM by Agrajag »
  • Windows 10

October 02, 2018, 04:02:08 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
(for some reason I'm not getting notifications from this forum)

You can either click Notify button for each topic which you want to be notified about, when there's a reply.  It's in the same row of buttons as the Reply button.  Or you can go to your Profile tab > Modify Profile > Notifications, to configure more options.  So it doesn't happen automatically.  You have to set it up.

I know, I wish there was a better solution for creating perspective.  Maybe someone else knows about another solution?

I've tried using the LPE with groups and shapes.  It does let you apply the LPE, but moving the handles doesn't change anything.  It's possible that I have not discovered everything about the LPE, but I'm quite positive that I've told you everything about how the extension works.

As far as the extension, you could easily just tweak each card in the hands to make the card look less stiff and perfect, after all the styling is finished.

If anyone else knows of a better solution for perspective, please jump in!

I wonder if a raster editor would have something for this.  So you could just take a PNG export of the table that's all laid out with the cards, with all the styling already applied, and "warp" that PNG (or possibly JPG).  I mean, just how you were thinking.

You could look at GIMP, which is an open source raster graphics editor.  It might have a solution for this?


  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 02, 2018, 02:06:08 PM
Reply #6

Agrajag

  • Full Member

  • Offline
  • ****

  • 56
You can either click Notify button for each topic which you want to be notified about, when there's a reply.  It's in the same row of buttons as the Reply button.  Or you can go to your Profile tab > Modify Profile > Notifications, to configure more options.  So it doesn't happen automatically.  You have to set it up.

Yeah, I have both set. The Notify button in the thread is now saying "Unnotify" so that's set and my profile is set to Instant notification, but they're not getting here and I see nothing in Spam in or trash. Will keep looking.
  • Windows 10

October 03, 2018, 09:49:11 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oohhh....  I think it's a temporary problem.  I'm sorry I didn't put it together with your problem right away.  The last few days there's a problem with email from my host.  I'm hounding them to look into into it, but....  Well, suffice it to say that as soon as I have some spare time, I'll be moving us to a new host.

Anyway, I apologize, and I'll ramp up my noise to them.  Hopefully we'll get it fixed today.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 03, 2018, 10:46:41 AM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I think it's fixed now.  Are you getting notifications yet?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 03, 2018, 04:47:27 PM
Reply #9

Agrajag

  • Full Member

  • Offline
  • ****

  • 56
I think it's fixed now.  Are you getting notifications yet?

I did indeed find out about THIS post from a notification. Thanks!
  • Windows 10

October 03, 2018, 10:40:42 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
 :whw:  Whew!

Thanks for letting me know.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann