Make env on the objects ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
arfgh
Posts: 104
Joined: Sat Aug 26, 2006 6:15 am

Make env on the objects ?

Post by arfgh »

Can someone help me to make some basic environment effect on the objects ? I have no idea to how to make that. thx
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

I'll assume you mean at least fog, so I'll point you to some tutorials. Tutorials are, after all, best for when you have no idea how to do something.

http://irrlicht.sourceforge.net/tut011.html

http://irrlicht.sourceforge.net/tut008.html

That should cover what you're aiming for (specifically the first one, which contains fog).
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

yeah try and be a bit more descriptive... what do you mean by environment effect? That could mean any number of things and we can't really help you much by just guessing at what you mean!
Image Image Image
arfgh
Posts: 104
Joined: Sat Aug 26, 2006 6:15 am

Post by arfgh »

No, is not fog.

Imagine for example a real car, ok ? its body have some type of environment reflection. That is a little shiny effect showind a static map we can make.

Of course i not plan to make environments as are showed on the Gran Turismo GT5 playstation 3 game. I only want to make a basic one.

is that posible with irrlicth ?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah, you can check out Christian Clavet's 'Level Demo' in the projects forum which used a reflection layer on a bus, though this was a pre-rendered reflection and didn't actually work too well when i saw it running.

You can also do dynamic reflections using RTT and possibly shaders.

Or are you more talking about specular highlights? Those can be set in the material parameters, though i've never really seens them give much effect...
Image Image Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

You can use the sphere map material for this kind of basic environment map. If you want something more complex, check out the metal materials in rendermonkey, you can add them to irrlicht like in the shader example
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
arfgh
Posts: 104
Joined: Sat Aug 26, 2006 6:15 am

Post by arfgh »

No

i dont want to make nothing so complex, just a basic effect where we have a simple texture and we want to add it as env to the models. This type of effect just cause some type of metallic shiny on the model, just the type of effect a car body needs, true ?

how can i do that ?
radiant
Posts: 112
Joined: Fri Feb 22, 2008 8:04 pm
Location: Mexico

Post by radiant »

OK... im definitely no expert in this... but just from cheking tutotial 11 and playing a little with the code u can figure out how to make textures have some reflection... im sure its probably not the best way to do it but u can try this in the tutorial 11 code:
change this:

Code: Select all

room->getMaterial(0).MaterialTypeParam = 0.035f; 
to this:

Code: Select all

room->getMaterial(0).MaterialTypeParam = 1.035f; 
just play with those values and see what happends... now comment the heightmap code... and see what happends(or just set the height to 0 like this:

Code: Select all

driver->makeNormalMapTexture(normalMap, 0.0f);
)and see what happends...

hope it helps...
Kriolyth
Posts: 26
Joined: Wed Mar 26, 2008 6:59 pm
Location: Moscow, Russia

Post by Kriolyth »

Yes, it is possible.

If you have a static camera, but you want to rotate the car, you can use a sphere map. You take 1 texture of the environment to be reflected and warp it (I'm quite sure there are plenty programs that do the warp for you). Then you set environment texture as a second texture for SPHERE_MAP material.

If you want to move the camera as well, you must use a cube texture and write your own shader (or find an existing one).

Anyway, google for "Evironment mapping", there are a few interesting articles.
The cake is a lie.
arfgh
Posts: 104
Joined: Sat Aug 26, 2006 6:15 am

Post by arfgh »

Kriolyth, can you show an example of that ? thx
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply