Jump to content
  • Advertisement
Sign in to follow this  
Tonyyyyyyy

Rendering Edge on 3D Quad

This topic is 2265 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[color="#333333"]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.
[color=#333333]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.

[color="#333333"]Images:
[color=#333333]Edge highlighted:
[color=#333333]7j32v.png
[color=#333333]Full image:
GhXOE.png
[color=#333333]How can I do this with XNA?
[color="#333333"]As stated before, I currently construct a quad and render an image to it. Edited by Tonyyyyyyy

Share this post


Link to post
Share on other sites
Advertisement
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 ;)

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!