C’mon, people this material stuff is simple! Really!

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ahruman wrote:
To quote myself from earlier today:
Ahruman wrote:
It’s a bad idea to put documentation inside an OXP. Mac users will not see it, and other users are likely not to look.
Also (he says, continuing his habit of finding the negative side of everything), it’s a pity you’re using baked-in lighting effects, given that separate lighting maps have been easy to use on systems with shader support for the past two years and will work on most non-shader systems in 1.74.
I don't know how to do that. Shading is really beyond my capabilities at this moment. I let the shading and light mapping to the future or to others unless someone comes around with around with a good tutorial of how to do that in Photoshop.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Firstly, I must say these look great. Nice job!
pagroove wrote:
Ahruman wrote:
Also... it’s a pity you’re using baked-in lighting effects, given that separate lighting maps have been easy to use on systems with shader support for the past two years and will work on most non-shader systems in 1.74.
I don't know how to do that. Shading is really beyond my capabilities at this moment. I let the shading and light mapping to the future or to others unless someone comes around with around with a good tutorial of how to do that in Photoshop.
This is a point that could be worth further discussion. I wonder if there's not a danger of Oolite becoming (ahem) a bit Elitist. The game is excellent and this is in no small part down to the range and wealth of OXPs available. OXPs made by people with a variety of abilities, who do what they can to make the Oolite experience better. Like PA Groove, I haven't got a clue about shaders (and my computer doesn't support them anyway), so my OXPs are non-shader, and I don't apologise for that at all.
My concern is that if this (snobbish?) trend continues, people may be put off making OXPs on the basis that they're Not Good Enough, and the community will suffer.
Most OXPs are released under a licence that makes them open so someone else can adapt and modify them (eg add shaders) if they want to.
And ultimately, Oolite is effectively a Democracy. If somebody doesn't like an OXP, they don't have to install it! But let's not put people off making them in the first place.
We should be encouraging more players to get involved making OXPs, not scaring people off by setting , what are to many, impossibly high standards.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

pagroove wrote:
Ahruman wrote:
Also (he says, continuing his habit of finding the negative side of everything), it’s a pity you’re using baked-in lighting effects, given that separate lighting maps have been easy to use on systems with shader support for the past two years and will work on most non-shader systems in 1.74.
I don't know how to do that. Shading is really beyond my capabilities at this moment.
You don’t need any shaders to use any of the effects listed here. You just need a base texture:
Image
an illumination map texture:
Image
…and a few lines of plist:

Code: Select all

materials =
{
    "base_texture_file_name.png" =
    {
        diffuse_map = "oolite_shader_test_suite_4_diffuse.png";
        illumination_map = "oolite_shader_test_suite_illumination.png";
        illumination_color = (180, 180, 200); // Blue tint
    };
};
Image

I really don’t know how to make it simpler, short of writing the world’s easiest 3D modeller or providing a magic pony.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

the modeller thing would be more use than the pony, to be honest. if you were wondering where to direct your efforts, is all.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ahruman wrote:
pagroove wrote:
Ahruman wrote:
Also (he says, continuing his habit of finding the negative side of everything), it’s a pity you’re using baked-in lighting effects, given that separate lighting maps have been easy to use on systems with shader support for the past two years and will work on most non-shader systems in 1.74.
I don't know how to do that. Shading is really beyond my capabilities at this moment.
You don’t need any shaders to use any of the effects listed here. You just need a base texture:
Image
an illumination map texture:
Image
…and a few lines of plist:

Code: Select all

materials =
{
    "base_texture_file_name.png" =
    {
        diffuse_map = "oolite_shader_test_suite_4_diffuse.png";
        illumination_map = "oolite_shader_test_suite_illumination.png";
        illumination_color = (180, 180, 200); // Blue tint
    };
};
Image

I really don’t know how to make it simpler, short of writing the world’s easiest 3D modeller or providing a magic pony.

Hi Ahruman,

Ok but for making illumination maps you need to know about Alpha channels. or not?

It's not that I don't want to learn but:

Please show me then (tutorial please :)) how to make step by step an illumination map in Photoshop. And then explain what we need to do how to get it in Oolite. Griff made a tutorial for The Gimp in the past but to be honest I could not get it right and I always felt as if I had no real control over what I was doing. Partly because is that I'm not used to The Gimp.

For example take one the textures of a Griff-ship. I can view it normally in a viewer like Infanview. But when I open it in Photoshop I see those blocks. To my knowledge that's because the illumination information is stored in another layer. All fine. I understand that but doing it by myself is a different story. Sorry then for using Photoshop and not the Gimp.

Also the Wiki is well documented but you also have to know how to apply all those settings.

And also important is simple fun. Fun is when you comprehend things and can get creative with it. We are not all as skilled as for example Griff. That's why I ask him sometimes to help me out. Luckily Griff Helpled me in the past so I got out some shaded OXP's. Also thanks to ADCK.

So I'm good at basic texturing but not more at this moment. Therefore also Famous Planets is stopping after this release. Because when all the advanced stuff is coming in (shaders, cube maps etc) it gets a bit to complicated for me at this moment in my life. I do OXP to relax a bit so..

Hope this explains a bit why this OXP hasn't got shaders, light maps or other things.
sorry... :roll:
Last edited by pagroove on Fri Apr 30, 2010 7:08 pm, edited 1 time in total.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

pagroove wrote:
Hope this explains a bit why this OXP hasn't got shaders, light maps or other things.
These look good without shaders! And as a non-shader computer user, I'm quite happy! :wink:
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

pagroove wrote:
Ok but for making illumination maps you need to know about Alpha channels. or not?
No. Just what I showed you above. No extra processing. No tricks. Just those two perfectly normal textures and the bit of plist.
pagroove wrote:
Please show me then (tutorial please :)) how to make step by step an illumination map in Photoshop.
Exactly like any other texture. Where it’s light, the ship is illuminated. Where it’s dark, the ship is not illuminated. Quite a lot like the light layer you seem to be multiplying into your textures already, in fact.
pagroove wrote:
For example take one the textures of a Griff-ship.
No, don’t. Those are specialized combined textures for custom shaders. You don’t want that. You just want a greyscale or colour texture that’s light where you want light, and not light where you don’t want light.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

pagroove wrote:
And also important is simple fun. Fun is when you comprehend things and can get creative with it. We are not all as skilled as for example Griff. That's why I ask him sometimes to help me out. Luckily Griff Helpled me in the past so I got out some shaded OXP's. Also thanks to ADCK.

So I'm good at basic texturing but not more at this moment. Therefore also Famous Planets is stopping after this release. Because when all the advanced stuff is coming in (shaders, cube maps etc) it gets a bit to complicated for me at this moment in my life. I do OXP to relax a bit so..

Hope this explains a bit why this OXP hasn't got shaders, light maps or other things.
sorry... :roll:
You speak (I'm sure) for a lot of us.
The tutorial is a great idea, but it would need to be more Ooniversal, to help us Gimp users as well!
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Code: Select all

materials =
{
    "base_texture_file_name.png" =
    {
        diffuse_map = "oolite_shader_test_suite_4_diffuse.png";
        illumination_map = "oolite_shader_test_suite_illumination.png";
        illumination_color = (180, 180, 200); // Blue tint
    };
};
In the above example. Your illumination map is a colorless image? (black and white). And does blue tint mean that the light color is blue?
I maybe look dumb but I never implemented a light map. 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

pagroove wrote:
In the above example. Your illumination map is a colorless image? (black and white). And does blue tint mean that the light color is blue?
I maybe look dumb but I never implemented a light map. 8)
Yes. You could simply make the illumination map texture blue instead, but greyscale textures use less memory.

Here is a complete OXP (with illumination_color removed since it only works in trunk.) It uses illumination mapping without a custom shader, which works in Oolite 1.70 and later on systems with shader support, and on most other systems in trunk. There really is nothing to it except what I showed above.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ahruman wrote:
pagroove wrote:
In the above example. Your illumination map is a colorless image? (black and white). And does blue tint mean that the light color is blue?
I maybe look dumb but I never implemented a light map. 8)
Yes. You could simply make the illumination map texture blue instead, but greyscale textures use less memory.

Here is a complete OXP (with illumination_color removed since it only works in trunk.) It uses illumination mapping without a custom shader, which works in Oolite 1.70 and later on systems with shader support, and on most other systems in trunk. There really is nothing to it except what I showed above.
Thanks got it. Bear with me :wink:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ok next problem.
Of course the orginal Plist was written in another format.

Example:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>bushmaster_miner</key>
	<dict>
		<key>accuracy</key>
		<integer>9</integer>	
		<key>aft_eject_position</key>
		<string>0.0 -5.5 -16.5</string>
		<key>ai_type</key>


I need to have a rewrite of your example in that other format. Or are there some converters for that?

Code: Select all

{
	ahruman_illuminated_box =
	{
		roles = "ahruman_illuminated_box";
		
		ai_type = "dumbAI.plist";
		bounty = 0;
		cargo_type = "CARGO_NOT_CARGO";
		max_flight_speed = 0;
		scan_class = "CLASS_ROCK";
		model = "ahruman_illuminated_box.dat";
		name = "Shader test object";
		
		materials =
		{
			"ahruman_illuminated_box.png" =
			{
				diffuse_map = "ahruman_illuminated_box.png";
				illumination_map = "ahruman_illuminated_box_light.png";
			};
		};
	};
}
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

The OXP has both OpenStep and XML versions.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ahruman wrote:
The OXP has both OpenStep and XML versions.
I cannot open the files unde MAX-OSX. not in notepad/wordpad

So I tried it myself:

Code: Select all

<key>materials</key>
<string>Bushmastertex.png</string>
<key>diffuse_map</key>
<string>Bushmastertexdiffuse.png</string>
<key>illumination_map</key>
<string>Bushmastertexlightmap.png</string>
Is this going to work?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

pagroove wrote:
It's not that I don't want to learn but:

Please show me then (tutorial please :)) how to make step by step an illumination map in Photoshop. And then explain what we need to do how to get it in Oolite. Griff made a tutorial for The Gimp in the past but to be honest I could not get it right and I always felt as if I had no real control over what I was doing. Partly because is that I'm not used to The Gimp.
Illumination as above is much more simple than working with shaders. For me is everything that is done in the shader directory to complex and I stay away from it, but the stuff in the materials directory is much easier in application.

Actually you already did the important stuff in your texturing. You only need to split things up. The texture without the light in one file and than another grayscale picture with only the light. Link them together in the materials directory and you get the same illumination effect as in your screen shots.

However, this time with a big difference: whenever your ships enter the shade of the station or planet, the whole texture darkens, while when using an illumination map, the illuminated part stays, well, illuminated. :lol: Even more interesting with 1.74 where also the planet itself cast shades on ships when blocking the sun.

You don't need any knowledge of programming shaders for these maps.

EDIT: I see most stuff is already explained during the writing of my post.
Your code should be:

Code: Select all

		<key>materials</key>
		<dict>
			<key>Bushmastertex.png</key>
			<dict>
				<key>diffuse_map</key>
				<string>Bushmastertexdiffuse.png</string>
				<key>illumination_map</key>
				<string>Bushmastertexlightmap.png</string>
			</dict>
		</dict>
Last edited by Eric Walch on Fri Apr 30, 2010 8:15 pm, edited 2 times in total.
Post Reply