0
Under review

How to render grass and chalk lines easily

Michael Powell 5 years ago in Question updated 5 years ago 3
Hello,

I am taking a look at some options how to render grass, for instance as a texture, overlaid on a model, like a RectangleVisual3D and/or polygonal-surface, for instance, then in such a way that I can also render chalk lines, identify some material, etc, that simulates chalk lines, in both lines (or small rectangles themselves), and for font-materials (if there were such a thing? haven't done the research there, yet...).

I've found some tutorials how to work through apps like Paint.NET, GIMP, etc, in order to crank out some grass textures. Basically what's I would consider low to low/medium end quality. Not really looking for medium/high to high end quality at this point for this purpose, nothing even remotely like a Cinema 4D, for instance.

I am also taking a look at Unity3D for potential options there, they can generate grass, but this looks more like a full-fledged game-style development environment. Which might be along the lines what I'd like to do, especially with simulation for sprites, physics, etc. I'm not positive, SharpDX an analog to Unity3D, but it came up looking for grass and related effects.

Anyhow, for now, looking for the configuration aspects and what I can accomplish with a simpler-generated model.

Thank you...

Best regards,

Michael
SharpDX WPF Media3D
Under review
yes, you could create simple (flat) grass by adding a texture to a rectangle. For the chalk lines you could try adding rectangles/or a mesh with chalk texture slightly hovering above the grass rectangle.

You could also combine the grass, chalk lines, text and other symbols on the same texture (make it large) and simply add one rectangle. This is a more static solution...
Came up with a working solution, and it was easy, and quite intuitive using Xaml nested objects.

In one of the Xaml blocks:

<h:RectangleVisual3D>
<h:LinesVisual3D Color="WhiteSmoke" />
</h:RectangleVisual3D>

And here's the example in action. Don't mind the yellow part, that's an unconfigured Goal Post. But the diagonal is from 0,0,0 to 10,10,0, and it renders quite nicely atop the rendered field.

Well I may have spoken a smidgen too soon. Turns out there are some rendering nuances when increasing the thickness. A broad rectangle is more appropriate, and that starts smudging with the field. So as was suggested (thank you!), orient it just a touch above the field. That approach should work, then it's a matter of arranging the geometry accordingly.