Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
My friends and I go to a vocational school for computer programming. We got together and decided to start making games, but the problem is only two of us have. I've made a text adventure game using lots of buttons and lots of forms in Visual Studio, and my other friend has made a few games using GameMaker. All of us have the same basic knowledge of Visual Basic (due to being in the same Programming course) and we want to try our hands at making a 3D game. I've done a little bit of research, and determined that we may need to use DirectX if we wish to keep using Visual Studio.
The problem is, I don't know how to start really. I've tried looking it up. Is it possible to access the API using just Windows and Visual Studio?
Also, based on what I can tell, we need to know C++. If that's true, then we'll convert to C++ to make games. It shouldn't be too difficult, I'd imagine.
Planning on making a game in 3D? This is no easy task and is very daunting. This isn't to scare you away from pursuing it, but to let you know what is down the road ahead of you. I'll break this down into several lists to give you a clear or better understanding.
Things to Consider
What type of game are we going to make?
2D Side Scroll, 2D Bitmaps and Sprites, Partial 3D or 2D Overhead View?
If game is 3D as you have stated; what is the view style: First Person, 3rd Person, View and Zoom, Overhead, Moveable Camera with auto follow or fixed?
Is it an adventure game, a role playing game, first person shooter, strategy?
What are the rules of the game?
What are the challenges, achievements, goals, and scoring or rating systems?
Is it single player, multi player, or mass multi online player?
Does it have levels or boards, or is it a sandbox open world?
Is there a story, plot and main characters?
What is the ultimate achievement or the final goal?
Does the game infinitely progress?
What type of background music and sound effects should it have, such as fantasy fanfare, drum beats and trumpets such as a war march, mystical, suspense and horror?
Who and what is our target audience?
Is this game for PC, Console, Tablet, Smartphone, Web browser?
Is it for Windows, Apple-Mac, Linux-Unix, Android Devices or all of them or just some but not others?
This deals with choosing the API to use either it be DirectX, OpenGL, or others -
DirectX - Which version? 9.0c, 10, 11, 12? This will affect target audience since different version work with different operating systems of windows such as DirectX 12 only works with Windows 10. Also not everyone has a DirectX 12 capable video card.
OpenGL - The version only makes a difference to some extent since almost all hardware vendors must support at least the minimal Core API library, yet they are each allowed to support their own independent list of supported extensions.
Others - Such as the newly formed Vulkan, the same concepts from above can be applied.
Is the target audience for younger children say between 3-7? Is it for children say 5-12? For teens 12 - 17? Mature for adults 17 or 18+?
Is the game geared to gender specific? Such as is it a game intended for boys or men such as wrestling, boxing etc., or is it more intended for girls and women such as Barbie Dress Up or Horse Grooming? This isn't meant to be stereotypical, just something to consider when designing a project.
Choosing an API
If you know your target audience is primarily using Windows, then 9/10 times DirectX is the choice to go, albeit Modern OpenGL works just as good!
If you know that you are targeting window users, but also want to include non-windows systems, then you may want to use OpenGL since DirectX isn't available for other operating systems. The best bet would be to use both API's and have a rendering switch based on the OS in use, or give the user the option during Game Installation if PC to choose which version of the Game such as DirectX or OpenGL. If it is Windows Phone or iPhone or Android, then OpenCL is probably your bet then.
Choosing a programming language
This all depends on the particular needs.
The most commonly used language for large scale 3D Game Engine projects
is primarily found using C++ because of the language's versatility in allowing you to do many different tasks not available in other languages such as managing your own memory dynamically, writing generic programming through templates, object oriented by using classes, inheritance and polymorphism or using a base classes to design abstract class at the root of a class hierarchy.
C# is not without its limits for it does allow for easier code writing without having to worry about manually managing memory and other things.
Java is still widely used as it's virtual machine is found on almost every device.
JavaScript is excellent when working with any major browser such as IE11, Chrome, Firefox etc.
Visual Basic is one of the least used, but it still has it's merits:
For example: There does exists a program to make 2D RPGs out there and it is called RPG Maker. With the use of text boxes, lists, radio buttons etc. VB would be a great fit to design the application part that makes the games, however it also has it's own scripting language that you can program game content from its own scripting language. In many cases these game scripting languages can be written from almost any language such as C, C++, C#, Ruby, Pascal, Pearl, etc.
Choosing appropriate 3rd Party Libraries that are well known, stable, reliable, trustworthy, constantly updated, flexible and portable. One such as GLM which is an open source math library that was written with the feel and style of OpenGL's GLSL shading language. It is constantly updated, works very well, is fully portable, easy installation as it is a headers only library; no need for other dependencies, binaries or having to recompile it for each different version of the compiler you are using etc.
The Assets
What kind of theme does or will the game have?
The Art - Graphics, Textures, Models, etc. - The overall look and feel.
The Audio - Music background, sound effects etc. - The Music Compositions.
Storyline: - Cut Scenes, Video, Animation, Character Dialogs etc.
Game Control and Logic
What kind of controls? - Keyboard & Mouse, Joystick, Hand Held Controller?
The actual motion of the Characters or Game Objects. Kinematic motion, point and click, point and drag, hover over, etc.
The Actions of the Characters or Game Pieces.
The logic of the game: If this then that etc. Scoring System or Goal Achievement
Math-Math & More Math - Without it; Good Luck!
Basic Algebra
Geometry
Trigonometry
Logarithms, Exponentials, Summations and Matrices.
Points, Vectors and Matrices
Calculus - Differentiation: Derivatives, Partial Derivatives; Integration: Integrals, Integrands, both definite and indefinite integrals.
Linear Algebra
Vector Calculus
Vector Fields
Abstract Algebra
Analytical Geometry (Geometrical Projections) - Non Euclidean.
Physics - Kinematics, Quadratics, Forces, Vector Fields, Collisions, Explosions. Just for game content. Electrical Circuitry for circuit boards: need to know your systems and how ROM, RAM, CPU, CACHE, VRAM, and GPUS all communicate across the BUS. Without this you can not "Optimize" your Game Engine!
The Tools Needed
A high powered pc workstation that is capable of doing graphic, video and audio manipulation with ease.
The appropriate OS with extended cards: Video, Audio, Networking etc.
The programming languages and their compilers. C++, C#, Java etc. Any well known IDE.
A graphics editor such as Photoshop, Gimp, Texture Editor etc.
Modeling programs such as Maya, 3DS Max etc.
Audio as there are two varieties:
Orchestra composition for making music scores to export into 3D Audio files.
Sound Effects to output audio types such as *.wav files.
All of the appropriate 3rd party libraries to simplify the amount of code you will have to write.
A Hex Editor for reading and manipulating Binary Files!
A Programming Calculator - For doing both binary and hexadecimal calculations, words, and bytes etc.
A versatile 3D graphing calculator for doing advanced mathematics. You may need to solve a system of equations with multiple variables to find either their derivatives, 2nd order derivatives, partial derivatives, integrals, doing trigonometric equations, vectors, and matrices. Especially Vectors and Matrices using trigonometry for doing rotations, and more advanced concepts such as quaternions and maybe even complex numbers although I have rarely seen the need for complex numbers in any Game Engine, except maybe for some concepts such as in particle physics and AI-programming.
The Concepts of a Game Engine
The Parts - In todays industry a Game Engine isn't just one thing, it can be considered multiple little engines integrated together into one working engine.
Graphics Engine - Window Creation, and API setup for rendering Primitives to the screen each game frame while considering the monitors' refresh rate and its pixel resolution as well as the GPUs draw rate.
Textures - Normally a 2D graphic images stored in memory with a width and height either measured in inches or pixels, and can have various properties or attributes such as color encoding, and compression levels.
Sprites & Fonts - Are usually associated with a texture since they are in a sense a specific type of texture.
Models - Models are usually 3D Geometric Meshes composed of mostly triangles, sometimes lines, points and other primitives where a specified texture can be applied to them.
Particles - Particles and even some aspects of animation can be applied here although the particle engines along with animations are more associated with the physics engine because they apply physics from the physics engine.
3D Environment - Could be in a closed room, outdoors, or outer space or regular flight.
Camera - The view angle at which the User will see the Game World From.
First Person - The illusion as if you were looking through the main characters eyes. The main character and camera turn and move together in unison.
Third Person - The main character is fully in front of the camera. The camera will rotate around the point of origin with that origin being the main character unless independent controls are given, the camera will follow or translate linearly as the character moves. It may also have a zoom option. Also the tilted view is how much angel does the camera project between the main characters direct line of sight (horizontal) versus how much the camera is pointed towards the ground.
Materials - The color attributes of a model's or a triangle's face: It is usually defined by 4 color channels (RGBA) where RGB are the Red Green and Blue channels and A is the alpha or the amount of transparency it has. Materials are important because they affect the overall shade of the object. If you have a model of a box loaded into memory that has an all yellow face and you apply a blue material to it, through color addition and subtraction it would now appear green. Materials are also useful and important when it comes to lighting which you will see in the next section which are described by these kind of material - lighting combinations: Ambient, Diffuse and Specular colors or material properties.
Ambient - The color and intensity that the light puts off.
Diffuse - The color saturation of the object itself (Self emitting)
Specular - The shininess of a region of the object that changes color from the light intensity on shiny type objects such as an apple or metal.
Lighting - Much can be said about this but without it you would not be able to see an interesting setting and you would have minimal visual effects.
Point Light - Has location but no direction as it shines out from a single point such as a light bulb.
Directional Light - Has direction but no location such as the sun
Spot Light - Has both direction and position as well as a cutoff angle. Such a light is like a flash light. It also attenuates.
Properties - Some lights attenuate, others have intensities, specular highlights, cutoff angles, etc.
Shadow, Reflections etc. - This is the ability to use the above lights
materials, their colors, directions, and intensities etc. to cast either a shadow of an object or even to reflect objects such as the sky or clouds onto a surface of shiny metal or a body of water.
Weather Patterns - Fog, Rain, Snow, Fires etc. Now Fog is usually done with shaders, and so are the others, but in most cases things such as rain, snow and fire are usually generated with a particle engine.
Motion - Transformations - Some of these are tied into the game logic of the controls to be used, some are tided into the scene graph such that if 1 object has multiple parts and the whole object is translated all the parts are translated together, and some of these are tided in with the physics engine for things such as collision detections and even the AI system for enemies to check for boundaries and to be aware of the player as being hostile. While many of them maybe tied to multiple engine parts.
Linear Transformations - Transformations That Are Usually Considered 1D and sometimes 2D such as Rotations about a single point or single line or axis.
Translations - Walking, running etc.
Scaling - Stretching or Skewing objects
Rotation - Rotating with an angle about a single axis, vertex(point) or vector(line).
Quadratic Transformations - Throwing a Ball, Jumping etc.
Affine Transformations - Matrix Transformations going from one View to another such as going from model to view to projection and there are others such as orthographic view; especially going from a 3D structure and to transform the data to fit onto a flat 2D plane such as your screen without the presence of stretching, tearing, and artifacts.
Complex Transformations - Rotations done in 3D among multiple axis of rotations at a time. Using Euler Angles this has a side effect called Gimbal Lock; to avoid it, we use Quaternions. Which is 4D mathematics involving matrices and complex numbers.
Scene Graph - Bringing them together to produce a working scene of related objects that defines the current world with all of its parts and where one object is in position related to another. There are many types of these graphs: BSP, Root - Node with leafs, Marching Cubes, Cubic or Octal Space Partitioning systems, advanced hashing table techniques etc.
The HUD - Heads Up Display
GUI-System - Graphical User Interface (Buttons, List Boxes, Text Boxes etc.)
Text Rendering System - How different fonts will be rendered.
Physics Engine - The Engine that keeps the game's refresh rate of its drawing calls to be in sync with both the monitors refresh rate and the GPU's drawing rate. It also does all the basic calculations for the majority of general motion that can be applied to any non static game object. It is also used in doing collision detections, ray tracing, and used for doing animations.
Animation Engine - Usually a collection of character and object animations that are predefined to some default value yet may be modified by a scripting language if such a scripting process is designed to be a part of the overall engine. (Better know how to write a parser and a compiler if you decide to include your own scripting language)
Audio Engine - Usually the controller that knows when to play the expected audio file either it be a background music, transitional music, or some sound effect. Also the ability to apply 3D Audio. Audio with multiple channels to apply specific sounds to a specific direction or location. Also the ability to not just play audio from a file, but from a Stream Object.
AI Engine - The engine that controls the abilities of all NPCs (Non Playable Characters). Their paths, their goals, their hostility levels, choices of attacks, the dialogue of conversations with the Player etc.
Networking Engine - The engine responsibility to creating network type data packets of needed game information and to transmit them over the network between a server and a client. The ability to both write and read(parse) the packets.
Shader Engine - Engine responsible for handling all of the Shaders
Memory Management System - Engine responsible for handling all of the games assets in memory.
Putting it All Together
One of the most sought out design of a versatile game engine in the modern industry is to have a working engine or set of engines that works independently from any Game Content, Game Properties, and Game Logic so that a Game Developer can rip out the old game with all of its source code and game assets and the Engine doesn't break to make another game using the same existing engine. Making it modular and portable and as generic as possible is another important aspect. Albeit there may be some modifications to the engine from one Game Style to another. Such as the difference between a First Person Shooter and an MMORPG. Special Care needs to be taken when beginning to work in this field for there are a lot of things to consider such as the topic of Batch Rendering.
Once you have a working 3D-2D Game Engine with all of its various parts that is nearly bug free and fully optimized then the next step is to get involved with your other applications for content creation where you will need to make your textures (or download free ware ones), make your models, create your levels or immediate map view of the world, create your sound effects and music or ( download free ware). Then plan out the game logic with a starting point, ending point and goals for different things in between. Of course you could also pay to buy some of that content or pay others to do some of the work for you. This is why it takes studios such as EA, Valve, Blizzard, Bethesda etc. a few years with thousands of people to make any decent 3D Game either it be for the Play Station, X-Box, or PC systems. But this is where to start! The Things to Consider and What it actually Takes to Make a Working 3D Game!
This is only the tip of the Iceberg too for there are many other concepts that I left out or didn't cover such as the different types of algorithms for doing specific tasks such as the order of rending objects base on distance from camera due to transparencies. I didn't even cover things such as error handlers, exception handlers, logging information to a file or screen during debugging and building modes before final release version, multi-threading, parallel programming, even working down to ASM instruction sets, concurrency, etc.
The bottom line is the most important thing you need into making a game is the dedication to learn and then to try and fail, fail, fail and fail again, but to get back up and try again until you accomplish it. For this you will need 1,000s and 1,000s of Hours! Researching, Programming, DEBUGGING, DEBUGGING, DEBUGGING! Then Repeat it all again! Why Repeat? Well once you get the hang of it; that technology is old, and you have to learn about the new technology and the new compilers, and the new APIs etc.!
If you want to know the inner workings of a basic complete 3D Game Engine from scratch check out this website MarekKnows and you can follow his series of video tutorials. His projects are primarily on windows using MSVS's IDE's and Compilers and he focuses on OpenGL. Once you have a grasp of the concepts of the Game Engine and later in a newer series Shader Engine, you can easily take those concepts and apply them to DirectX if you so choose, but you will have to change the Windows Code to support DirectX as opposed to OpenGL, and then learn how to use their API in place of OpenGL. The two are quite different!
StackOverflow etiquette means you'll get closed as "too broad" for a question. Specific questions are best here.
If you are mostly interested in "just writing a game", then you should consider using an existing engine like Unity 3D or Unreal Engine. Unity 3D is C#, which is a very common language in business development and is reasonably popular for mobile development. Unreal Engine is UnrealScript and C++ so is more common for console and PC development. Both have large, vibrant online communities. There are of course lots of other engines and game toolkits out there, so don't consider this an exhaustive listing.
If you are more interested in expanding your knowledge of computer programming through the effort of writing a game 'from scratch', or if you are hoping to become an expert in graphics and/or game technologies, then C++ is a better route. To get started with DirectX 11 in C++, you should look at DirectX Tool Kit which provides a good starting place for hacking together your own DirectX game engine.
If you find the C++ language barrier a bit too much, but want something more 'techy', then take a look at SharpDX .NET managed assemblies for using DirectX APIs. See DirectX and .NET.
For some book recommendations for learning DirectX 11, see this blog post. Be aware that many of the online tutorials (including the very popular Rastertek tutorials) are somewhat dated as they make heavy use of the legacy DirectX SDK. For details on that exactly that means when using Visual Studio 2015, see MSDN and Where is the DirectX SDK (2015 Edition)?.
C++ is a bit like the game of Go: It's relative easy to pick up the basics, but it takes years of experience to really master it. C++ provides an immense level of control, and most game engines are written in C++ at some level. You can integrate easily with the large collection existing C/C++-based libraries, and it's supported for almost all gaming platforms. All that said, the language is quite complex, and can be challenging to learn the best coding patterns as well as develop the robust debugging skills and discipline needed to be highly productive with it.
BTW, there's a project focused on making C++ easier to learn you might want to check out, the C++ Core Guidelines.
Within C++ is a smaller, simpler, safer language struggling to get out. -- Bjarne Stroustrup
I'm a newbie to 3D on WP7. All I want to do is nice simple 3D
A. Add/Draw a number of coloured primitives, cube and spheres etc. to a 3D world
B. Rotate the World x, y and/or z
That's it, nothing else. I don't need any collision detection, I don't need any clever physics I don't need any textures or backgrounds or anything else, just that nice and simple.
I've been through about a gazillion examples on various websites and they all obscure the basics with bloated code and objects that I just don't want. I don't want any marble or spaceship examples, just some nice clean, clear code.
I have Blender to create the 3D models and these will be simple models with no textures. just solid basic 3D objects.
Please don't point me to anything that's based on a game which every example I have already found is.
Oh and please only examples that actually work.
Well the best way to do 3D on Windows Phone 7 is to use XNA which is generally associated with games which isn't the whole truth. You can still build traditional applications using XNA, although it might take you longer to construct your ui as opposed to silverlight.
You should probably check out App Hub from Microsoft as there are a ton of samples, in fact they have a category specifically for 3D. Keep in mind since your just starting you should make an attempt to understand the examples there giving you. Even though code you see for the first time might seem like bloated or extra code, there actually necessary components to consider when developing 3D applications.
At any rate, this example goes over the basics of 3D using XNA on Windows Phone 7.
EDIT: If you don't want to use XNA, there's this question that was asked previously. There's a couple of solutions for using 3D in silverlight.
My company is considering creating a interactive advisor(3d) for our customer. I was trying to find appropriate software for 3d modeling of human figure (realistic).
We are taken into consideration two approaches.
First option is to use one of the 3d modeling software for a creating model and the with help of some internal scripting language animate the model. The software should act as rendering server because 3d model should be reacting on user action in some way. Therefore we are considering applications that has some kind of scripting language.
The second option is to use 3d modeling software to create a character and then animate it with OpenSceneGraph.
There is also the hard way: do it all with OpenGL but I do not think it is a right way.
The project is at a very early stage of negotiations but I have to collect some knowledge to realize if its even possible to do that is such way. Therefore I have few questions:
Is it possible to use a software like Cinema 4d/Maya/Blender to animate in real time single character?
Which software would be the best to model a character (price is not an issue, what matter is rendering speed and very good 'realitness'). We are considering Maya, Cinema 4D, Blender or ZBrush, Poser, 3DMax (however last three does not have scripting language as far as I know).
Can OpenSceneGraph can be easily use for animating any character from software listed above?
As you can see the main issue is 3d software and question if it is possible at all :). I appreciate all suggestions.
Thank you in advanced.
The probably best way to do this is using a 3D game engine, like the CryEngine3 (it's free for noncommercial projects) or the Unreal3 engine. Technically you're interested in only the character animation, but you'll need sophisticated material and lighting support in addition for multi layered shaders. Those engines can do it.
3D Modelling programs like you suggested are not optimized for realtime rendering. Although Blender has a game engine built in with quite thorough shader support it may a bit hard to get started with it. But for modelling the character and get a high quality preview it's very well suited.
Is it possible to use a software like Cinema 4d/Maya/Blender to animate in real time single character?
The realtime rendering of each of those programs is meant as preview, not the final product. Blender has the game engine, but this is not optimized for such kind of things.
Which software would be the best to model a character (price is not an issue, what matter is rendering speed and very good 'realitness'). We are considering Maya, Cinema 4D, Blender or ZBrush, Poser, 3DMax (however last three does not have scripting language as far as I know).
Scripting helps you only so much with animating a character. You'll also need tons of reference and pose data from which the animation system can blend together the expression.
Can OpenSceneGraph can be easily use for animating any character from software listed above?
Not really. Use a game engine instead if you want to get this done fast. Take a look at the CryEngine3 gallery. And like said: The SDK is free if this is noncommercial. If the program goes commercial you'll require a licence though.
1.- http://www.thepixelart.com/10-best-real-time-animation-tools/
2.- I use Zbrush with 3D Studio Max. Combining those programs you can model a character really fast
Those 3 you mentioned (Zbrush, 3DMax & Poser) actually have script languages
Zbrush => ZScript
3DMax => MaxScript
Poser => Using Python => http://d3d.sesseler.de/store/tutorial/run_python/RunPython.pdf
3.- No idea on this :)
Luxology Modo is a very good option for your needs.
I'm in the process of starting to build a strategy game (think warcraft) for the web. I've been doing research on HTML5 Canvas and CSS3 sprites and still can't decide which technology to use.
The game won't be completed for another 6 months.
Any advice would be appreciated.
As you probably hear so frequently... "It Depends..." ™
My suggestion would be consider the feel of the application you're after. If you are trying to build a very graphically rich, mostly-images application, then I would use Canvas. However if you are trying to animate some graphics, but have the page remain and behave more "Web-like", mixed with other HTML content, I'd give CSS3 a try.
Two additional points:
Currently, Canvas is better supported than CSS3 animation/sprites.
If you use Canvas you're going to be implementing your own render loop and animation code (or making use of a 3rd partly library). Your code create animation by compositing the various layers of each frame, applying movement, and repeating. You can't simply say "move this image a little to the right". You'll have to do that yourself.
The EA web game "Lords of Ultima", as dull as it is, is an excellent example of a WarCraft-styled (well, it's more city building as there are no visible units) overworld, with animations and everything, built on a pure HTML and CSS sprite base. It looks and performs well and I think the square block box-model nature of HTML suits that kind of tile based design, especially since a lot of the image processing (embed an <img> or a <div> with a background, change background-position for animation) and click/mouse handling is done for you in simple html.
If you do go canvas you have to manage that yourself which will greatly increase the complexity and dev time. You'll have more control of minor elements and improved performance, but then you'll also lose (if it's at all important), greater backwards compatibility with older browsers. So it depends on how complex your design is and what kind of performance you need.
Use Canvas. If you use CSS sprites to build a game, then you are going to make a lots of <div>'s which performs operations on the DOM, which may slow down and also have a lots of focus and compatibility problems.
It may pay off to trade the development time for performance on <canvas>, by the assumption of "A code will be maintained forever".
I think CSS3 sprite system takes more time to develop, because you need to handle browser compatibility.
Browsers like IE 8 (8 or 9?) are using GPU to accelerate graphics, which lets you get the free lunch of Moore's Law.
There's pros and cons to both. Currently, Canvas is better supported then is CSS3, but you said that your game won't be done for another 6 months, by then the support for CSS3 could be much much better. There's also a lot of other variables here, such as: What browser will the game be viewed on? How advanced are the graphics you need to animate? etc... I would say that canvas would be better for support of the current generation of browsers and for gaming graphics, however CSS3 would be quicker, but wouldn't even come close to the support or graphics handling. But it doesn't seem like your in a rush to get it done.
Basically:
Canvas: Graphics, current support in users browser
CSS3: Speed of development
Ether will work. But for now I would use Canvas. However, 6 months in the tech world is an eternity, things could be a lot different then.
I am building a web application using .NET 3.5 (ASP.NET, SQL Server, C#, WCF, WF, etc) and I have run into a major design dilemma. This is a uni project btw, but it is 100% up to me what I develop.
I need to design a system whereby I can take an image and automatically crop a certain object within it, without user input. So for example, cut out the car in a picture of a road. I've given this a lot of thought, and I can't see any feasible method. I guess this thread is to discuss the issues and feasibility of achieving this goal. Eventually, I would get the dimensions of a car (or whatever it may be), and then pass this into a 3d modelling app (custom) as parameters, to render a 3d model. This last step is a lot more feasible. It's the cropping issue which is an issue. I have thought of all sorts of ideas, like getting the colour of the car and then the outline around that colour. So if the car (example) is yellow, when there is a yellow pixel in the image, trace around it. But this would fail if there are two yellow cars in a photo.
Ideally, I would like the system to be completely automated. But I guess I can't have everything my way. Also, my skills are in what I mentioned above (.NET 3.5, SQL Server, AJAX, web design) as opposed to C++ but I would be open to any solution just to see the feasibility.
I also found this patent: US Patent 7034848 - System and method for automatically cropping graphical images
Thanks
This is one of the problems that needed to be solved to finish the DARPA Grand Challenge. Google video has a great presentation by the project lead from the winning team, where he talks about how they went about their solution, and how some of the other teams approached it. The relevant portion starts around 19:30 of the video, but it's a great talk, and the whole thing is worth a watch. Hopefully it gives you a good starting point for solving your problem.
What you are talking about is an open research problem, or even several research problems. One way to tackle this, is by image segmentation. If you can safely assume that there is one object of interest in the image, you can try a figure-ground segmentation algorithm. There are many such algorithms, and none of them are perfect. They usually output a segmentation mask: a binary image where the figure is white and the background is black. You would then find the bounding box of the figure, and use it to crop. The thing to remember is that none of the existing segmentation algorithm will give you what you want 100% of the time.
Alternatively, if you know ahead of time what specific type of object you need to crop (car, person, motorcycle), then you can try an object detection algorithm. Once again, there are many, and none of them are perfect either. On the other hand, some of them may work better than segmentation if your object of interest is on very cluttered background.
To summarize, if you wish to pursue this, you would have to read a fair number of computer vision papers, and try a fair number of different algorithms. You will also increase your chances of success if you constrain your problem domain as much as possible: for example restrict yourself to a small number of object categories, assume there is only one object of interest in an image, or restrict yourself to a certain type of scenes (nature, sea, etc.). Also keep in mind, that even the accuracy of state-of-the-art approaches to solving this type of problems has a lot of room for improvement.
And by the way, the choice of language or platform for this project is by far the least difficult part.
A method often used for face detection in images is through the use of a Haar classifier cascade. A classifier cascade can be trained to detect any objects, not just faces, but the ability of the classifier is highly dependent on the quality of the training data.
This paper by Viola and Jones explains how it works and how it can be optimised.
Although it is C++ you might want to take a look at the image processing libraries provided by the OpenCV project which include code to both train and use Haar cascades. You will need a set of car and non-car images to train a system!
Some of the best attempts I've see of this is using a large database of images to help understand the image you have. These days you have flickr, which is not only a giant corpus of images, but it's also tagged with meta-information about what the image is.
Some projects that do this are documented here:
http://blogs.zdnet.com/emergingtech/?p=629
Start with analyzing the images yourself. That way you can formulate the criteria on which to match the car. And you get to define what you cannot match.
If all cars have the same background, for example, it need not be that complex. But your example states a car on a street. There may be parked cars. Should they be recognized?
If you have access to MatLab, you could test your pattern recognition filters with specialized software like PRTools.
Wwhen I was studying (a long time ago:) I used Khoros Cantata and found that an edge filter can simplify the image greatly.
But again, first define the conditions on the input. If you don't do that you will not succeed because pattern recognition is really hard (think about how long it took to crack captcha's)
I did say photo, so this could be a black car with a black background. I did think of specifying the colour of the object, and then when that colour is found, trace around it (high level explanation). But, with a black object in a black background (no constrast in other words), it would be a very difficult task.
Better still, I've come across several sites with 3d models of cars. I could always use this, stick it into a 3d model, and render it.
A 3D model would be easier to work with, a real world photo much harder. It does suck :(
If I'm reading this right... This is where AI shines.
I think the "simplest" solution would be to use a neural-network based image recognition algorithm. Unless you know that the car will look the exact same in each picture, then that's pretty much the only way.
If it IS the exact same, then you can just search for the pixel pattern, and get the bounding rectangle, and just set the image border to the inner boundary of the rectangle.
I think that you will never get good results without a real user telling the program what to do. Think of it this way: how should your program decide when there is more than 1 interesting object present (for example: 2 cars)? what if the object you want is actually the mountain in the background? what if nothing of interest is inside the picture, thus nothing to select as the object to crop out? etc, etc...
With that said, if you can make assumptions like: only 1 object will be present, then you can have a go with using image recognition algorithms.
Now that I think of it. I recently got a lecture about artificial intelligence in robots and in robotic research techniques. Their research went on about language interaction, evolution, and language recognition. But in order to do that they also needed some simple image recognition algorithms to process the perceived environment. One of the tricks they used was to make a 3D plot of the image where x and y where the normal x and y axis and the z axis was the brightness of that particular point, then they used the same technique for red-green values, and blue-yellow. And lo and behold they had something (relatively) easy they could use to pick out the objects from the perceived environment.
(I'm terribly sorry, but I can't find a link to the nice charts they had that showed how it all worked).
Anyway, the point is that they were not interested (that much) in image recognition so they created something that worked good enough and used something less advanced and thus less time consuming, so it is possible to create something simple for this complex task.
Also any good image editing program has some kind of magic wand that will select, with the right amount of tweaking, the object of interest you point it on, maybe it's worth your time to look into that as well.
So, it basically will mean that you:
have to make some assumptions, otherwise it will fail terribly
will probably best be served with techniques from AI, and more specifically image recognition
can take a look at paint.NET and their algorithm for their magic wand
try to use the fact that a good photo will have the object of interest somewhere in the middle of the image
.. but i'm not saying that this is the solution for your problem, maybe something simpler can be used.
Oh, and I will continue to look for those links, they hold some really valuable information about this topic, but I can't promise anything.