Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Rendering Edge on 3D Quad


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Tonyyyyyyy   Members   -  Reputation: 110

Like
0Likes
Like

Posted 09 May 2012 - 10:03 PM

I want to use textures on quads in my game instead of an actual model (for the HUD), so what I currently do is I make a quad, draw the texture on to it, and then rotate it a bit. However, this gives the impression that the tool is flat and 2D, and doesn't have any width to it.
The best example I can think of is probably Minecraft. If you hold a tool in Minecraft (such as a pickaxe), the texture is drawn and it has an "edge". The color of the edge isn't just a random color, but rather it is about the same color of the edge on the actual face of the tool.

Images:
Edge highlighted:
Posted Image
Full image:
Posted Image
How can I do this with XNA?
As stated before, I currently construct a quad and render an image to it.

Edited by Tonyyyyyyy, 09 May 2012 - 10:12 PM.


Sponsor:

#2 Tom KQT   Members   -  Reputation: 1622

Like
0Likes
Like

Posted 09 May 2012 - 11:51 PM

I'm quite sure in Minecraft it isn't a textured quad but a 3D model.
And I cannot think of any way how to "fake" those sides in DX9 (XNA) without actually having them in the model - but that doesn't mean such a way doesn't exist ;)

#3 IceBreaker23   Members   -  Reputation: 618

Like
0Likes
Like

Posted 09 May 2012 - 11:53 PM

There are 2 ways to achieve this:
-create a mesh for every weapon
-make a voxelsystem:
I think in minecraft the texture is getting voxelized(is this a word?^^)

I can´t think of any other possible way...

#4 Tonyyyyyyy   Members   -  Reputation: 110

Like
0Likes
Like

Posted 10 May 2012 - 12:23 AM

I'm quite sure in Minecraft it isn't a textured quad but a 3D model.
And I cannot think of any way how to "fake" those sides in DX9 (XNA) without actually having them in the model - but that doesn't mean such a way doesn't exist ;)

There are 2 ways to achieve this:
-create a mesh for every weapon
-make a voxelsystem:
I think in minecraft the texture is getting voxelized(is this a word?^^)

I can´t think of any other possible way...


I took a look in MCP a bit, and it appears that Notch draws quads with a "cross-hatching method". By that, I mean I think he draws 16 horizontal and 16 vertical quads, and that allows for the thickness.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS