Page MenuHomeFeedback Tracker

[Feature Request] drawTriangle3D command
New, NormalPublic

Description

If the engine supports this, being able to draw 3D triangles would mean we could draw any 3D shape we want in the game dynamically! (with depth test support ofc, like drawLine3D, not drawIcon3D which has no depth test)

Sample syntax:

drawTriangle3D [p1, p2, p3, rgba, ...]

which draws a triangle with CCW vertex positions p1, p2, and p3. Thus the surface normal would be: (p2 - p1) x (p3 - p2) (or (p2 - p1) x (p3 - p1))

or a bit more advanced version:

drawTriangle3D [p1, p2, p3, ambientColor, diffuseColor, specularColor, specularIntensity]

which allows for basic phong shading as well :)

or an even more advanced version with texturing support:

drawTriangle3D [
   [p1, t1],
   [p2, t2],
   [p3, t3],
   "texture\path.paa",
   ambientColor, diffuseColor, specularColor, specularIntensity
]

where t1, t2, and t3 are normalized 2D texture coords.

Though I personally mostly need this for debugging purposes so even the first simple implementation will do! :)

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 updated the task description. (Show Details)Jan 26 2022, 2:30 PM
Leopard20 updated the task description. (Show Details)
Leopard20 updated the task description. (Show Details)Jan 26 2022, 2:37 PM
Leopard20 updated the task description. (Show Details)Jan 26 2022, 2:40 PM
h- added a subscriber: h-.Jan 26 2022, 6:15 PM