Solved

Not 3D game.. but 3D rendering..

Posted on 2001-06-17
11
460 Views
Last Modified: 2013-12-26
Hi all,
  We need to create a software which can 3D render house interior (like kitchens and bedrooms ) and so it can do jobs like.. change colour of the table or a sofa.. or replace the texture of the wooden floor... and probably replace a chair and another kind of chair "easily" ..so wanna know what 3D tools should i use to create the software? We normally write our softwares using VC++ 6.0. This project will be done by 1-2 ppl only.. and we have no 3D programing skills at all.. so..
I heard that OpenGl and Direct3D are the 2 most commmon choices.. so.. which should one i choose? any ad/disadanvatage of each inidividualy language? how difficult would it be for us? and how to get it started??

I really need someone to give me some hints/guides so that i know from where should i start...
0
Comment
Question by:rw8
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 2

Expert Comment

by:cybermike3d
ID: 6203322
You are taking on a HUGE task ... why not get a free copy of strata3d ... and away you go ... you can achieve the results u want with no programming .

But if u want to write your own code, download the latest DX8 SDK from microsoft and start from there ... there are samples and tutorials for C.
0
 

Author Comment

by:rw8
ID: 6204229
Which one is easier to learn and use? DX8 or OpenGL???
0
 
LVL 1

Expert Comment

by:spilocke
ID: 6205316
Hi there,

Personally, I think OpenGL is easier to use than Direct X. But since you are a VC++ 6.0 programmer, I guess DirectX wouldn't be a problem.

OpenGL is just a graphic library. Include them in your program like any includes, study the functions and you are away. It includes translation, rotation and just about any helpful functions you might want. You can get information about OpenGL at www.opengl.org along with samples and developers guide.

DirectX is a whole different story. It is a COM object. You need a very basic understanding of COM initialization and COM usage. It does provide 3D manipulation functions like OpenGL. You can get the infos at http://msdn.microsoft.com/directx/

OpenGL and DirectX are for realtime rendering usually used for games and other interactive 3D application. They give you game type of feel and image quality. From what I get from your question, you are more towards making a 3D renderer like Lightwave, Softimage, Maya and 3D Studio Max. You would want high quality 3D images to be rendered out to present to client. It is good to use OpenGL / DirectX for the part of providing the modelling interface for your client but then to render out realistic 3D images for presentation use you need something more powerful. You need a raytracing program/algo. Try looking at POVRAY at www.povray.org It is a freeeware, the source is distributed so you can compile it on virtually any platform.  

What we usually do is build the application in OpenGL/DX. Get the modellers and animation modules ready. Create object in modellers and animate them in the animator. We use OpenGL and Direct3D for all these to provide a realtime 3D interactive environment for the client to model their dream mesh and animate them if proper. Later when all the mesh ( kitchen, bedroom ) is in place ( saved in file ), we use a ray tracing algo to render them out. The quality of the 3D pictures rendered out are pretty much impressive but it takes lots of computer cal so do expect long hours for complicated scenes.

If you are more towards a 3D interactive environment type of application, then ray tracing need not apply.

Hope this helps.
0
 

Author Comment

by:rw8
ID: 6208729
Although i said i'm a VC++ programmer.. I've no experience at all in COM programming.  :(
Therefore.. is it better if i study OpenGL instead of DX??
and since the project i'm going to do is a commerical software, so future development and compatiblilty (with different software plaform and hardware) are very important to me...  

i assume i don't have to worri too much about these issues if i'm using DX because it is a microsoft thing. (i.e. they will support it and make it a standard thing)
0
 
LVL 1

Expert Comment

by:spilocke
ID: 6208828
Hi rw8,

Future development and compatibility with different platforms and hardware are important. DirectX only works with Windows only ( and XboX ). I don't think DirectX will ever appear on MacOS. OpenGL on the other hand, is multiplatform. It runs on Mac OS, OS/2, UNIX, Windows 95/98, Windows 2000, Windows NT, Linux, OPENStep, and BeOS.

Now on to the hardware stuffs. Graphic cards. Most hardware supports both OpenGL and DirectX. Microsoft is trying to have all cards having DirectX support but you have to know that OpenGL has been in the picture (1992) way long before DirectX come into picture. The OpenGL Architecture Review Board (ARB) has representatives from 3DLabs, ATI, Compaq, Evans & Sutherland, Hewlett-Packard, IBM, Intel, NVidia, Microsoft, and SGI to discuss and agree on Graphic Card standards and features.

Try working out in OpenGL first. I guess it is much easier to learn.
But I thought you are doing 3D rendering?
If that is the case, you should be looking into ray tracers and radiosity stuffs to render out high quality images. Otherwise you are limited to game like quality renderings.

Hope this helps.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Expert Comment

by:Andrian
ID: 6209733
I've an unfinished projet(OpenSource) using basic OPENGL if you want !(no rendering, just load somes 3dfile like 3dsASC,3ds ASE,MD3,OBJ,...).
0
 

Expert Comment

by:Andrian
ID: 6209735
sandrian@excite.com
0
 

Expert Comment

by:Andrian
ID: 6209740
ssandrian@excite.com
0
 

Author Comment

by:rw8
ID: 6212311
spilocke:   the project need to be able to render pics of interior rooms (of predefined shape and furnitures within the room) according to the different colour and texture of furniture and paints they want to put to the room. And maybe able to change a coffee table to another shape or so....  
so.. i need to find a way that i can render and define the 3D objects easily (i.e. how to model chair and table..etc) so that i can get some other ppl to model different rooms for me..  
game like quality renderings?  um.. i don't think i need (and have the time and resource to do) Jurassic Park quality 3D rendering...   I think game like quality rendering is OK for me. I need texture, shadow, reflection..etc..

0
 
LVL 1

Accepted Solution

by:
spilocke earned 100 total points
ID: 6212695
Hi rw8,

You need textures, shadows and reflections to appear in your picture. This all actually refers more to realistic renderings than those produced by OpenGL and Direct3D.
Sure you get shadows, textures and reflections with OpenGL and Direct3D but they are not realistic enough.

In OpenGL you defined 3D objects by their vertices or predefined shapes something like below.

      glPushMatrix();
      glRotatef( theta, 0.0f, 0.0f, 0.1f );
      glBegin( GL_TRIANGLES );
      glColor3f( 1.0f, 0.0f, 0.0f ); glVertex2f( 0.0f, 1.0f );
      glColor3f( 0.0f, 1.0f, 0.0f ); glVertex2f( 0.87f, -0.5f );
      glColor3f( 0.0f, 0.0f, 1.0f ); glVertex2f( -0.87f, -0.5f );
      glEnd();
      glPopMatrix();

You get a flat triangle. You will need to write a porgram to model out your items ( Chairs, Tables, Cups ) or you can predefined the items and provide a view for them to populate into your virtual house.

Actually, povray provides a scripting like language called scene description language which you can just summit to the povray.exe to render out a scene realistically. It looks something like this.

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"

camera {
     location <0,0.5,-7>
     look_at <0,0,0> }

light_source { <100,140,-300> color White}

plane { <0,1,0>,-1
     texture {
     pigment {color Silver}
     normal {bumps 0.5 scale .8}
     finish {phong 1 reflection .5 ambient 0.4 diffuse 0.2} } }

sphere { <0,0,0>,1
     texture {
     pigment { color Blue }
        finish { reflection 0.2 diffuse 0.1 ambient 0.8 phong .8 } } }

This renders out a blue sphere with a flat bump floor.
You don't need to compile the description language. Save it in a file (test.pov) and just pass it in command line (DOS version):

 povray.exe +itest.pov +otest.tga +w320 +h240

You will get a 320 x 240 TGA image ready.
So you can describe a chair by putting boxes together or by their individual vertices and even with their textures.
Try to take a look of sample pictures produced by povray users and sample codes, you will get the idea.

Well, what I am trying to say here is I can see 2 clear parts to your program.
1. The modeller
2. The renderer

You can use OpenGL for the interactive modelling part. The user will be able to place chairs, cups and tables in the virtual 3D environment. You get to see your house with texture and shadows but the renderings produced are not accurate and game like. You can stop here if you want to. But if you want to further on, then just grab the info produced by OpenGL, translate it to Povray format and pass it to povray to render it out. Here you get a nice accurate shadows, textures, reflections and other stuffs.

Hope this helps.

0
 

Author Comment

by:rw8
ID: 6212854
Thanx ! spilocke  :)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

See the related links at the bottom of the tutorial for downloads and supplemental information. Introduction The Nvidia 3D Vision Kit is a [not so] new gaming technology which allows you to play the newest computer games in "Stereo 3D" (like …
Author Cited: Konstantinos Dimopoulos URL Cited From: Article from Indie Games: http://indiegames.com/2012/07/browser_game_pick_the_grid.html The Grid (http://codeelf.com/games/grid/) is the sort of game I haven't played in over 10 years. It is …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now