All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Bump mapping textures
PostPosted: Sat Jul 25, 2009 4:41 pm 
Offline
Marksman
Marksman

Joined: Mon Oct 13, 2008 10:05 pm
Posts: 6
I've been working on bump mapping some textures and well i just can't get a hang of it. I'm using this script:
Code:
textures/stone/old_cobblestone
{
    q3map_normalimage    textures/stone/old_cobblestone_map.tga
    qer_editorimage    textures/stone/old_cobblestone.jpg
    q3map_lightmapsamplesize    1x1
   {
       map $lightmap
       rgbGen identity
   }
   {
       map textures/stone/old_cobblestone
        blendFunc GL_DST_COLOR GL_ZERO
   }
}


Both of the images are in 512x512 size, if that makes any difference. Please help.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 25, 2009 7:21 pm 
Offline
Sharp Shooter
Sharp Shooter

Joined: Wed Jun 17, 2009 6:42 am
Posts: 29
Cant see problem with that.
it seems that your script works.
So you cant see any difference when you use r_lightmap? Have you checked your lights? Maybe they are pointing the surface in a way that shadows are not generated. Try to put q3map_lightmapsamplesize 1x1 before q3map_normalimage command and remove rgbGen identity from the script.
I dont know much about those things myself either :lol: try that.
Light bounce might affect to that too as it illuminates the surface from many directions.

- sorry for editing this post so many times. Im bit drunk right now.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 25, 2009 8:13 pm 
Offline
Marksman
Marksman

Joined: Mon Oct 13, 2008 10:05 pm
Posts: 6
I probably should have pointed out in the first place that the main problem was that the texture wasn't even showing up, it was simply a black texture with orange lines. Before i implanted the script the normal texture worked fine but as soon as I put in this script it now won't even show up.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 25, 2009 8:37 pm 
Offline
Sharp Shooter
Sharp Shooter

Joined: Wed Jun 17, 2009 6:42 am
Posts: 29
hey. put the both images (normal image and textrue itself) in same fileforemta.

and use .TGA or .JPG here too

{
map textures/stone/old_cobblestone
blendFunc GL_DST_COLOR GL_ZERO
}

make it old_cobblestone.TGA or old_cobblestone..JPG

shuld work


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 25, 2009 9:50 pm 
Offline
Marksman
Marksman

Joined: Mon Oct 13, 2008 10:05 pm
Posts: 6
I fixed an easy mistake and i got the textures to show up but still much to my disappointment the bump mapping is still not working, here is my final code i was using:
Code:
textures/stone/old_cobblestone.jpg
{
    q3map_normalimage    textures/stone/old_cobblestone_map.jpg
    qer_editorimage    textures/stone/old_cobblestone.jpg
    q3map_lightmapsamplesize    1x1
   {
       map $lightmap
       rgbGen identity
   }
   {
       map textures/stone/old_cobblestone.jpg
        blendFunc GL_DST_COLOR GL_ZERO
   }
}


I'm almost positive that the the rgbGen identity needs to be in there. I just don't know whats going wrong...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 26, 2009 7:36 am 
Offline
Sharp Shooter
Sharp Shooter

Joined: Wed Jun 17, 2009 6:42 am
Posts: 29
Billbo675 wrote:
I fixed an easy mistake and i got the textures to show up but still much to my disappointment the bump mapping is still not working, here is my final code i was using:
Code:
textures/stone/old_cobblestone.jpg
{
    q3map_normalimage    textures/stone/old_cobblestone_map.jpg
    qer_editorimage    textures/stone/old_cobblestone.jpg
    q3map_lightmapsamplesize    1x1
   {
       map $lightmap
       rgbGen identity
   }
   {
       map textures/stone/old_cobblestone.jpg
        blendFunc GL_DST_COLOR GL_ZERO
   }
}


I'm almost positive that the the rgbGen identity needs to be in there. I just don't know whats going wrong...


No it does not need to be there. Its just that do you want it to be there. So if you want leave it there. Now there is only one thing that I think might cause the failure.

Quote:
textures/stone/old_cobblestone.jpg <--
{
q3map_normalimage textures/stone/old_cobblestone_map.jpg


take filename off from the script name. You accidentally put it there too i guess. Remove it and you are good to go.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron
Style created by © Matti, gry komputerowe, reklama sem reklama seo

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group