GamingPo
Topic Author
Posts: 7
Joined: 12 Sep 2024, 05:25

3d Render

08 May 2025, 21:39

Hello, how are you?

I'm developing my UI, and I did it in the model where only one CreateView is created and from it I load several ContentControls HUD, menu, inventory, character information, chat, among others

My problem is in the part of rendering the 3D models, today I already render them but they are at the end of the entire interface, my question is, is there any way to know if the UserControl of each .xaml that I loaded as a "window" occurs an update and renders? Because that way I would be able to render my models correctly for each window

I'm in C++
 
GamingPo
Topic Author
Posts: 7
Joined: 12 Sep 2024, 05:25

Re: 3d Render

09 May 2025, 15:57

Can anyone help me with this? I've done a lot of research and even used AI, and the answers are strange. I managed to use OnRender, based on Sample Custom Render, to render the 3D models, but they were behind the window. I was able to see the 3D models through the renderdoc, but they were there, but behind the grid window that I drew.

I saw some solutions with AI that recommend making a custom user control for rendering, but I didn't get any results. I hope someone can help me with this or explain a possible way. If not, I'll have to make several Views using CreateView and make a loop to give Render UI and Render 3dModel.
 
User avatar
Killian
Posts: 16
Joined: 14 Jul 2022, 12:32

Re: 3d Render

10 May 2025, 13:09

I'm not sure I fully understand what you're trying to achieve, my best guess is you aim for rendering scene models onto your UI layer, is that so?
If yes you can easily render contents of any other camera to texture and use that as a resource in your user interface. We did that with character avatars and inventory items. Simply place them somewhere way off the player-camera-reachable area and render them to a texture using a second camera. You then can use that texture map with proper UV coords to "extract" your designated 3D contents.
 
GamingPo
Topic Author
Posts: 7
Joined: 12 Sep 2024, 05:25

Re: 3d Render

10 May 2025, 15:14

I'm trying to render 3D models on top of a UI. I have several .xaml files using usercontrols. I had created a method where each .xaml file created a createview and when rendered, I rendered the 3D model on top of the UI and it was normal. But I changed it to try to do it the "correct" way, where there is a mainpage "view" and the contentcontrols are in it to render the other .xaml files. Now I'm having this problem when showing the 3D objects because they are always behind the UI.
 
User avatar
jsantos
Site Admin
Posts: 4350
Joined: 20 Jan 2012, 17:18
Contact:

Re: 3d Render

12 May 2025, 15:31

I'm not sure if I fully understand what you're trying to achieve, but let me offer a few suggestions that might help.

Views are rendered atomically, meaning you can't insert your own native 3D rendering calls between elements of a single view. To do that, you'll need to split your content into multiple views.

Here’s a typical rendering sequence:
1. Clear framebuffer
2. Render View 0
3. Render 3D model
4. Render View 1
If you're rendering 3D UI (setting aprojection matrix in the view), one approach is to render your 3D objects first and have them write to the depth buffer. Then, render your UI view afterward with the RenderFlags_DepthTesting flag enabled. This will allow your 3D objects to occlude the UI properly based on depth.

If this isn't quite what you're looking for, please provide more details, screenshots would be especially helpful to better understand your use case.
 
GamingPo
Topic Author
Posts: 7
Joined: 12 Sep 2024, 05:25

Re: 3d Render

12 May 2025, 17:28

Yes, you understood correctly. Currently, I render my UI like this:
View 1
→ 3D Model Render
View 2
→ 3D Model Render
View 3
→ 3D Model Render
... and so on

I originally thought it wasn’t recommended to use multiple views, so I tried to unify everything into a single View, and then load/render different screens (HUD, menu, inventory, etc.) using ContentControl.

Given this, do you recommend that I go back to using multiple views (one for each screen) so I can correctly render the 3D models per view?

Thanks in advance!
 
User avatar
jsantos
Site Admin
Posts: 4350
Joined: 20 Jan 2012, 17:18
Contact:

Re: 3d Render

13 May 2025, 18:28

I am still confused about this:
View 1
→ 3D Model Render
What 3D model are you rendering inside the View because you can't render 3D-models with Noesis.
 
GamingPo
Topic Author
Posts: 7
Joined: 12 Sep 2024, 05:25

Re: 3d Render

13 May 2025, 19:54

my own 3D models of the game, my game's inventory is made of 3D objects for example... in some areas of the game I render a 3D character on top of the UI, until today I used each .xaml a createview, then I tried to adapt it to a single view and I had this difficulty in keeping it working, but I believe I will keep several views anyway
 
User avatar
jsantos
Site Admin
Posts: 4350
Joined: 20 Jan 2012, 17:18
Contact:

Re: 3d Render

14 May 2025, 19:36

Thanks for the clarification. If you use the flag I mentioned above for enabling the depth buffer, you might still be able to use a single view.

Who is online

Users browsing this forum: sfernandez and 3 guests