 |
Oolite Bulletins For information and discussion about Oolite.
|
| View previous topic :: View next topic |
| Author |
Message |
Zieman Deadly


Joined: 01 Sep 2009 Posts: 245 Location: in maZe
|
Posted: Thu Apr 08, 2010 9:45 pm Post subject: |
|
|
Quick test:
fixed the shaders in Vector 1.3 OXP (see Griff's post about "Ahruman's later shaders" and now they seem to work, clean Latest.log and now I can see the ship.  _________________ ...and keep it under lightspeed!
MY OXPs |
|
| Back to top |
|
 |
Svengali ---- E L I T E ----


Joined: 20 Oct 2007 Posts: 1025
|
Posted: Fri Apr 09, 2010 7:08 pm Post subject: |
|
|
| Griff wrote: | | The shaders below set up a varying vec2 called vTexCoord to pass texture coordinates from the vertex to the fragment shader, texture coords are now set up using gl_MultiTexCoord0.st instead of gl_TexCoord[0].st, this seems to be more AMD friendly |
Gracias Griff. |
|
| Back to top |
|
 |
Ahruman Supreme Grand Admiral


Joined: 02 Apr 2005 Posts: 5677 Location: Sweden
|
Posted: Fri Apr 09, 2010 7:09 pm Post subject: |
|
|
| Griff wrote: | | important note: if you copy and paste the above into your shaders, make sure you check for blank spaces after the \ at the end of every line in the light macro in the fragment shader (lines 74 - 79) - there musn't be any, if there are, your shader won't run and you'll have a whole load of errors in your log - basically nearly almost everyline in the shader will be flagged up as having an error in it |
I strongly recommend not using macros like that. Since 1.73, the default shader uses two functions – CalcDiffuseLight() and CalcSpecularLight() – instead. _________________ E-mail: ahruman@oolite.org
Twitter: Oolite |
|
| Back to top |
|
 |
Arexack_Heretic Dangerous Subversive Element


Joined: 07 Jun 2005 Posts: 2416 Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
|
Posted: Mon Jul 05, 2010 2:39 pm Post subject: |
|
|
Could someone give me a redirect to a howto for normal maps?
I've been looking, but not very successfully. thanks:) _________________ Riding the Rocket! |
|
| Back to top |
|
 |
JazHaz ---- E L I T E ----


Joined: 22 Sep 2009 Posts: 1340 Location: Herts, UK
|
Posted: Mon Jul 05, 2010 3:08 pm Post subject: |
|
|
| Arexack_Heretic wrote: | Could someone give me a redirect to a howto for normal maps?
I've been looking, but not very successfully. thanks:) |
Closest to what you want is here, but its quite technical. Ahruman wrote it!  _________________ JazHaz
Now *Deadly* (over 2600 confirmed kills) and is working as an assassin in Galaxy 7. |
|
| Back to top |
|
 |
Arexack_Heretic Dangerous Subversive Element


Joined: 07 Jun 2005 Posts: 2416 Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
|
Posted: Mon Jul 05, 2010 3:23 pm Post subject: |
|
|
Yeah, thanks. I've 'read' that dissertation, without understanding much of it... the technical talk was actually less confusing than visual examples. hehehe
I'm more looking for a tutorial like step-by-step overview of how to create a simple (! I'm not planning on doing anything complex...yet.) normal map.
Or bumpmap for that matter.
I'll just muddle on a bit. :p _________________ Riding the Rocket! |
|
| Back to top |
|
 |
DaddyHoggy Intergalactic Spam Assassin


Joined: 05 Dec 2006 Posts: 4899 Location: Newbury, UK
|
Posted: Mon Jul 05, 2010 3:45 pm Post subject: |
|
|
| Arexack_Heretic wrote: | Yeah, thanks. I've 'read' that dissertation, without understanding much of it... the technical talk was actually less confusing than visual examples. hehehe
I'm more looking for a tutorial like step-by-step overview of how to create a simple (! I'm not planning on doing anything complex...yet.) normal map.
Or bumpmap for that matter.
I'll just muddle on a bit. :p |
I think Griff has done one, or has previously linked to one done by somebody else.
See if there's still a demo version of CrazyBump out there - or get the normal map plug in for GIMP, that will help you make normal maps - but how to get them in to the model...  _________________ Life, the Ooniverse, Everything
Real life can be found here: DaddyH's RL
Oolite Life is now revealed here |
|
| Back to top |
|
 |
Arexack_Heretic Dangerous Subversive Element


Joined: 07 Jun 2005 Posts: 2416 Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
|
Posted: Tue Jul 06, 2010 6:40 pm Post subject: |
|
|
Say Griff,
would it be a bad idea to give my cargopods normal mapping etc,
system-resourcewise?
I had intentionally left them fairly simple, so that clouds of them would not lead to any slowdown problems,
but with the all the glowing debris clouds etc that are now possible, this concern seems a bit superceded by progress. _________________ Riding the Rocket! |
|
| Back to top |
|
 |
Ahruman Supreme Grand Admiral


Joined: 02 Apr 2005 Posts: 5677 Location: Sweden
|
Posted: Tue Jul 13, 2010 9:44 pm Post subject: |
|
|
| Arexack_Heretic wrote: | Say Griff,
would it be a bad idea to give my cargopods normal mapping etc,
system-resourcewise?
I had intentionally left them fairly simple, so that clouds of them would not lead to any slowdown problems,
but with the all the glowing debris clouds etc that are now possible, this concern seems a bit superceded by progress. |
There are several different costs to consider in this sort of question: texture storage, drawing set-up costs, per-vertex costs, and per fragment costs.
If there are many objects with the same normal map, they’ll share the same texture storage; a cloud of objects is no different from a single object.
Set-up cost is slightly higher with the extra texture map, but this should be quite small. Using the standard shader, vertex cost is the same regardless of what material effects are used.
Fragment costs are proportional to the number of pixels covered by your objects in any given frame. Having lots of small cargo pods contributing a few fragments each is much cheaper than having a single object with many fragments. Fragment count will go up when a cargo pod is near the camera, but that’s when you want time to be spent making it look pretty, so that’s all right.
In short: as long as you don’t go overboard on texture resolution, it should be fine. _________________ E-mail: ahruman@oolite.org
Twitter: Oolite |
|
| Back to top |
|
 |
Griff Oolite 2 Art Director


Joined: 14 Jul 2006 Posts: 1280 Location: Wales
|
Posted: Thu Jul 15, 2010 11:56 am Post subject: |
|
|
| Arexack_Heretic wrote: | I'm more looking for a tutorial like step-by-step overview of how to create a simple (! I'm not planning on doing anything complex...yet.) normal map.
Or bumpmap for that matter.
I'll just muddle on a bit. :p |
There must be some more in-depth posts about making normal maps somewhere on the boards, i've only managed to dig this one up though:
http://aegidian.org/bb/viewtopic.php?t=3460&postdays=0&postorder=asc&start=273
I've been making my normal maps using the Nvidia plugin for Photoshop on this page, http://developer.nvidia.com/object/nv_texture_tools.html - it's listed as "Adobe Photoshop Normal Map and DDS Authoring Plug-ins" - there's a link to a similar plugin for Gimp at the bottom of the page too.
I basically use the selection tools and the flood fill tool to paint out a greyscale height map on a set of layers above the usual colour texture layer, once i've completed that i just run it through the normal map generating plugin, see how it looks, if there's anything wrongjust step back a bit in the document history in photoshop, tweaks , adjust brightness & contrast etc then run it through the normal map plugin again.
The oolite bit of actually applying the normal map to the model has become a whole lot easier these days, you no longer need to write custom shaders (although oolite's shaders setting will need to set to full *i think* in order to see the actual normal map effect in game), it's all available using materials in the shipdata.plist for your ship, see this page on the wiki:
http://wiki.alioth.net/index.php/Materials_in_Oolite
and here's the example at the bottom of that page, modded a bit to have a normal map specified
| Code: |
materials =
{
"myship_diffuse_texture.png" =
{
normal_map = "myship_normal_map_texture.png";
emission_and_illumination_map = "myship_glow_map_texture.png";
emission_modulate_color = (160, 255, 160);
illumination_modulate_color = (180, 180, 200);
};
};
|
|
|
| Back to top |
|
 |
Ahruman Supreme Grand Admiral


Joined: 02 Apr 2005 Posts: 5677 Location: Sweden
|
Posted: Thu Jul 15, 2010 12:09 pm Post subject: |
|
|
| Griff wrote: | | The oolite bit of actually applying the normal map to the model has become a whole lot easier these days, you no longer need to write custom shaders |
There has never been a released version where you could apply normal maps with custom shaders but not the material model.
| Griff wrote: | | (although oolite's shaders setting will need to set to full *i think* in order to see the actual normal map effect in game) |
It works in simple mode too. _________________ E-mail: ahruman@oolite.org
Twitter: Oolite |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|