Search found 10 matches

by Robat
Tue May 23, 2006 8:01 am
Forum: Advanced Help
Topic: Creating heightmap of an existing terrain-mesh?
Replies: 1
Views: 463

Creating heightmap of an existing terrain-mesh?

Hi all, I don't know if this is the right topic for the advanced forum. I have an existing terrain-mesh modeled in max and exported to a directx-file. I want to use the cool grass node system presented by bitplane and tried to create a heightmap from my terrain. So far i have written the height of a...
by Robat
Thu May 18, 2006 8:41 am
Forum: Advanced Help
Topic: Switching on dynamic lighting for EMT_SOLID_2_LAYER?
Replies: 5
Views: 564

The preceding code worked for me when I modified the existing material EMT_SOLID_2_LAYER inside the CD3D9MaterialRenderer.h. Now I tried to add my own material to the materialtype enumeration, modifying the following files: SMaterial.h CD3D9MaterialRenderer.h Afterwards I recompiled the source and r...
by Robat
Thu May 18, 2006 8:33 am
Forum: Advanced Help
Topic: Switching on dynamic lighting for EMT_SOLID_2_LAYER?
Replies: 5
Views: 564

I think that the vertexalpha blending mode in the second layer only accepts two parameters or colorargs, first one is the result from layer 1 (texture 1), second parameter is the texture from layer 2, blending mode vertex alpha. If I wanted to add dynamic lighting (shadowing the blended two textures...
by Robat
Wed May 17, 2006 1:24 pm
Forum: Advanced Help
Topic: Switching on dynamic lighting for EMT_SOLID_2_LAYER?
Replies: 5
Views: 564

Got it, adding a third layer helps: :D pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 0); pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, ...
by Robat
Wed May 17, 2006 12:23 pm
Forum: Advanced Help
Topic: Switching on dynamic lighting for EMT_SOLID_2_LAYER?
Replies: 5
Views: 564

Ok, I have investigated a bit and it seems quite clear to me now: The first texture layer of the material uses the following params: pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); pID3DDevice->SetTextureSt...
by Robat
Wed May 17, 2006 9:24 am
Forum: Advanced Help
Topic: Switching on dynamic lighting for EMT_SOLID_2_LAYER?
Replies: 5
Views: 564

Switching on dynamic lighting for EMT_SOLID_2_LAYER?

Hi, I have looked into the source code of the file C3D9MaterialRenderer.h and wanted to modify the shader properties for the material EMT_SOLID_2_LAYER. I want to have the material being lit by dynamic light. By default, the material ignores the material flag EMF_LIGHTING = true. The material blends...
by Robat
Wed May 17, 2006 8:38 am
Forum: Advanced Help
Topic: Creating projected shadows with RenderTargetTexture/Manip.
Replies: 6
Views: 631

Thanks :). Perfekt.
by Robat
Tue May 16, 2006 1:03 pm
Forum: Advanced Help
Topic: Creating projected shadows with RenderTargetTexture/Manip.
Replies: 6
Views: 631

Thanks hybrid, this is really good. It works, I switched the one light off with the following code: lightData.DiffuseColor = SColorf(0.0f, 0.0f, 0.0f); lightData.AmbientColor = SColorf(0.0f, 0.0f, 0.0f); So if there is simpler code, like a flag for visible or not, please tell me, I didn't find any a...
by Robat
Tue May 16, 2006 12:15 pm
Forum: Advanced Help
Topic: Creating projected shadows with RenderTargetTexture/Manip.
Replies: 6
Views: 631

Sounds good, thanks, and it works :). The only thing I try now is to chnnge the vertex colors from white to black, because switching EMF_LIGHTING to false lights the model with the vertex colors(?). Or am I wrong?

Robert
by Robat
Tue May 16, 2006 11:17 am
Forum: Advanced Help
Topic: Creating projected shadows with RenderTargetTexture/Manip.
Replies: 6
Views: 631

Creating projected shadows with RenderTargetTexture/Manip.

I want to have cheap shadows for my bicycle model and so I created a camera fixed to the sunlight that renders the bicycle model in a second render pass to a texture attached to a plane below the bicycle. But the rendered image is colored and sharp (naturally :). The shadow plane has transparency as...