Aller au contenu

Photo

Lighting problem on new model


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Charsen

Charsen
  • Members
  • 2 266 messages
I'm making some floor tiles and having a bit of a lighting problem with some new floor models that I made. Here's a simple test area with a game tile (stone floor) next to my tile (red and black) with a non-placeable (static) chest.

In the area editor:
Posted Image

My lights (1 of each):
ambient: affects characters: False, affects Level: true
baked: affects characters: False, affects Level: true
static: affects characters: True, affects Level: false, Occluded: false


My models are exported with the following specs in 3DS Max 2011 with these settings:


Dragon Age Material
Material type: Static (lightmappable)

Textures used:
Diffuse dds 
Normal dds 
(No spec used)

Mesh object options checked on:
Cast runtime shadow  
Cast baked shadow
Receive Runtime shadow
Receive Baked shadow

In the toolset level editor my process is this:
Lay down baked, ambient and static lights just to test the floor
Lay down a light probe
Render Lightmaps
Render Light probes
Generate Pathfinding
Post to Local

anyone have any ideas about what I could check? i just wanna make sure these render like regular floor tiles. thanks! 
:wizard:

Modifié par Charsen, 13 octobre 2010 - 09:06 .


#2
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Did you generate a second set of UV co-ords with no overlapping for the light map?

#3
Charsen

Charsen
  • Members
  • 2 266 messages
Thanks DarthParametric,

yes i applied a 2nd UVW Unwrap to channel 2 and it didnt overlap however, i did get an error when exporting.

no overlap:
Posted Image

channel 2:
Posted Image

but it won't export the 2nd UVW:
Posted Image

not sure why it's not exporting though.

oddly on 2nd export it doesn't give me that error. strange...

Modifié par Charsen, 13 octobre 2010 - 06:02 .


#4
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Hrmm...I'm not really familiar with the inner functionality of Max, but it would seem you have your texture applied to channel 2 (lightmap UVs) instead of channel 1 (texture UVs) according to that error. Not sure why it would say channel 2 doesn't exist though. Maybe post your files for someone to look at.

#5
Charsen

Charsen
  • Members
  • 2 266 messages
well, it seems to export correctly if i export it a second time right after the 1st export. odd, but hey, it seems fine if i do that. weird but it works. =]

#6
Charsen

Charsen
  • Members
  • 2 266 messages
actually, having been playing around with this, and it's not fixed at all. i am not sure if it's a 3ds max problem or a toolset lighting problem.



I keep getting a half-shadow or triangles.



Posted Image



i have an ambient baked light and static (characters=true, level=false) lights. i get this odd pattern on all my new tiles.



any help would be great, i've been working on this for a while with no success at all.



could someone please give me a tip on what could be causing this problem? Here's one of my tiles plus the max file etc: http://www.megaupload.com/?d=TJZDOX0L



you'd put it in your Documents\\BioWare\\Dragon Age\\packages\\core\\override to access it in the toolset.



i have 21 tiles that i would like to release as modder resources asap, but this weird lighting problem is holding it up and i'm just at a loss for an explanation.

#7
Charsen

Charsen
  • Members
  • 2 266 messages
could this be due to the lack of a specular map? i didn't generate one because it seemed too metallic with them.

edit:
applied a spec mask image, still had the same problem.

Modifié par Charsen, 16 octobre 2010 - 12:36 .


#8
tmp7704

tmp7704
  • Members
  • 11 156 messages
Since the lighting is stored/calculated through UVs provided in the second channel, odds are that info didn't actually export correct on your sub-sequent try.

edit 2: there actually is issue with the lightmap -- the sides of your model have degenerate UVs (not triangles but lines), probably as result of using planar projection UVs for the whole mesh.

To fix it use atlas mapping to generate your UVs or something similar, if possible.

Modifié par tmp7704, 16 octobre 2010 - 02:13 .


#9
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
You might want to watch this video which shows an easy lightmap UV generation method. Ignore lightmap errors in the toolset - it never shows them properly. You'll need to export to the game to see if there are actually problems or not.



By the way, there should really be no need to export a floor tile as a cube. You should only need the top face (i.e. 2 tris). At the very least, you could delete the underside. They are just wasted polys and wasted space on the lightmaps. Also, you are using an incorrect normal map. DA doesn't use regular tangent space normal maps. See here and here for more info and the conversion process.

#10
Charsen

Charsen
  • Members
  • 2 266 messages
thanks guys, i really appreciate your advice as always.

i don't know what atlas mapping is, it's not a modifier i'm familiar with. I suppose it's a plugin, but the only plugin i found by that name doesn't seem to work.

i was using boxes because i just wanted to see if i could get the process working and was just making a simple object.. i should have done a plane but i wasn't sure if that would be too difficult to see and grab in the level editor. but i have deleted the sides and bottom to make it more efficient now.

i did follow the video the first time i made my objects, though, that's the only problem. i am not sure what i did that is different from the video. he used uvw unwrap twice, channel 2 for the top, etc.

i'm going to convert the normals with the processor utility this time, could that alone be the reason why my shadows look funky? btw tmp, thanks again - and also the degenerate mapping should be removed now that it's just a plane anyway. do you think atlas mapping is a requirement?

Modifié par Charsen, 19 octobre 2010 - 01:56 .


#11
tmp7704

tmp7704
  • Members
  • 11 156 messages
I'm not sure if 3ds max has atlas mapping out of the box (it's kind of mapping which automatically "breaks" the object into chunks which can be textured in plannar manner)

For your item since it's a simple cube, you can probably try to use "box mapping" in the "uvw map modifier" applied to the mesh. Any better instructions, you'll probably need someone who's actually familiar with 3ds max, i haven't used it in ages and never really in-depth, sorry.

edit: but if you changed your model just to simple plane then planar mapping should suffice for it, yes.

Modifié par tmp7704, 19 octobre 2010 - 07:42 .


#12
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
Its not called atlas mapping in 3dsmax. Its called flatten mapping. If you apply an Unwrap UVW modifier to your object, select all your faces, click the edit button on the modifier, go to Mapping and select Flatten Mapping. Have 0.0 as your face angle threshold and the other settings don't matter. That will give you a good mapping for lightmaps.

#13
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
That's what Mike uses in the prop tutorial video I linked to, as I recall.