How to present a second screen of the same scene in C# - c#

I have a Windows application that uses directX and open a Windows.Form to shows vrml objects in 3D space.
I want to open a second screen that will show
the exact same scene but from different angle.
(Like Rear-view mirror in car racing games)
I've looked into MDI but I just can't get my head around it.
Any instruction will be appreciated.
Thanks!

Related

Unity - build camera is different to editor's "game" camera

Ive just started developing for the windows mixed reality headset in unity and it seems to be going well; until i build the program.
The point of my game is simple, one player navigates through a maze in VR and another watches the monitor and guides them through.
In the unity editor under the "game" tab, the cameras work as expected. I used RenderTextures to display two cameras (one of the VR view and one an overview of the entire maze) onto a canvas, which was the game view.
However, when i build my game the only thing that appears on the monitor is the VR's perspective.
I have set the target eye for the vr camera to "both" and the main camera to "None (main display) as others have suggested, but no luck.
Is this a small error ive overlooked or is there a larger problem?
Alex.

Setting Screen to Format on all Windows PC sizes

The game looks fine inside the Unity screen view, but if I build and choose a different resolution screen size the game looks goofy and dis-proportioned. Especially when I go into full screen mode. I'm using Unity 2019.1.1a (I think it's still in beta?). I'm developing a top down 2D game for Windows PC.
How can I fix it to where the game will look the same on any screen size?
Unity has some good tutorials on this topic:
https://unity3d.com/es/learn/tutorials/topics/user-interface-ui/ui-tools-resolution-device-independence
https://docs.unity3d.com/Manual/HOWTO-UIMultiResolution.html

is there a way to make a 3D game in winforms or WPF in C#?

I'm thinking about making a 3D point and click game, is it possible to make one in winforms or WPF? I don't need any physics or anything all I need is to make the application render 3D objects. I know that I can use XNA but if I do then I will have to relearn almost everything again. My third approach would be to make the scenes in a 3D game engine and then print the screen and then load it as a image. Any suggestion would be appreciated.
There's a big difference between a 3D game, and just letting players interact with a rendered image.
Your approach of loading a pre-rendered image is possible to do in both Winforms and WPF. You would just need to capture click events on the image and check the location against your list of active areas. Then just handle what needed to be done, ie: move to the next area, activate item, etc.
Edit from comment:
It's not so much which is friendlier. You can host an XNA viewport in Winforms/WPF. It's more about how you want your game to work. If you never have moving 3D scenes, XNA is overkill, and images will work just fine.
If you want dynamic scenes, you'll need to be able to render them on the fly. Then, XNA makes more sense. It is a lot more work though compared to just displaying images.
If you just want to show pre-rendered 3d images in your game, why not create them using a real 3d graphics tool, such as 3D Studio Max or Maya (or a free one, such as Blender)? It sounds like there's no need for actually rendering the 3d scenes in a game engine at all.

C# Capturing Direct 3D Screen

I have been fooling around with screen capture for awhile now and I managed to capture the entire screen, certain areas on the screen etc...
But when I go into a game and try to capture the screen, it completely ignores the game and instead, captures the desktop (or whatever is behind the game window).
Another interesting fact is that the same thing happens with the PrtScn button.
Any ideas on how to capture a game's screen?
The screen capturing technique you are using works well for capturing things that aren't hardware accelerated. I suspect you'd have the same problem trying to capture a movie frame in Windows Media Player.
The solution is the do a screen capture from the hardware itself using DirectX. This article explains how to do that with some code and a managed wrapper around DirectX called SlimDX.
EDIT
If Slim DX doesn't work for you, then you'd just have to find another managed wrapper around Direct X. I don't think you are going to be able to do the screen capture without working at the hardware level, and DirectX is the means of doing that on the Windows platform.

Spinning a 3D model in C#

How do I take a 3D model that I created in 3D Studio Max and put it into my Winform C# program and make it spin? I'd prefer not to use DirectX if possible. I don't want anything complex. I simply want my model to rotate along the X axis. Thats it.
Thanks
You should use a 3D rendering engine for C#
Something like
http://axiom3d.net/wiki/index.php/Main_Page
http://www.codeproject.com/KB/GDI-plus/exoengine.aspx
http://irrlicht.sourceforge.net/features.html
http://freegamedev.net/wiki/Free,_cross-platform,_real-time_3D_engines
I have never used any rendering engines but for your requirements (letting the user move the object) i think a 3D engine would do. But perhaps this is over kill
If you want it to be dynamic, then the simplest option would be to render out an animation of the object rotating, but make each frame a separate file. Then you just show the correct image based on how the user is dragging the mouse. If the user drags the mouse to the right, then increment the frame and show the next image. If moving to the left, decrement the frame.
For something non interactive:
Export the animation to an AVI and embed that in your form:
Embedding Video in a WinForms app
It's not really what I'd recommend, but it's an alternative to creating an animated gif.
For something partially interactive (i.e. allowing limited movement):
I've seen QuickTime movies that you can control with the mouse. There's an example on this page. It's not 3D though.
For something fully interactive:
You need a 3D rendering engine of some sort and that does (usually) require DirectX or OpenGL. However, if you're only dealing with simple objects you might (repeat might) get away with a software renderer.

Categories

Resources