Sign in to follow this  

Rendering Edge on 3D Quad

This topic is 2046 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]
[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]

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

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 ;)

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
[quote name='Tom KQT' timestamp='1336629090' post='4938889']
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 ;)
[/quote]
[quote name='IceBreaker23' timestamp='1336629184' post='4938890']
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...
[/quote]

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

This topic is 2046 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this