mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

Custom graphics, learning NoesisGUI

15 Jun 2023, 05:03

I'm rendering a lot of BezierSegment elements and I want to add a new feature to the control's graphics: being able to draw "borders" along either side of the BezierSegment (so I'd need to calculate an arbitrary number of bezier curves), and an ability to tile a texture that aligns with curve.
I'm working with Unreal.

What are my options to implement something ilke this? Are there any examples with Noesis and C++ that I can find?
And, more broadly, is there a comprehensive guide on working with NoesisGUI and WPF using C++ or is my best bet reading through WPF Unleashed and translating C# to C++ as I go?
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Custom graphics, learning NoesisGUI

16 Jun 2023, 19:39

I assume you already read all our C++ and Common tutorials?

https://www.noesisengine.com/docs/

We have support for Custom render that maybe useful in this scenario but I am going to need more detail about what you want to achieve to give you more specific help.
 
mshvern23
Topic Author
Posts: 35
Joined: 22 May 2023, 02:00

Re: Custom graphics, learning NoesisGUI

17 Jun 2023, 06:48

Thanks for your response. I have read through all of the docs, yes. I will do so again, but I don't remember there being an example of anything like what I'm trying to do.

I want to achieve two things:
1. Similarly to how there's stroke dash array for BezierSegment to control dashes along the direction of the curve, I'd like to have the same effect but on the perpendicular axis. See this for reference:



2. Align a fill allong the curve, similarly to how you'd do it in 3D:


Custom render sample does look promising but would lock me into something hard to control from XAML (e.g. if I want to use the nice Path Trim feature NoesisGUI implements, I have to do it all in code instead of just launching a simple storyboard).
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Custom graphics, learning NoesisGUI

20 Jun 2023, 19:49

1. This can be achieved with a custom control that exposes a BezierSegment property and calculates the required beziers for the borders. Then it uses OnRender to draw all the beziers with the appropriate stroke sizes.

2. I don't know if something like this could be achieved using a BrushShader, but is the only way you can have full control of what is rendered inside a path.

Who is online

Users browsing this forum: Google [Bot] and 5 guests