Half Life maps all black

Discuss the construction of maps and the tools to create maps for 3D games.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Half Life maps all black

Post by Ghost_Fang »

I just added half life bsp support to my stock GLquake iphone port using baker's tutorial. I made a Half life format map and tested it and it was entirely black. Almost like i didn't add light. I did, even if i didn't add a single light entity the engine automatically makes it fullbright. It worked in darkplaces in <= High lighting settings, but if i put full lighting i get the same effect: Blackness. I dont think its my worldcraft /compiling because i tested c0a0 from half life and i still get blackness. I even tried using quake's format of light by making brightness 500 instead of XXX XXX XXX. And still nothing.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

this would probably go better in engine programming.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

are you sure its the lightmap and not the palette?
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

It's definitely the palette.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

ceriux wrote:this would probably go better in engine programming.
Oh, sorry, well i though it was a map issue rather than engine programming since it compiled with no warnings or errors.


How would i fix this? Its stock GLquake i followed bakers tut completely and this is my result. What do i do?
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

from what i remember there was something messed up in the tutorial. read the whole thread i think there might be a how to fix the issue some where in there.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

I think i found it. It looks like spike mentioned something about the lighting and baker's method is wrong, ill change it to his and try it tonight.
Spike wrote:in baker's stuff, I don't see the divide-by-3 for the lightmap offsets.
Also, that 'beam' brush in baker's screeny seems to have the same lined effects, as well on the walls.

Ah, right... step #13 is wrong. It greyscales it, but leaves it as 3-componant. Which is wrong.
What you should do is divide the surface lightmap offsets by 3, and average the 3 rgb lightmap values and scale them down.

so:
loadmodel->lightdata = loadmodel->lightdata[i+1] = loadmodel->lightdata[i+2] = out;
becomes:
loadmodel->lightdata[i/3] = out;

but yeah, you need to divide the msurface_t lightofs field by 3 too, but only for halflife maps.
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

That probably wouldn't result in an entirely black map, more likely a zebra-striped map.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

yea, i added spike's fix and still completely black. What else could be the problem? I'm gona triple check the tutorial again and make sure i followed it 100%. It can't be my compiler(s) because I used c0a0 from half life and it was 100% black too.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

I'd really like to fix this because I'm practically there, it "kinda" works and i hate it when i do things and it "kinda" works. But i haven't ever done engine before and I would like my mod to have hlbsp because its a great feature to have. So if you guys could help me out I would really appreciate it. Spike's fix didnt work, i even skipped step 13. I just want this to work, you guys would know more than me. Thanks in advance.
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

The only difference between Quake and HLBSP is the texture support, so you could have the entire thing wrong for all we know.

The iPhone uses OpenGL ES and Objective C, which is worlds different from regular OpenGL and C. You probably fucked up.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

if its entirely different dont you think i would have caught on? Its like the psp engine, it has the psp part and the basic quake engine code too. Its no different than any other GLquake on any other platform. Its ID's default GL source. I followed the tutorial word for word, now how the fuck could i do that if its entirely different? I dont care how well of a programmer you are, its not a free pass to be a douchebag. You had to start somewhere too. I'm one of the few people who has the balls to take the time to learn programming. The last thing i need is a stuck up programmer with a bad attitude bringing me down. I just want my game to be a decent quality to do that I need some engine modifications and I have not messed with engine ever. I got the QC covered, im pretty good at that. I just would appreciate some help with an engine issue.

Quote from TMSoft, porters of the engine:
"Kevin Arunski started the project by downloading the GLQuake source code from ID Software. He ported the graphics, sound, and networking. Todd Moore joined in and implemented the user interface and player controls."

All they did was make the GLquake work on ipod. So its should still be in your guys' knowledge to be able to help me.
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

I'm not being a douchebag, I'm telling you that there's a difference between OpenGL and OpenGL ES, as well as Objective-C and C. You actually have to know all four of them to be able to port efficiently and in a timely manner.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Post by Ghost_Fang »

Oh, well I apologize then, i just dont think there is a nice way to say "you fucked up". And its not written in OpenGL ES, I don't see what you guys are missing.. Do you want the entire source? I can give it to someone if they are willing to help me. If open GL and openGL ES is entirely different, how could i have followed baker's tutorial word for word with no issues?

Lets just pretend i tried this for the PC and got the same effect. Where would you suggest i start trying to fix it at?
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

Ghost_Fang wrote:Lets just pretend i tried this for the PC and got the same effect. Where would you suggest i start trying to fix it at?
8bpp -> 32bpp conversion
Post Reply