How to link a 3ds max scene with my directx 9 game? - directx-9

I have purchased the book programming a multiplayer fps book.
The problem is that I am not able to get the 3d's max scene to load. Is there a step to load a library of 3d's max to load the scene? What is the missing piece in loading the scene. I am not able to load the scene.

In order to load and render 3D mesh data, you need some kind of exporter to convert the 3D Studio MAX authoring data into a binary form suitable for rendering, and some sort of rendering engine capable of drawing that binary form.
For exporting the data, you can use an existing tool such as Open-Asset-Importer-Lib or write your own using something like Autodesk FBX.
There are of course numerous choices for rendering engines, or you can write your own from scratch.
Note that Direct3D 9 is extremely old at this point. DirectX 11 is the modern sweet spot for starting out programming Direct3D. See DirectX Tool Kit and DirectX SDK Samples Content Exporter.

The 3dsmax file format is propriatary. You just don't load those *.max files into anything but 3ds max. Like Chuck said above, you have to export your max file from 3ds max into a common, 3rd party file format like OBJ, FBX, etc...
There is probably a hundred 3D third-party file formats out there. We have no idea which 'game' you are trying to code up, and you have not provided any information, except asked all the wrong questions.
DirectX 11 is a graphics platform provided by microsoft. it is file format agnostic. It is up to you to learn it.

Related

Silverlight based interactive floor plan

Our client is going to have a big screen in a reception area where they will have a browser based view of the laboratory floor plan. The idea is to interactively feed in lab temperatures for each room and have the floor plan change when a significant change in temperature occurs.
Silverlight will be the foundation technology for this, but that's where my experience with this ends. I don't know silverlight very well, but I should be ok with it once I get started.
I have the following two routes so far:
1. Just draw out the outlines in Silverlight and overlay it with extra shapes to represent elements like air conditioners, etc.
2. Telerik has a Map control that makes use of ESRI shapefiles, which seemed interesting and they actually have a Hotel sample where you can interact with various rooms, but when I asked them how they generated those shapefiles, they couldn't answer.
Anyone done something similar?
Shapefiles seemed interesting, but when I downloaded MapWindow and Quantum GIS, it seems to be a huge learning curve with very little in the line of online tutorials.
Thanks
Jacques

Manipulation with GIS content on the web using the WebGL

I have task to create program for manipulation with 3d content on the web. When I said 3d content i mean
on 3d map (witch i have and it is something like *.sdm) which i should load into browser and work some basic operation with it (rotate screen, change camera etc...).
Because i am totaly n00b i want to ask a couple of questions:
1. How to load maps into browser. Just for notice that my map have sdm extension. Is this possible?
2. What i should use for represent 3d content. I am thinking of GLGE framework for webGL, if it is possible of course
What should be the most painless and the most effective way to do this? Maybe i was totally wrong when choose webGL?
Programs that use WebGL aren't mature enough to do what you want. Within the next few years, when GIS applications start popping up it may be possible, but not now.
Also, keep in mind that WebGL is what gives you access to a low-level graphics library. It does not directly have anything to do with GIS data.
You may want to take a look at OpenLayers (2d, javascript based) or WorldWind-Java (3d, jogl/java based). Both of these programs can display map information in a browser.
http://openlayers.org/
http://worldwind.arc.nasa.gov/java/

How to perform video editing with Silverlight?

I would like to port an ActiveX of mine (to Silverlight) that have the following features:
Embedding a logo image in any video file.
Embedding subtitles in any video file.
Cropping any video file (for example: cropping 10 seconds of a 1 min. video).
Save the video file result (by the current encoders of the client).
The current ActiveX uses DirectShow - unfortunately, it can't be used in Silverlight. How I can abandon the old ActiveX technology for the new Silverlight technology?
The simple answer is: you can't.
Silverlight is targeted at two main types of apps:-
Content presentation, be that Video, Audio and Images, all with a view of creating interesting and engaging ways to interact with this sort of content.
More recently Line of Business apps, that is data entry and data presentation. Again with a view to making this at least a little bit more visually stimulating than prior technologies made these sorts of apps.
Video editing doesn't really fall into either of these camps and is not catered for.
I'm not sure its yet true to say the ActiveX is old, after all what technology is used to host the Silverlight Plugin in Internet Explorer? ActiveX.
I don't know if that's going to be easily doable. The various codecs natively available to Silverlight are all wrapped by the Silverlight MediaElement control, and so far as I can figure out, they're not directly exposed through an API, e.g., you can't get at the raw decoded RGBA bitstream. (If I'm wrong on this, I'd love to know, but I've poked around, and I can't figure out how to do it.) The Mono source tree has a decode-only implementation of the Dirac codec, but nothing that would easily let you decode, e.g., WMV or AVI files, so far as I'm aware.
And even if you could somehow grab the raw, decoded RGBA (or YCbCr) bitstream, so as to be able to insert whatever data you want into those frames, you'd still have to re-encode the video stream as well, and Silverlight doesn't provide any native support for that. You'd have to write your own encoders (not at all trivial), port them from the ffmpeg library (also not trivial), or wait for someone else to do it.
In short, my suspicion is that you're going to need to stick with your ActiveX solution for now -- though with some clever JavaScript coding, it might be possible to wrap that in a nice Silverlight UI.

View Google Sketchup (.skp) files on the web (Rehash)

Can anyone point me to any libraries or products that will allow me to pass a Google Sketchup SKP file in and as a result view the 3D model on a website in either Silverlight, Flash or HTML Canvas?
I know both Flash & Silverlight now support 3D out of the box, so I'm hoping there has been some updates since answers below were given over a year ago.
Silverlight's still kinda slow as far as web 3d engines are concerned (although I'm expecting great things from it in the next few years).
So in flash there's alot of evolved graphic engines like Papervision3D for example. You use these libraries to load a certain 3d file format, I forgot the name.
Anyway, you then just export your sketchup file into this format, or into another format you could later convert. Although I think you need the FULL version of sketchup to export if I'm not mistaken...
You can use a tool such as 3DPaintBrush to export the Sketchup files to XAML which can then be used in Silverlight projects. Unfortunately 3DPaintBrush isn't free, but it does have a 15 day trial to see if it is worth getting.

Realtime 1394 firewire video in a WPF app via directx or other method

Are there any controls that anyone is aware of that I can use to stream firewire video into a WPF app. I do not need camera control or capture just the video. I need WPF hosting because I'll be adding WPF content on top.
I was hoping that with the addition of having direct X surfaces in WPF something like this might appear.
Ideally looking for something relatively high level (not a direct show guy at all).
Thanks,
Brian
There are a couple really good video rendering packages for WPF. This guy Jeremiah Morrill has a blog where he discusses his numerous render projects. There's the WPF Win32 render project, and a number of low-level techniques he documents for how to access accelerated playback, Media Foundation .NET, DVD controls, etc... I believe his blog is titled "Jer's One Stop Shop".
Reading over his blog in general is a good idea if you are in to video/WPF. Last I checked, "MediaKit", one of his more comprehensive projects, enables easy use of DirectShow (simple xaml and your off and running, so don't worry) and other well known native interfaces. It's very robust and actively maintained, if not that specific project, check into some of the recent API's he's contributing on, some various Win7 media support also.
The only reason I'd bring up this other project, Augmented Reality, is that you remarked about adding content "on top". You should definitely check out wpfAugRel if your doing a lot of video production. Where to get an add on for it eludes me, but I'm sure you can find it off that site, but it allows for you to script in python some fairly slick real-time video production.
-- edit --
Right, look at this google code page, it has some video's (picture's worth a thousand words right?), but regardless, it allow's you to mix in 3D content into live-action, through the use of "marker" prop's, essentially bit's of paper with some easily machine recognizable feature's, that facilitate their underlying engine to inject computer rendered output into a real world scene, highly dynamic, so you can toss these marker's around and the 3D content move's fluidly... anyhow good luck.
Check out this article by UberDemo. It captures video into a WMV file with Windows Media Encoder and WPF. There is a paragraph about how to do the preview in a WPF application.

Resources