Jump to content

Problems with shadows....


Recommended Posts

Hi all!!

I need help with this problem. I've created an object in MAX and inserted into the editor.

But that can not generate the shadows correctly. An example:

mytowerpq4.th.jpg

The sun is behind the tower, but the light illuminates the walls giving that side, even if they are inside the tower, which should be dark.

The same thing happens with two more buildings. It is as if the light passing through the walls of these objects.

Reviewing the file. XML, I saw that this line has some markers, which I am wrong but, make that line is not loaded.

The problem is that if you remove these markers and try to open my map editor, gives me Crash.

This is the code (in Bold, the problem):

<dynamic_object xmlns:xi="x">

<diesel file="/data/objects/props/torre/torre.diesel" materials="/data/objects/props/torre/materials.xml" orientation_object="root_point"/>

<decal_surfaces static = "true">

<ds_mesh object="torre" material="stone" hidden="false" />

</decal_surfaces>

<!-- <object name="torre" hidden="false" shadow_caster="true" instance_struct="world_tm_ambient_cube"/> -->

<body editable="true" name="torre" template="static">

<object name="root_point"/>

<object name="torre" collision_type="mesh_mopp" hidden="false" />

</body>

<lightmap>

<object name="torre" height="64" width="64"/>

</lightmap>

</dynamic_object>

This marks (<!-- and -->)

Can anyone help me?

I have already completed the map, but until it does not correct these mistakes .....

Link to comment
Share on other sites

HI


<?xml version="1.0" encoding="iso-8859-1"?>

<dynamic_object xmlns:xi="x">


	<diesel file="/data/objects/props/torre/torre.diesel" orientation_object="root_point" materials="/data/objects/props/torre/materials.xml"/>


	  <body editable="true" name="torre" tag="concrete" template="static">

		  <object name="root_point"/>

		  <object name="torre" collision_type="mesh_mopp" hidden="false" material="stone" shadow_caster="true"/>

	  </body>


	  <decal_surfaces static="true">

		  <ds_mesh object="torre"/>

	  </decal_surfaces>


	  <lightmap>

		  <object name="torre" height="512" width="512"/>

	  </lightmap>


</dynamic_object>

shadow_caster="true" isn't nedeed if you place some ambient point around and inside the torre

for the lightmap you have to create the uvw in channel 4 in max and edit it to remove polygons overlap(unfolding).

the lightmap is the only method to have best result

Bye

Link to comment
Share on other sites

Hi xdxxdy

I understand what you say, and I tried to insert the code that I've, in my objects.

What I do not understand is how do what they told me: "for the lightmap you have to create the uvw in channel 4 in max and edit it to remove overlap polygons (unfolding)"

It is done in Max? I sought a similar option, but not the meeting. :(

Thanksss

Link to comment
Share on other sites

Hi

this rar contain a simple model to show the unwrap editor in max and 3 screenshot

http://files.filefront.com/unwrap+channel+...;/fileinfo.html

if you see some defect in the lightmap rendered along the hard edges of your model you can increase the "spacing value" in the "flatten mapping..." window or increase the resolution of lightmap inside torre.xml(i prefear the first solution to keep low the render time).

Link to comment
Share on other sites

  • 2 weeks later...

Can not solve the problems of shadows, or by following the steps xdxxdy made earlier :wall::wall:

I returned to make a tower (for my new adaptation) and here you can see what I can think of:

The building on the right is an object of Graw, and the left one is mine.

You can see that my tower is much more dark by the side that receives the shade as the other. I used the same texture, but I do not understand what is happening..... :hmm::hmm:

graw22008053018564146jp1.th.jpg

Link to comment
Share on other sites

Thanks friend :thumbsup:

So I would not give many clues, but because it solve these problems (which detract from realism to the map), I may not get to the public :unsure:

I have this defect, I do things right or not do it :huh:

But if you want a clue .... is an adaptation of a map of Graw .... if you've played, maybe you ring ;)

Link to comment
Share on other sites

  • 1 year later...

Continuing this post to not open another.

I've tried a thousand times, but can not get buildings that I create with 3DSMAX generate dark inside.

I've done step by step direction xdxxdy gave me, I have generated the corresponding XML, added the "ambient_points", rendering ...... does not work.

Example of a building for my new map:

CASA_TERRAZA.xml


<?xml version="1.0" encoding="iso-8859-1"?>

<dynamic_object xmlns:xi="x">


	<diesel file="/data/objects/props/casa_terraza/casa_terraza.diesel" orientation_object="root_point" materials="/data/objects/props/casa_terraza/materials.xml"/>


	  <body editable="true" name="casa_terraza" tag="concrete" template="static">

		  <object name="root_point"/>

		  <object name="casa_terraza" collision_type="mesh_mopp" hidden="false" material="wood" shadow_caster="true"/>

	  </body>


	  <decal_surfaces static="true">

		  <ds_mesh object="casa_terraza" material="wood" hidden="false"/>

	  </decal_surfaces>


	  <lightmap>

		  <object name="casa_terraza" height="512" width="512"/>

	  </lightmap>


</dynamic_object>

MATERIALS.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<materials>


	<material name="techos" src="bump" material="wood">

		<diffuse_texture file="arroyo_wood_shack_xy_df"/>

		<bump_normal_texture file="arroyo_wood_shack_xy_bm"/>

	</material>


	<material name="tejas" src="bump" material="wood">

		<diffuse_texture file="arroyo_roof_wood_xy_df"/>

		<bump_normal_texture file="arroyo_roof_wood_xy_bm"/>

	</material>


	<material name="suelo" src="bump" material="wood">

		<diffuse_texture file="cs_ship_deck_df"/>

		<bump_normal_texture file="cs_ship_deck_bm"/>

	</material>


	<material name="vigas" src="bump" material="wood">

		<diffuse_texture file="cs_wood_roof_xy_df"/>

		<bump_normal_texture file="cs_wood_roof_xy_bm"/>

	</material>


	<material name="paredes" src="bump" material="wood">

		<diffuse_texture file="cs_wood_planks_01_xy_df"/>

		<bump_normal_texture file="cs_wood_planks_01_xy_bm"/>

	</material>


</materials>

ATLAS_CASA_TERRAZA

<texture_set name="atlas_props/atlas_casa_terraza/diffuse" allow_autoload="true">

<image name="arroyo_wood_shack_xy_df" category="props" orig_name="arroyo_wood_shack_xy_df" orig_mip_filter="CATMULLROM" orig_forced_width="256" orig_forced_height="256" />

<image name="arroyo_roof_wood_xy_df" category="props" orig_name="arroyo_roof_wood_xy_df" orig_mip_filter="CATMULLROM" orig_forced_width="256" orig_forced_height="256" />

<image name="cs_ship_deck_df" category="props" orig_name="cs_ship_deck_df" orig_mip_filter="CATMULLROM" orig_forced_width="256" orig_forced_height="256" />

<image name="cs_wood_roof_xy_df" category="props" orig_name="cs_wood_roof_xy_df" orig_mip_filter="CATMULLROM" orig_forced_width="256" orig_forced_height="256" />

<image name="cs_wood_planks_01_xy_df" category="props" orig_name="cs_wood_planks_01_xy_df" orig_mip_filter="CATMULLROM" orig_forced_width="256" orig_forced_height="256" />

</texture_set>

U_CASA_TERRAZA

<?xml version="1.0" encoding="ISO-8859-1"?>


<units>


   	<unit type="prop" name="casa_terraza" slot="20">

			<model file="\props\casa_terraza\casa_terraza.xml"/>

			<script_class name="base" class="Base"/>

			<script_class name="editor" class="Editor"/>

			<stats block="base_data">

					  <var name="lightmap" value="true"/>

					  <var name="no_silhouette" value="true"/>

			</stats>

	</unit>


</units>

Image without render:

graw22009090415572882.th.jpg

Image with render, only shadowcaster=true (the inside has no shadow):

renderonlywithshadowcas.th.jpg

Image with render, shadowcaster=true and ambient_dummy (all is shadow):

renderwithshadowcastert.th.jpg

While writing this post, and did tests, it is now if I generate shadows inside .... but also abroad.

The object is dark now, and I have not touched anything .... :wall:

Is it possible to be added in some parameter on 3DMAX? The building has UNWRAP applied to channel 4....

I need to learn how to do this correctly so that all objects that have waiting to use on my maps, are being correctly (with their shadows within, and its light out).... :blink:

Link to comment
Share on other sites

Hmm i think i now what is the problem...

Try to add one texture for example 'techos' on your object 'caza_terraza' and in caza_terraza.xml

<body editable="true" name="casa_terraza" tag="concrete" template="static">

		  <object name="root_point"/>

		  <object name="casa_terraza" collision_type="mesh_mopp" hidden="false" material="techos" shadow_caster="true"/>

</body>
material="techos' Try this maybe will be works. @ Edit For example my objects, i made this few minutes ago.... screenshot - http://i27.tinypic.com/5vmxqu.jpg Materials.xml
<materials>


	<xi:include href="/data/settings/palett.xml#xpointer(/include/juarez_colors/*)"/>


	<!--DECALS-->

	<material name="none" decal_material="none"/>

	<material name="concrete" decal_material="concrete"/>

	<material name="container" decal_material="container"/>

	<material name="glass" src="decal_cube" decal_material="glass"/>

	<material name="metal" decal_material="metal"/>

	<material name="metal_none" decal_material="metal_none"/>

	<material name="plaster" decal_material="plaster"/>

	<material name="sheet_metal" decal_material="sheet_metal"/>

	<material name="stone" decal_material="stone"/>

	<material name="wood" decal_material="wood"/>

	<material name="glass_none" src="decal_cube" decal_material="glass_none"/>


	<material name="ground" src="bump_lightmap" decal_material="concrete">

		<diffuse_texture file="ind_concrete_xy_df"/>

		<bump_normal_texture file="ind_concrete_xy_bm"/>

	</material>


	<material name="out_stairs" src="bump_lightmap" decal_material="concrete">

		<diffuse_texture file="fo_concrete_xy_df"/>

		<bump_normal_texture file="fo_concrete_xy_bm"/>

	</material>


	<material name="level" src="bump_lightmap" decal_material="concrete">

		<diffuse_texture file="dam_dam_wall_xy_df"/>

		<bump_normal_texture file="dam_dam_wall_xy_bm"/>

	</material>


	<material name="floor" src="bump_lightmap" decal_material="concrete">

		<diffuse_texture file="rk_floor_concrete_large_xy_df"/>

		<bump_normal_texture file="rk_floor_concrete_large_xy_bm"/>

	</material>


</materials>
win_school_test.xml
<dynamic_object xmlns:xi="x">


	<diesel file="/data/objects/world_winters/win_school_test/win_school_test.diesel" materials="/data/objects/world_winters/win_school_test/materials.xml" orientation_object="root_point"/>


	  <lightmap>

		<object name="gfx_floor_01" height="256" width="256"/>

		<object name="gfx_floor_02" height="256" width="256"/>

		<object name="gfx_ground" height="256" width="256"/>

		<object name="gfx_in_stairs" height="256" width="256"/>

		<object name="gfx_level_01" height="256" width="256"/>

		<object name="gfx_level_02" height="256" width="256"/>

		<object name="gfx_out_stairs" height="256" width="256"/>

		<object name="gfx_roof_01" height="256" width="256"/>

	  </lightmap>


	<decal_surfaces static = "true">

		<ds_mesh object="gfx_floor_01" material="concrete" hidden="false" />

		<ds_mesh object="gfx_floor_02" material="concrete" hidden="false" />

		<ds_mesh object="gfx_ground" material="concrete" hidden="false" />

		<ds_mesh object="gfx_in_stairs" material="concrete" hidden="false" />

		<ds_mesh object="gfx_level_01" material="concrete" hidden="false" />

		<ds_mesh object="gfx_level_02" material="concrete" hidden="false" />

		<ds_mesh object="gfx_out_stairs" material="concrete" hidden="false" />

		<ds_mesh object="gfx_roof_01" material="concrete" hidden="false" />

	</decal_surfaces>


<body editable="true" name="win_school_test" tag="stone" template="static">

	<object name="root_point"/>

	<object collision_type="mesh_mopp" name="gfx_floor_01" material="floor" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_floor_02" material="floor" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_ground" material="ground" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_in_stairs" material="out_stairs" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_level_01" material="level" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_level_02" material="level" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_out_stairs" material="out_stairs" hidden="false" />

	<object collision_type="mesh_mopp" name="gfx_roof_01" material="floor" hidden="false" />

</body>


</dynamic_object>
u_win_school_test
<?xml version="1.0" encoding="ISO-8859-1"?>


<units>


	 	<unit type="static" name="win_school_test" slot="15">

			<model file="\world_winters\win_school_test\win_school_test.xml"/>

			<script_class name="base" class="Base"/>

			<script_class name="editor" class="Editor"/>

<!--			<script_class name="cover" class="CoverStatic"/>

			<script_class name="nav" class="NavStatic"/> -->

			<stats block="base_data">

				<var name="lightmap" value="true"/>

				<var name="ambient_points" value="true"/>

			</stats>

<!--			<stats block="cover_data"/> -->

			<xi:include href="/data/units/mass.xml#xpointer(/mass/mass_building_medium/*)"/>

		</unit>


</units>

Edited by =PL=Winters
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...