In this basic tutorial you will get an idea of how irrlicht lighting works and how to use it in the irredit scenario editor, although it does not cover all its settings and possibilities, it is a basic tutorial.
Download irredit 1.5: https://www.ambiera.at/downloads/irrEdit-1.5.zip
The asset used in this tutorial can be found free for commercial use here:
viewtopic.php?t=52987
Well, let's begin.
Unzip irrEdit-1.5.zip, once we have unzipped irrEdit-1.5.zip we open irrEdit.exe that is inside the irrEdit-1.5 folder.
Remove the "testCube"
Import our 3d model
Import our texture
Select the texture in the "Textures" box, the selected texture will be marked with yellow
Select the 3d model in the scene and go to "Materials" and click on the letter "s" so that the selected texture is loaded in the model.
In the section below we enable the "Lighting" checkbox.
Now the model will be dark in the absence of a light source, so let's add a light.
Select the light and set position conveniently
Increase the size of the model by selecting it and modifying the "Scale" value. (Edit: also activate normalize normals so that the lighting calculates the scaling change correctly)
Select the light and set position conveniently, again
By default the model will be loaded with filters, that reduce pixelization (and also slightly increase FPS), we can deactivate it if we do not like the effect.
We can add ambient light to the scene from the "Atributes" parameters by selecting "root", this will make all objects in the scene contain some lighting, but no shadows, I will leave it in a dark blue to simulate the night.
We can see how lighting is affected inside and outside the house.
We can change the color of the illumination produced by "Light" from the object attributes, for example, to simulate the color of a torch we can use red.
We save the scene and then load it into our irrlicht project.
Make sure to configure the paths of our assets manually if necessary, this is done by modifying the .irr file with any text editor.
And that's all for now, as this is a basic tutorial it will only cover the basics.
Basic tutorial to illuminate a model in irrlicht using irredit
Basic tutorial to illuminate a model in irrlicht using irredit
Last edited by Noiecity on Sat May 25, 2024 3:46 pm, edited 1 time in total.
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
Re: Basic tutorial to illuminate a model in irrlicht using irredit
Ahh. Noie!
Look in IrrEdit, Tools, Options, Working Directory.
I do thank you for showing me where IrrEdit could be downloaded. I felt CopperCube was heading in a different direction.
Many thanks.
Look in IrrEdit, Tools, Options, Working Directory.
I do thank you for showing me where IrrEdit could be downloaded. I felt CopperCube was heading in a different direction.
Many thanks.
Re: Basic tutorial to illuminate a model in irrlicht using irredit
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
Re: Basic tutorial to illuminate a model in irrlicht using irredit
I found this works...
Then set IrrEdit working directory to "\IrrlichtSVN\bin\"
And in 2022 set Properties->Debugging->Working Dir to "\Irrlicht\bin"
(then load the textures in IrrEdit to "media/irrlicht2_lf.jpg" for skybox)
Thanks to CuteAlien and Noie.
You can just play around until you fix paths.
Have a good day.
Code: Select all
IrrlichtSVN
|
|_ IrrApps __ 2022 solution file
|_ bin __ here are the exes
|__ media __ here are your textures and models
|__ scene __ here's your .irr scene file
And in 2022 set Properties->Debugging->Working Dir to "\Irrlicht\bin"
(then load the textures in IrrEdit to "media/irrlicht2_lf.jpg" for skybox)
Thanks to CuteAlien and Noie.
You can just play around until you fix paths.
Have a good day.
Re: Basic tutorial to illuminate a model in irrlicht using irredit
Thanks for the information.thenewkgb wrote: ↑Tue Mar 12, 2024 4:56 pm I found this works...
Then set IrrEdit working directory to "\IrrlichtSVN\bin\"Code: Select all
IrrlichtSVN | |_ IrrApps __ 2022 solution file |_ bin __ here are the exes |__ media __ here are your textures and models |__ scene __ here's your .irr scene file
And in 2022 set Properties->Debugging->Working Dir to "\Irrlicht\bin"
(then load the textures in IrrEdit to "media/irrlicht2_lf.jpg" for skybox)
Thanks to CuteAlien and Noie.
You can just play around until you fix paths.
Have a good day.
I still do not know if it is possible to activate addShadowVolumeSceneNode() to the nodes that you load from the scene .irr, so for the moment I use irredit to give me an idea of where to put the objects and lights
I love irlicht damn it.
By the way, the light obtains a higher quality if the attenuation value increases from 0.01 to 0.1, although the distance is lower, something like this:
Code: Select all
ISceneManager* smgr = device->getSceneManager();
ILightSceneNode* light = smgr->addLightSceneNode(0, vector3df(0, 10, -5), SColorf(1.0f, 1.0f, 1.0f, 1.0f), 60.0f);
video::SLight lightData = light->getLightData();
lightData.Attenuation = core::vector3df(0.0f, 0.1f, 0.0f);
light->setLightData(lightData);
I made this fast example, although with 3 light source:
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
Re: Basic tutorial to illuminate a model in irrlicht using irredit
You add lights in code to get the shadow volume then?
I did wonder if you saw how to load classes into IrrEdit? It would be interesting if we/I/you could code a class/object in code then also could load the class into IrrEdit. For example, code a target that makes a noise when an arrow hits it - but with the advantage of being able to place the target in IrrEdit (all coded).
Maybe IrrEdit doesn't have all those features. It's a world builder, no more.
Maybe it's only for .Irr files with no custom stuff. Just nodes with x,y,z,colour,texture. If you did want to purchase the source code, I think I saw it going for 1900€.
I did wonder if you saw how to load classes into IrrEdit? It would be interesting if we/I/you could code a class/object in code then also could load the class into IrrEdit. For example, code a target that makes a noise when an arrow hits it - but with the advantage of being able to place the target in IrrEdit (all coded).
Maybe IrrEdit doesn't have all those features. It's a world builder, no more.
Maybe it's only for .Irr files with no custom stuff. Just nodes with x,y,z,colour,texture. If you did want to purchase the source code, I think I saw it going for 1900€.
Re: Basic tutorial to illuminate a model in irrlicht using irredit
The example in the GIF is all loaded from code, without .irr, still use irredit to guide me visually where the objects will go, then transfer it to code manually, It also helps me to orient myself to functionalities that I didn't know about Irricht
If I noticed that he sold the Irredit source code, it is quite generous, it is Niko, so it is fine, although it is sad that I no longer see it in the forum
If I noticed that he sold the Irredit source code, it is quite generous, it is Niko, so it is fine, although it is sad that I no longer see it in the forum
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.
**