SVG Renderer questions
I was wondering, does the svg renderer in noesis actually render svg or does it rasterize and render a texture?
If it renders svg would it be possible to have it render in world space instead of screenspace without resorting to render to texture?
I ask because noesis seems to be the only svg renderer available for Unity that works and is in active development
If it renders svg would it be possible to have it render in world space instead of screenspace without resorting to render to texture?
I ask because noesis seems to be the only svg renderer available for Unity that works and is in active development
Re: SVG Renderer questions
noesisGUI renders directly using triangles, yes. You have the option of using a Render Texture, but the component attached to the camera renders directly to the main screen surface.
What do you mean with world space? You can apply 3d-projection to any element to apply perspective. Is that what you want?
What do you mean with world space? You can apply 3d-projection to any element to apply perspective. Is that what you want?
Re: SVG Renderer questions
Yes I'd like to render it with perspective, but what I would ideally like is to be able to attach it to a gameobject and have it render whereever the gameobject is (i.e. using its transform).
More importantly could you please confirm, can noesis render an svg file? I ask because the vector (lion) demo in place is using a xaml file with vector coordinates.
More importantly could you please confirm, can noesis render an svg file? I ask because the vector (lion) demo in place is using a xaml file with vector coordinates.
Re: SVG Renderer questions
This is the way RenderTexture works with gameobjects. Although if you have a lot of them it can be inefficient (as discussed here viewtopic.php?f=3&t=266).Yes I'd like to render it with perspective, but what I would ideally like is to be able to attach it to a gameobject and have it render whereever the gameobject is (i.e. using its transform).
The alternative, as you said, is using perspective and updating the transform each time the gameobject moves. There are several problems with this approach:
- Culling is not implemented. If the object is out of camera, the GUI is still sent to the GPU
- Although the perspective can be achieved, our GUI does not interact with the zBuffer provided by Unity.
Not directly (although a custom control that understand svg could be implemented) but you can convert the SVG to Xaml and render it (as shown here viewtopic.php?f=12&t=188)More importantly could you please confirm, can noesis render an svg file? I ask because the vector (lion) demo in place is using a xaml file with vector coordinates.
- markeahogan
- Posts: 1
- Joined:
Re: SVG Renderer questions
Hi could you go into a bit more detail about how you'd pass the position/rotation from the gameobject to the transform? I need my UI to line up 1:1 with the 3D, but culling is not important
Re: SVG Renderer questions
Yes, there is a sample of 3D projection inside the Control Gallery (NoesisGUI\Samples\ControlGallery\Samples\Projection.xaml). That sample is using a PlaneProjection to set up the perspective transform:
So basically you have to get those values from the transform of your gameobject and set them to the root container of your XAML.
Code: Select all
<PlaneProjection x:Key="ProjMtx"
CenterOfRotationX="{Binding Value, ElementName=CenterX}"
CenterOfRotationY="{Binding Value, ElementName=CenterY}"
CenterOfRotationZ="{Binding Value, ElementName=CenterZ}"
RotationX="{Binding Value, ElementName=RotX}"
RotationY="{Binding Value, ElementName=RotY}"
RotationZ="{Binding Value, ElementName=RotZ}"
LocalOffsetX="{Binding Value, ElementName=OffX}"
LocalOffsetY="{Binding Value, ElementName=OffY}"
LocalOffsetZ="{Binding Value, ElementName=OffZ}"
GlobalOffsetX="{Binding Value, ElementName=GOffX}"
GlobalOffsetY="{Binding Value, ElementName=GOffY}"
GlobalOffsetZ="{Binding Value, ElementName=GOffZ}"/>
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest