Aller au contenu

Photo

lighting problem in custom room


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

#1
mikemike37

mikemike37
  • Members
  • 669 messages
im using a couple of models imported into the toolset, and custom materials to make a room. I'm having problems with the lighting though and can't figure out why. Not sure if the issue is with my custom resources or if I've set up the level lighting wrongly...

stepping into the room causes the lighting to decrease and flatten (as though resorting to only ambient). Also, the character disappears entirely. See video for demonstration:



I currently have two point static and two point baked lights as well as an ambient. The only errors i get when rendering the lightmaps are (one for each of the custom models used to make the room):

W: 10:00:07 - Could not find meta data for bg2_id1_rc_room01
W: 10:00:07 - Could not find meta data for bg2_id1_rw_room01
W: 10:00:07 - Could not find meta data for bg2_id1_cf_room01


Any help on this would be greatly appreciated :)

Modifié par mikemike37, 12 mars 2010 - 03:14 .


#2
BioSpirit

BioSpirit
  • Members
  • 261 messages
The "floor" is obviously lacking a physics information. Which will cause the player to "fall".
Does the pathfinding complete correctly ? Is there a green points over the floor ?

The meta data isn't a real problem. You will need a *.met file with your *.msh and *.mmh files. For the core resources the meta files are located in arttools.erf.
The meta data problem was solved just a while ago, automatic generation of *.met is not yet included in any exporter. It's pretty easy to do manually since it's just a xml file.

I suppose the lighting problem is caused by the physics problem.

Modifié par BioSpirit, 12 mars 2010 - 04:55 .


#3
mikemike37

mikemike37
  • Members
  • 669 messages
thanks for your reply - im about to finish off the collision in that room shortly (30 mins) - It had walkable but no "barrier" type collision to prevent a player stepping off the walkpaths. Although im surprised that that could be the cause for bad lighting...! lets hope so!

Modifié par mikemike37, 12 mars 2010 - 05:14 .


#4
mikemike37

mikemike37
  • Members
  • 669 messages
okay so ive added collision, which has been reflected correctly in the walkpath and the Visualize Collision Objects within the toolset... but strangely, it seems to have had no effect on the in-game result. I have done all export operations.



The darkening and player disappearance happens whenever i step off that DA-vanilla square in any direction onto any non-DA object. "burying" a DA objet way beneath my stuff causes the lighting to work correctly so long as the player is directly above the DA object. The walkmesh is still not behaving as indicated by the green/red dots, however.

#5
BioSpirit

BioSpirit
  • Members
  • 261 messages
With the physics information I was meaning a *.phy file. It should be located with your *.msh and *.mmh. If I recall correctly the *.phy is created by GraphicsProcessorMMH or GraphicsProcessorMSH. It would also require some specific parameters in *.mmh.xml but I don't remember what exactly is that.



Maybe it's this:

<CollisionObject Kinematic="true">
	<Shape Name="Box04" Type="Box" AllowEmitterSpawn="1" Fadeable="false" DimY="0.402201" DimZ="0.499925" DimX="0.402202" GROUP_MASK_PLACEABLES="true" GROUP_MASK_WALKABLE="false" GROUP_MASK_NONWALKABLE="true" Rotation="0.0 0.0 0.0 1.0" Position="0.0 0.0 0.500073 1.0" />
	</CollisionObject>



There are a lot of sample files available.

#6
mikemike37

mikemike37
  • Members
  • 669 messages
oh yeah its got one a phy, msh and mmh for each model ( thre models are walls, floor and ceiling). my current setup, that yielded the above result, shown in the video below, is as follows:

Posted Image

did a new video, be ready shortly -

it shows the game ignoring the red dots of the walkmesh pictured above and the lighting work so long as the player is above the tile, but not if the player steps farther into the room (and hence away from the buried tile)
 

Modifié par mikemike37, 12 mars 2010 - 06:29 .


#7
BioSpirit

BioSpirit
  • Members
  • 261 messages
One possibility is to take a copy from a *.phy file of some existing DA object like a floor. Rename the file to match yours and edit the name parameter MMH_NAME with the Toolkit.

#8
mikemike37

mikemike37
  • Members
  • 669 messages
where can i find the DA phy files? EDIT: nvm found them

Modifié par mikemike37, 12 mars 2010 - 06:39 .


#9
mikemike37

mikemike37
  • Members
  • 669 messages
okay we may be onto something. using the tvi_floor_01 tile (about a 6mx6m tile) phy file and changing the mmh as you suggested has had an interesting result.



The collision is now gone completely and walkmesh hasnt processed, but thats to be expected i guess. the room also has the bad lighting and invisible character EXCEPT for a 6mx6m square in the middle of the room.



so we may have diagnosed the problem as a bad phy file! i'll get in touch with ChewyGumball see if its his script or if its tazpns tools giving a faulty phy file.



thanks for your help!

#10
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
Twould not be tzpan's tool, he just calls the graphics processor program.

#11
mikemike37

mikemike37
  • Members
  • 669 messages
for any finding this topic at a later time... the fix was to use the Static Geometry flag - not a problem with the phy file. this solved both collision and lighting issues. well figured out chewy!

EDIT: also, use Generic collision and not placeable collision.

Modifié par mikemike37, 12 mars 2010 - 09:51 .