Complex objects
Last updated
Last updated
We can combine different objects to make something new. Let's create lamppost with light glare and a barrel with campfire.
Lamppost - first add on the scene lamppost.tscn prefab from STATIC_OBJECTS/ folder.
Then go to the SPRITES/ folder and get sprite_3d.tscn prefab and place in the scene.
We can change texture of glare by changing Texture parameter in inspector. Right click on texture and select Load. Search needed texture in res://assets/textures/
Then move sprite to the top of the lamppost.
Then add point_light.tscn from LEVEL_EDITOR/ main folder. And place it on the top of lamppost.
And if we change daylight key inside "level_settings" node to false.
Then save level and play.
Ah yes, we're forget to change sky color and skybox texture for TRUE night :D
First 3 swatches is day, evening and night sky colors!
Select skybox_1 node and in inspector find out Material Override parameter in Geometry group.
Save scene and play again. And its better.
Then add point_light, you can just duplicate (Ctrl + D) lamppost light and drag it to the barrel. Set the color to orange and energy to 1.5.
Lets test. It works. Also, I recommend placing light source not fully above the barrel but a little bit at the side, 'cause the barrel not be lighted by own light if it will be fully above.
You can change radius of the light by dragging red dot on the right side of the light source. Also you can change light color in inspector in Light group. For strong light raise up Energy parameter around 2-2.5
Lets fix this. Inside level_settings node change weather color to black color with hex 0a0a0a in swatches group.
Click on blue sphere and find Albedo group inside the list, open it, click Right mouse on Texture and Load texture form res://assets/textures/ folder skybox texture with night sky.
Campfire - add on the scene barrel.tscn from STATIC_OBJECTS/ folder. But you can see, that barrel has transparent normals inside.
Go to inspector and find Material Override in Geometry group. Click on textured sphere. Find Transparency group.
Find there Cull Mode parameter and set it to Disabled.
Now barrel looks normal.
Lets add animated fire sprite! Go to SPRITES/ folder and drag sprite_3d_anim_fire.tscn to the scene. And it's underground -_- Drag fire inside barrel. Keep it centered inside.
You can parent sprite to the barrel simply dragging sprite node on barrel node.