How to make 3D more realistic?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
MasterKira
Posts: 11
Joined: Mon Feb 07, 2011 7:40 am

How to make 3D more realistic?

Post by MasterKira »

Ok im programming a space simulator.
All work fine... now im working on details as well as on mechanics...
But where?

Here is a screenshot, any idea for upgrade this scene? (I was thinking to a blur effect? would be a solution? or maybe changing the skybox? or idk...)
Image
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: How to make 3D more realistic?

Post by REDDemon »

stars should have rays only near/inside nebulas (unless you are assuming some stardast everywhere wich is also ok.). Beveling the edges of the ship could work too. you can add lensflares to the engines of the ship. Those are small and cheap changes with great impact. you can also make background nebulas a bit more noisy (for example modulating the skybox by a very bright perline noise image). There is a strange horizontal line in the screenshot (maybe is the trail of a star so it is ok). .. Add metallic refluections to the ship.

for modulating the skybox you should mix every image with a perlin noise image. This is simpler todo than to says.

I have writed a tool wich was thinked exactly for this kind of work (actually the project is abandoned, but its current release is stable and working and complete in its current features). The tool is FreeImageMixer wich is freeware (and probably will become opensource, download link in my signature.. you should not that my signature was done using it too XD)

your Background Before:
Image

your background After:
Image

for achieve that you should modulate your skybox by a perlin noise image like that one:
Image

after applying the MIX the perlin noise image will become similiar to this one (pretty nice for clouds effects)
"brightness.bmp":
Image

the code to achieve that (I place this code in public domain so you don't have to warry about the license):

Code: Select all

 
#include <ImageMixer>
 
IMAGE_MIXER_START(955,564); //just the size of final image. Loaded images will be scaled accordingly
 
Image im1, im2;
im1.load("PerlinNoise2D.png");
im2.load("stars.png");
 
Channel A,B,C,D;
A = im2.getLuminance(); //get luminance of skybox image.
B = im1.getLuminance(); //get luminance of the perlin noise
 
Mask T;
T = (A<0.85);  //we select areas wich are not very bright (stars sould not be modulated)
 
///Modulating the image means that you have to TUNE the perlin noise for example by
 
float f = 30; //frequency. High values means "more curves".
B=(sin(B*f)+1)/2; //sinus lies between -1 and 1. so we add 1 to let it lying between 0 and 2.
                    //and then we divide by 2 to let it lying between 0 and 1 like a standard color channel.
 
B= (B+0.5)*0.75; // we brighten a bit B else is too dark.
 
B.clamp(); //we want 1 as maximum value and 0 as minimum.
 
 
//modulate all channels.
im2.R().mult(B,T);
im2.G().mult(B,T);
im2.B().mult(B,T);
 
im1.setRGB(B,B,B);
 
//always prefer Bitmap since has good quality. then use GIMP to save as JPG if you want
im1.save("brightness.bmp"); //we save aso brightness to see how much bright the image was.
im2.save("modulatedSKYBOX.bmp");
 
IMAGE_MIXER_END();
 
 
of course this code will work better for your case. Using different source images needs to use different code (or just tune numbers). Anyway the best results can be achieved using it besides GIMP. wich gives you total control

of course you need that all the faces of your skybox can be tiled. so you must use a different noise on each face and all the noises must match in the skybox (so you need a perlin noise skybox!)

I used imagemixer so many times because is so usefull. I'm still a bit confused why no one use it.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: How to make 3D more realistic?

Post by hendu »

- moving stars/comets in the background instead of a static skybox
- aa
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: How to make 3D more realistic?

Post by 3DModelerMan »

Writing normal/specular map shaders for your ship would be a good idea too. And adding some glowing lights to your ship and some bloom/glow post-processing could help too.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
MasterKira
Posts: 11
Joined: Mon Feb 07, 2011 7:40 am

Re: How to make 3D more realistic?

Post by MasterKira »

REDDemon
thanks for these ideas, in order:
stars should have rays only near/inside nebulas (unless you are assuming some stardast everywhere wich is also ok.)
Ummm nice idea... but the stardust everywhere feels more like i want ;)
Beveling the edges of the ship could work too
Blur effects ... i think should be enough? ive searched in forum but the solution offered not works .... ( Yes I dont know how to use shaders T.T so i need to learn hardly)
you can add lensflares to the engines of the ship
Oh yeah i didnt thinking this nice idea... I try search in forum or write something
There is a strange horizontal line in the screenshot (maybe is the trail of a star so it is ok)
Yeah an error ... its due to a planetary ring... i was using PNG-ALPHA TRANSPARENT -> bad results (all edges were white)... actually with an ADD_TRASPARENT and using balck instead of alpha transparency works fine... all white lines around the edges are removed and looks better...
Image
Add metallic refluections to the ship.
Shininess = 40.0f.... and make a nice result
Image
Image Mixer
Isnt better to change skybox directly?... just work a bit on Photoshop, using a free image from internet, modifing where necessary...
hendu
Thank you too but:
moving stars/comets in the background instead of a static skybox
If you turn the camera the stars moves... having thousands billboards isnt a great solution...

3DModelerMan
I have read the tutorial about shaders... but i didnt understand anything... several lines of codes are still withoutmeaning for me ...
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: How to make 3D more realistic?

Post by hendu »

You only need 3-4 layers for a nice parallax effect. No need for one billboard per star.
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: How to make 3D more realistic?

Post by REDDemon »

Yes you can also change the skybox :). I'm in the opinion that photoshop does not allow to make everything XD. for each mix you can do almost at free with freeimagemixer (and without buying photoshop) you'll need an apposite plugin for photoshop XD. Beveling the ship is question to use the "bevel" option in your 3D editor (blender for example make it easy).

Nice planet! :)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: How to make 3D more realistic?

Post by Mel »

To make things more realistic... remove all the clouds, they are barely visible in real space, and don't play any sound... Okay, that sounds fairly bad... And i doubt any of us is a real astronaut :D

I'd try to imitate any space simulator out there. Take a screenshot you like, and try to imagine the effects they've used there. Also, a LOD mesh for giant objects may come in handy. Take into account that the best visuals come from the best artwork, along with a good graphics management.
... having thousands billboards isnt a great solution...
That is where point sprites fit best :) 1000 billboards isn't the same as 1000 point sprites.

Take a look, it always serves to have a good example, and the effects are relatively cheap to achieve. check this screen, and think what could you do, or what would you want.
Image Don't feel bad for "copying" :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
fmx

Re: How to make 3D more realistic?

Post by fmx »

nice reference
if you can add Shaders to your scene that would help a LOT: per pixel lighting, normal mapping and glow/bloom/hdr
All8Up
Posts: 16
Joined: Mon Mar 12, 2012 12:42 am

Re: How to make 3D more realistic?

Post by All8Up »

MasterKira wrote:Ok im programming a space simulator.
All work fine... now im working on details as well as on mechanics...
But where?

Here is a screenshot, any idea for upgrade this scene? (I was thinking to a blur effect? would be a solution? or maybe changing the skybox? or idk...)
Image
I don't want to disagree with anyone else but the first things I look at in that screenshot is all about the lighting.

Overall light values. For Earth orbit pictures, Nasa had to spend millions figuring out a decent way to take pictures which would not be blotted out by the power of the sun's lighting (it is hundreds of times more powerful than all other light sources). Making things realistic is probably going to be making things look like Nasa photos and as such you should look at some of the pictures from say the space station etc to get an idea of where things look fake here.

A) Use of ambient light. There is no ambiance in space (compared to the sun) unless you are close to a radiant body such as a planet etc. Earth "is" a radiant body since it reflects a certain amount of light. But, Earth reflects a green red color into space (why our sky's are blue) and that should be your ambient term if near Earth orbit. I.e. first fix is to change your ambient value to a dark reddish color similar to a sunset. (Assuming a blue planet such as Earth.)

B) Lack of lighting detail. So, the model looks nice and seems to have nice diffuse variation to make it interesting. The lighting is completely flat though, other than color variation there is no change in interaction with the primary light source beyond the diffuse color. A "dark" area might reflect less light, a bright area might reflect more light. As such the lack of variation in the specular/specular power terms leaves the image very "flat". Without shaders this is not really possible though so the best bet is to take a bump map approach to show differences between color areas as a minor ridge. It is an extremely simple solution, using GIMP or PS, just do an edge detection, merge that with the original image and blur it a couple times. With shaders, just control the specular power with the diffuse map and you can get a very nice "lighting" effect.

c) Lack of lighting correctness. This is actually the most important item for this image. You have a nice particle exhaust, why is the back of the ship not reflecting the blue lighting generated by the particles? Place a blue'ish light behind the ship and move it randomly to apply the correct effect. The light should "only" effect the ship though since it is such a minor but important feature to making your ship look "correct".

Making things look "correct" is generally not a generic problem and there are hundreds of reasons it can all fail. But, if you get the lighting correct up front, even stupid simple textures can make something look "realistic" as you work.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: How to make 3D more realistic?

Post by 3DModelerMan »

The back of the ship is not reflecting the blue light from the back because the fire is a particle system. You need to add a point light with the same color as your flames right behind them. Bloom/glow would add a lot to the scene. And normal mapping on the asteroids would look nice too.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
keigen-shu
Posts: 8
Joined: Wed Dec 28, 2011 1:35 pm

Re: How to make 3D more realistic?

Post by keigen-shu »

You could learn more from other examples. Play more SPORE. The Space Stage has some pretty decent graphics. The only problem it had is the lack of blinding lights from being too close to large bright space objects. Also, check out the Vega Strike project. They've been going through some serious graphics overhaul lately. http://vegastrike.sourceforge.net/forum ... play_media

For the skybox, you can do it the way Maxis did it: start with an empty black scene then put colorful nebulas and stars in 3D space far away from the player's field of interaction to act as the background and as an ambient lighting source, then use some sort of perspective hack to make it work realistically with camera movements.

The lightning is pretty much explained by All8Up.
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: How to make 3D more realistic?

Post by Asimov »

HI,

I know this is an old thread, but movies, and games and realism don't really go together. I mean if that spaceship was in space it would be totally blacked out unless there was a nearby sun. Look at the USS enterprise. You see lights all over the ship, because without those lights you wouldn't even see the ship in the blackness of space.

Another example: Star Wars and Battlestar Galactica. Why do the spaceships have wings? Wings are only of ever any use if you have an atmosphere to push against a wing.
There is no such thing as a spaceship banking in space. What does it bank on? There is no airflow under the wing.

Don't get me wrong I love science fiction, but there is a huge distance between reality and fiction.

Take your ship for example. All those rocket boosters at the back. In reality you would need a tank 6 times the size of that ship to keep enough fuel for the journey.
If a ship was to travel any distance in space it would definatley not be using a combustable material like rocket fuel. You simply couldn't hold enough of the stuff for even a short journey.

Nice ship by the way :D
Kojack
Posts: 67
Joined: Sun Jan 20, 2008 2:39 am

Re: How to make 3D more realistic?

Post by Kojack »

Asimov wrote:Another example: Star Wars and Battlestar Galactica. Why do the spaceships have wings? Wings are only of ever any use if you have an atmosphere to push against a wing.
In both star wars and battlestar galactica the ships often fly in planetary atmospheres.

Of course the wings aren't really doing much when in atmosphere, since they aren't airfoils and have no control surfaces.
Post Reply