nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Text brush with Noesis

23 Oct 2015, 18:04

I wonder if I can easily do something like this with Noesis, it will be very cool: http://codepen.io/tholman/pen/qCnfB How would I approach it? e.g. should I paint to texture? How to make noesis just render something *once*?
 
User avatar
jsantos
Site Admin
Posts: 4123
Joined: 20 Jan 2012, 17:18
Contact:

Re: Text brush with Noesis

24 Oct 2015, 12:53

Brushes following a path cannot be easily done in WPF or NoesisGUI. It is a limitation in the primitives supported. You can find a few tricks but none of them are straightforward techniques.

Of course we could implement it in the future, but right now this would be (low^2)-priority : )

Regarding "rendering once" the best way right now is using render textures (as described in the Unity tutorial) and after that disabling the Noesis component (to avoid redrawings). We are working in v1.3 to implement invalidating regions to improve redraws. But keep in mind what Unity clear the screen everyframe, so you need to cache the GUI in a texture.
 
nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Text brush with Noesis

31 Oct 2015, 00:23

Invalidating regions will be great! (top priority for me personally)
In my case, Unity does not clear the screen at all. I have a painting app and I set the camera to not clear anything, then I accumulate paint and only redraw changes to the scene (rectangles where painted.)
Having Noesis redraw everything, forces me to redraw a 2048x2048 texture every frame instead of a dirty region, e.g. 50x50 is the average.
Invalidating regions will be HUGE for performance and battery use, looking forward to it!
 
nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Text brush with Noesis

31 Oct 2015, 00:24

And thank you for the reply! I know Noesis team is busy with the new version! :)
 
User avatar
jsantos
Site Admin
Posts: 4123
Joined: 20 Jan 2012, 17:18
Contact:

Re: Text brush with Noesis

02 Nov 2015, 18:43

Problem is that although Unity is not clearing the screen (because I assume you are disabling in the camera) it is still ticking and presenting the frame. I think we cannot assume that the background is preserved and there is no way in Unity to only present a region to the front buffer. If you know how to do this please tell us.

So, I would say the solution is using a Texture where the UI is rendered and properly implement dirty regions. The plan is having this in the new renderer architecture.
 
nokola
Topic Author
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: Text brush with Noesis

07 Nov 2015, 19:41

Yes, I agree with "cannot assume that the background is preserved", however the system should allow the option of using the screen render texture as the target render texture for Noesis. In a similar fashion like we set the rendertexture to null in the Camera class.
This way apps that want to get the benefit of no extra texture and improved fill rate (no extra texture copy every frame) can do it. It will be a huge win IMO.
 
User avatar
jsantos
Site Admin
Posts: 4123
Joined: 20 Jan 2012, 17:18
Contact:

Re: Text brush with Noesis

10 Nov 2015, 14:26

Yes, that sounds good. If the user set the Target Texture property in the Camera then we can assume that the content is preserved.

Although, Unity will still render that texture per frame. Not sure how problematic is that from a point of view of performance and battery life.

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest