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 »

Image

And this is the lightmap.
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 »

Code: Select all

<key>materials</key>
<dict>
    <key>ahruman_illuminated_box.png</key>
    <dict>
        <key>diffuse_map</key>
        <string>ahruman_illuminated_box.png</string>
        <key>illumination_map</key>
        <string>ahruman_illuminated_box_light.png</string>
    </dict>
</dict>
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

Hehe, this thread reminds me when you (PAGroove) sent me the behemoth retextures...
and all the lights were baked into the diffuse map ><

Having them done as a seperate texture is alot easier in my opinion, gives you alot more control other them.

I mostly use neolites shaders in my oxps, as they are more closer to what I am used to working with in other games. (a diffuse map, an illumination map and a normal map.) unlike say Griffs shaders which make my head hurt I have to get a team of NASA scientists to explain it to me :P

Neolites illumination maps can be a bit hard to understand too, but SimonB has a useful guide somewhere on these forums about them, and theyre pretty simple (green channel for shiny-ness, red for engine glow, blue for hull lights)

But the guide that Ahruman gave seems better for just hull lighting, and I think shinyness can be done with materials too, but don't know about engine glows that change depending on engine speed, i think that can only be done with shaders, but in my opinion theyre not really important, anyway as the exhaust flames usually cover the area anyway :P

<EDIT> Can normal maps be done with Materials instead of shaders?
Last edited by ADCK on Fri Apr 30, 2010 8:21 pm, edited 1 time in total.
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:
Image

And this is the lightmap.
This is actually more complex than what you want. It looks here as if you’ve mixed a light layer with the base texture using multiply mode, which (if it was in colour) would effectively produce an emission map that’s equivalent to the illumination map you really want.

Or, in less abstract terms, instead of this (from above):
Image

…you’ve produced this:
Image

The illumination map only defines the light that’s cast by a notional lamp, not the light that’s reflected.
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 »

ADCK wrote:
But the guide that Ahruman gave seems better for just hull lighting, and I think shinyness can be done with materials too, but don't know about engine glows that change depending on engine speed, i think that can only be done with shaders, but in my opinion theyre not really important, anyway as the exhaust flames usually cover the area anyway :P
Shininess can indeed be done using specular_map, but it’s a lot more abstract. Let’s start with the simple stuff. :-)
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 »

Yes, The above image is the texture and then applied the mode Greyscale in Photoshop.

So it's not so easy. I find it bloody complicated :(

EDIT:

Your picture in the example looks easy but it's not easy to separate a colored image lightmap only. I thought that choosing the grayscale mode and then turning down the brightness would a sort of illumination map.
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
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

pagroove wrote:
Yes, The above image is the texture and then applied the mode Greyscale in Photoshop.

So it's not so easy. I find it bloody complicated :(

EDIT:

Your picture in the example looks easy but it's not easy to separate a colored image lightmap only. I thought that choosing the grayscale mode and then turning down the brightness would a sort of illumination map.
You just need the shape the light casts - not how it illuminates the texture as well - so what did you light look like before you multiplied it with the greyscale texture map?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

BTW, PAG asks a question I meant to ask myself on several occasions - for Windows and/or Linux machines is there an easy way to convert old XML files to Open step as all the new whizzy stuff is in Openstep and all the old ships I'd like to play with are in XML.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

pagroove wrote:
Yes, The above image is the texture and then applied the mode Greyscale in Photoshop.

So it's not so easy. I find it bloody complicated :(

EDIT:

Your picture in the example looks easy but it's not easy to separate a colored image lightmap only. I thought that choosing the grayscale mode and then turning down the brightness would a sort of illumination map.
Well, the way i would do it is a bit complicated, step by step: (with GIMP)
1: open image/diffuse map
2: create new layer (Shift+Ctrl+N) (make it transparent)
3: use circle tool to select where you went the lights (hold CTRL to select multiple areas)
4: select the previously created new layer
5: fill all the selected areas with white using bucket fill tool
6: unselect (Shift+Ctrl+A)
7: go to Filters>Blur>Blur
8: repeat step 7 a few times
9: select the orignal layer (likely named background)
10: create a new layer, but this time choose "foreground color" and change the foreground color to black
11: delete the original layer
12: merge the black and white layers
13: save as (dont overwrite original lol)
Last edited by ADCK on Fri Apr 30, 2010 8:36 pm, edited 1 time in total.
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 »

It looked like the normal texture. a colored png

I do this:

I thought: I should make a greyscale image just what they said so
In the picture you can see me do that:

Image

Then after that a message displays: Discard color information? I chose Yest

Then the image looks:

Image
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 »

But surely you have the textures in layers in Photoshop? You’ve used the same lighting scheme with different colours, after 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:
But surely you have the textures in layers in Photoshop? You’ve used the same lighting scheme with different colours, after all.
No it's a flattened image.
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
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

OK, but how did you make those lovely light cones? You need your lovely texture before you added the light effect and then the light effect as a separate greyscale texture - You do keep all these effects separate don't you, before combining them at the end? :?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
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 »

DaddyHoggy wrote:
OK, but how did you make those lovely light cones? You need your lovely texture before you added the light effect and then the light effect as a separate greyscale texture - You do keep all these effects separate don't you, before combining them at the end? :?
That I did with layers. But I flatten the image when Im content with it. I know it's probably not the right way of working but. I'm used to work in that way.
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 »

Oh MODS could you move this topic to discussion?
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
Post Reply