Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [3D] Grid lines on a plane

Author
Message
Carharttguy
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 28th Mar 2017 14:51
Hello

I want to draw grid lines on a 3D plane, like you can see in most 3D modeler software. See this image:


What I'm thinking while I write this post:

-Create an image of a square with a white border
-Apply this image as texture to the plane in repeat

Or is there a better method to draw on 3D objects?

If this would be a good method, how do I measure the image? I want the grid lines to be 1 AppGameKit unit apart. How many pixels should my square be to accomplish this?

Thanks!
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Mar 2017 15:00 Edited at: 28th Mar 2017 15:01
Quote: "-Create an image of a square with a white border
-Apply this image as texture to the plane in repeat"

I'd do this as we don't currently have a Draw3DLine command yet. (Or even a wireframe command)

Quote: " I want the grid lines to be 1 AppGameKit unit apart. How many pixels should my square be to accomplish this?"

Create a plain 10x10 units, scale the image 10x10. There you go.
Signature removed by mod because it's larger than 600x120... please resize and try again.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 28th Mar 2017 16:43 Edited at: 28th Mar 2017 16:43
if you will use drawline as help you can use GetScreenXFrom3D GetScreenYFrom3D but it will be more an overlay.
AGK (Steam) V2017.02.28 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)

Login to post a reply

Server time is: 2024-11-24 16:24:17
Your offset time is: 2024-11-24 16:24:17