Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Level design lightmap problem (with pics!)

Author
Message
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 5th Nov 2003 03:26
Ok, so I'm working with lightmapping with 3ds max 5. I made this very simple scene with a light with shadows:


So now I want to get this into DBP, so I texture bake the lightmap. And it gives me this lovely unwrapped lightmap image:


But here's my problem! When I delete the two lights, load the ligtmap as a material in 3ds max, and apply it to the level, IT LOOKS LIKE THIS::


...Even though, VERY CLEARLY, as you can see in the UVW unwrap modifier, the level verticies DO IN FACT line up with the ligthmap!


So why does the lightmap render like that, both here and in DBP?! This is driving me crazy!!

dabidos
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location: United States
Posted: 5th Nov 2003 04:36
hmm, i think i found a solution. try to make a map, boolean it and all that, but i think you converted it into a mesh. what you need to do is convert it to a poly. then render to texture. pictures to prove it works is coming right up.

http://dbrand.dbpcommunity.com/media/images/lmexample.jpg
(500+kb image warning)

ill try to "knock" up a demo to see if the exported x file works.

db



code == language : anti-dmca.org
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 5th Nov 2003 07:22
ahh i think i know what is going on... this happened to me when i started doing lightmaps...

when you texture bake the image... there are some setting you have to select

Render To Textures:
General Settings:
Automatic Unwrap Mapping:
(remember these settings)

now when you want to switch to the new texture, go to the modifier tab... and DELETE the "Automatic Flatten UV's"... then use the modifier "Unwrap UVW", under params, choose "edit"... then "mapping"/"Flatten Mapping"... use the same options as when you rendered to texture...

you may ask why you have to delete the UVW modifier... just to put another one on that is identicle... honestly... i have no clue... but it works for me

QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 5th Nov 2003 07:26 Edited at: 5th Nov 2003 07:29
actually, dabidos's convert to poly fixed everything. I just have to test it in DB now. And figure out how exactly to get regular materials on it as well, because I'd have to change the uvw mapping when texturing the level.

I'll test it in db tomorrow.

AND I gotta figure out how to refine the quality of the ligtmap. Those square are large.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 5th Nov 2003 07:51
im working on the same thing
still dont know why i have to delete the thing then apply another one... because i always used editable poly's...
so if you get some more info on how to maybe simplify this... PLEASE let me know

dabidos
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location: United States
Posted: 5th Nov 2003 21:42
hmm i cant get it to work out in dbp. the uv's get all messed up like there meshes when i export in .3ds formant. when i go .x with mandex the textures dont even show up. this is wierd.

genesis, all i did was create a box, then a smaller one, boolean that small box out of big one to make a room. added some objects, booleaned that in and converted it to a poly.applied a texture created with the "standard" material. i then rendered to texture with a 768x768 complete map element.



code == language : anti-dmca.org
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 5th Nov 2003 21:58
I just got it to work in DBP. Converted to poly, exported the .x file with panda, texture baked the lights into a jpeg, loaded and lightmapped the level in pro, and now it's all pretty!!

Except the fact that the lightmap looks like crap.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 6th Nov 2003 02:41
@dabidos

making a box then subtracting a box from inside it? why not flip the normals instead?

try something simpler... just make a box for the ground and have one box on top of the other... after redering to texture and re-applying it... delete "automatic uvw map" and add a "unwrap uvw" modifier... maybe its just my computer... but it always messes up if i dont do this? and instead of boolean, use attach in the object params, i find this works better.

dabidos
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location: United States
Posted: 6th Nov 2003 04:02
@quoth
what are your settings for exporting panda? when i texture the level in dbp with "texture object 1,1" it comes out gray and stuff.

@genesis
lol that box method is stuck on my mind. its like the norm for me. reapplying it? after you render the texture it should be all ready for exportation. boolean is also the norm for me. i also use autogrid with it. i think its easier



code == language : anti-dmca.org
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 6th Nov 2003 05:31
aaaannnddd now it's back to not working and texturing all stupid. Editable poly isn't a complete fix sadly...and I have no idea how to get that texture on straight.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 6th Nov 2003 06:10
@dabidos
i will try your method and see if i can find out what is going on... see if i can help any

@quoth
if you export it correctly, and have the texture in the correct folder, you shouldnt have to use 'texture object'... because the texture should automatically load

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 6th Nov 2003 06:42
i still think the problem is you have to delete the "Automatic UVW Map" and replace it with "Unwrap UVW"... doing this worked for me....

view in 3ds... (this is why i dont like using boolean, textures look messed up)


render to texture - complete map


and an actual in-game shot from DB


Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 6th Nov 2003 07:37 Edited at: 6th Nov 2003 07:38
**** UPDATE ****
found an easier way to do this!... however i dont know if there is any implications on how DBP will be affected (performance wise)

-make the geometry of you level, steer away from attach OR boolean operations, as the larger the object is, the quality of your texture will decrease!

-apply textures, UVW maps and lighting until you have it looking like you want it

-render to texture all the seperate objects using complete map

-re-apply newly created textures

-DELETE any UVW map modifiers (unless you have a "unwrap uvw", then skip next step)

-add "Unwrap UVW" modifier

-under the "Unwrap UVW" modifier, "Parameters", click "Edit"

-in editor window, ensure there is nothing selected... then go to "Mapping", "Flatten Mapping" default values are actually messed up! "Spacing" is 0.03, this needs to be 0.02 (value in render to texture)

-now all objects should be correctly mapped and look right... select ALL the objects (ones you want to be your level)... export to a .x file using pandasofts exporter (config below)

-Pandasoft Exporter Config:
http://members.lycos.co.uk/mrdarclyte
only thing you need to change is... under "3DS Max Objects", "Output Options"... "Include Animation" (select this if you have animation, if you dont, make sure its unselected!)

DONE! this will create ONE object that uses multiple textures... i tested the .x animation, rotation, and movement... and it all worked... these are actually the identical steps i used to make a test! so this should work!

QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 6th Nov 2003 18:59
Dude, can you email me the code for that and the media?

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 6th Nov 2003 19:49
me too please!

thanks

My philosophy:
LESS CHAT MORE SCREENIES.
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 6th Nov 2003 20:01 Edited at: 6th Nov 2003 20:10
deleted the code and stuff already... but in about 2 minutes i made it again... the code and media can be downloaded from...

http://genesisrage.com/downloads/lightmap.zip
-512kb file-

QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 6th Nov 2003 22:02
Oooh...you didn't use the set light mapping on command in dbp, you actually baked it to the textures and used those.

I'm worried that that would have a huge filesize on big levels...

QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 6th Nov 2003 22:49
Genesis, did I ever tell you that I love you?

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 7th Nov 2003 00:05
ummm....me too

My philosophy:
LESS CHAT MORE SCREENIES.
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 7th Nov 2003 01:30
Actually genesis that's not a perfect method, if I want to create larger levels then I'll have massive amounts of textures.

Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 7th Nov 2003 01:41
You also lose the quality of the texture using that method unless you make the output resolution massive.

It would be good if you can set the uvmap of all the objects into one uvmap but you cant in 3dsmax without making the level into one mesh. Does anyone know how to do it?

Once you start down the Dark Path, forever will it dominate your destiny...
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 7th Nov 2003 06:02 Edited at: 7th Nov 2003 06:19
Actually again Genesis this is a terrible idea. I've just tried to lightmap texture a subway level I'm working on, and this lightmap method is absolute filfth. I have 65 mb of lightmaps (if they were smaller I'd lose texture quality beyond any recognition), and now with this method I have to manually apply all of them to each object. I don't have enough material slots in max to put these textures back on, and it's far too time consuming, resourse consuming, and work consuming.

I can't continue this way.

There has to be a better way.

And now we're back to SQUARE ONE.

I'm stabbing my eyes out with pencils right now.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 7th Nov 2003 08:35 Edited at: 7th Nov 2003 08:52
if you used a strict lightmap image... they would have to be big as well... or you would see distortion in the shading... as you can tell, i only used a small level for this, so have no idea what it would do for a larger level...

i guess i will mess around with it a bit more... see if i can come up with something better... if we could find out how to make a single lightmap (black/white) image that would work correctly... that would be better... if the image was a .gif (only saves colors that are used, bmp saves all colors, including ones not used!)...

unless someone knows how to do this better... im at a loss

=- edit -=
yup... im lost... i cant figure out an easier way to do this

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 7th Nov 2003 09:04
ok.
We are all screwed.

My philosophy:
LESS CHAT MORE SCREENIES.
dabidos
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location: United States
Posted: 7th Nov 2003 09:05
well i know that if all your colored materials are using map channel 1, and your rendered "lighting map" element is using channel 2, a nice low sized light map comes out. what i cant figure out is how to export it correctly. i followed the darclyte site without the animations and when i try to load it into dbp, i get an error saying it can't load object.

@genesis
can you tell me your exact exporting options? mine always comes out fudged up when i try to load it into dbp.



code == language : anti-dmca.org
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 7th Nov 2003 09:13
@dabidos
mine are identicle to Darclyte's... except with the animation un-selected

@quoth
with that subway level, how do you have it textured... is it using multiple textures... are some tiled... what can you tell me about how you textured the level... hopefully i can figure something out... because it doesnt look like were getting help from any of the DarkBASIC "Elite"!

Wolfish King
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: The Netherlands
Posted: 7th Nov 2003 15:00
Nice work, reminds me of the Resident Evil series...
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 7th Nov 2003 15:42
Genesis, he's a screenshot from the lobby

That's in max, and that's what I want the lighting to look like. All of the textures are tiled.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 7th Nov 2003 20:37
i starting to think that the only way we are going to be able to do this is by using some kind of vertex or pixel shader... or something like that... still have no clue!

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 9th Nov 2003 18:06
didnt roswell racer use one? And they made thier tracks in 3ds max too.

My philosophy:
LESS CHAT MORE SCREENIES.
Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 9th Nov 2003 18:09
yep they did, look at this wicked shi*



My philosophy:
LESS CHAT MORE SCREENIES.
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 18:13
NOW HOW DID THEY DO THAT?

it might not be what im looking for... but it could be a starting point!

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 9th Nov 2003 18:16 Edited at: 9th Nov 2003 18:16
I dunno but ESC just explained it, head over to
http://darkbasic.thegamecreators.com/?m=forum_view&t=17951&b=8&p=2
and see.

My philosophy:
LESS CHAT MORE SCREENIES.
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 18:22
he didnt explain anything... he just said he used vertex colors... thats it... not actually how to do it

ESC_
22
Years of Service
User Offline
Joined: 29th Aug 2003
Location: Mass.
Posted: 9th Nov 2003 18:30 Edited at: 9th Nov 2003 18:32
Well, for whatever silly reason, DBP doesn't have support for loading in vertex colors (hopefully this will be added natively in the next patch). Memblock meshes do support, though. What was required to do this was to parse an ascii .x file and create a memblock with that information. There were some bugs with it though, and it only just started working with a special rebuilt .dll from Lee that will be released with U 5.2

''For nonconformity, the world whips you with its displeasure''---Ralph Waldo Emerson
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 19:05
ugg... didnt think doing simple lighting would be so dang difficult!... hope there are some nice advancements with 5.2 or 6!

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 9th Nov 2003 19:05
screw this,its too confusing I'm just gona use lights.

My philosophy:
LESS CHAT MORE SCREENIES.
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 19:18 Edited at: 9th Nov 2003 19:21
i havent resorted to using lights... yet... for some areas i would need more than 8 lights to get the desired results... so until there is an easy way to do lightmapping, that doesnt require HUGE image files... my project will stay lit the same

where would someone go if they wanted to see if a certain command implimented? like:

SET LIGHTMAPPING ON image number, texture number, map channel

dont know if you can export .x files with multiple map channels, but i know in Max you can make objects with multiple map channels... which how it would work is you can have your textures tiled and everything... but then a lightmap for the entire object using a different set of UV coords, and use one texture... but still preserve the multiple textures on the objects?

=-edit-=
because if a .x file can hold multiple map channels, and had a command like this... this would solve ALL my problems with static lighting!

AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 18th Nov 2003 03:21 Edited at: 18th Nov 2003 03:23
Quote the Raven: Max automatically applies new UVs to a texture you make (its sooo dumb ). Get bakersfield
http://www.chuggnut.com

[P4 2.8C @ 3.03 with an 866mhz FSB:: MSI Neo-2LS running PAT:: 1gb Mushkin PC-3500 DDR High Perf level 2@ 2,2,2 :: ATI Radeon9800ProAIW :: 120Gb SeagateBarracuda 7,200RPM SATA HD :: Antec Plus1080AMG]
AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 18th Nov 2003 22:47
" starting to think that the only way we are going to be able to do this is by using some kind of vertex or pixel shader... or something like that... still have no clue!"


No pixel or vertex shader needed. Multi texturing is all you need. The only limitation is that you must share the same UVs, however in your case that isnt a problem. I would ues a multi texturing approch because you can make your level textures tile in game and use a lower res version of the lightmap.

[P4 2.8C @ 3.03 with an 866mhz FSB:: MSI Neo-2LS running PAT:: 1gb Mushkin PC-3500 DDR High Perf level 2@ 2,2,2 :: ATI Radeon9800ProAIW :: 120Gb SeagateBarracuda 7,200RPM SATA HD :: Antec Plus1080AMG]
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 19th Nov 2003 00:11
no that doesnt work... if you tile the images (for walls)... the light map will also get tiled... does not get anywhere near what we are looking for...

you can not have tiled textures if want to use a lightmap... that is what i have been messing with for about 2 months now... multi texturing does not work the way we want it to, because i have already tried that!

AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 19th Nov 2003 04:39
ahh i see. There must be a way around this. I know that DBP doesnt support multiple Uvs but Tiling one texture and not tiling the other are not the same as different UVs.

[P4 2.8C @ 3.03 with an 866mhz FSB:: MSI Neo-2LS running PAT:: 1gb Mushkin PC-3500 DDR High Perf level 2@ 2,2,2 :: ATI Radeon9800ProAIW :: 120Gb SeagateBarracuda 7,200RPM SATA HD :: Antec Plus1080AMG]
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 19th Nov 2003 06:28
...I don't wanna go to bsp because nuclerglory's dll is much faster than any of dark basic's collision...but I don't want a .x level without a lightmap......for now, we're screwed.

AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 19th Nov 2003 09:31
There are other possibilities.

[P4 2.8C @ 3.03 with an 866mhz FSB:: MSI Neo-2LS running PAT:: 1gb Mushkin PC-3500 DDR High Perf level 2@ 2,2,2 :: ATI Radeon9800ProAIW :: 120Gb SeagateBarracuda 7,200RPM SATA HD :: Antec Plus1080AMG]
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 20th Nov 2003 01:13
@froggermon
dont know what editor or where you get your ideas from... but if you have an object with tiled texture... you can not put another texture on it without tiling it... i use 3DS Max 5... and through my experience and other people's... this is not possible with 3DS...

about other possibilities... that is what this thread is trying to find out... but so far there are no worth-while possibilities to do this

Megaton Cat
22
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Toronto, Canada
Posted: 3rd Dec 2003 03:21 Edited at: 3rd Dec 2003 03:24
arg...sorry for bumping this but I think I may have found something similar to what we are trying to achieve. You may have heard of it, Its called quill 3d and it exports to .x
Here are some screenshots...



and the site here...http://quill3d.users.btopenworld.com/

Visit our new site! : http://www.megatoncreations.tk

If life throws you a grenade...pull the pin and throw it back!

Login to post a reply

Server time is: 2026-07-23 02:36:43
Your offset time is: 2026-07-23 02:36:43