funny lighting effect with custom sdk?

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
I have created my first custom sdk last night (thanks EmperorFool). I took a small project to start, updating JRouteNative to BTS 3.19. This adds a couple of unit xml flags which affect movement on roads and highways. It is uploaded at this link. I have built it using refar's guide and makefile, using the standard VC++ 2003 tools. The effect of the mod is working as desired.

But, while using it today, I have noticed a funny lighting effect. As I zoom in and out, sometimes the lighting changes, and all the land terrain except hilltops goes into shadow. See the attached screenshot. When I remove my cvgamecore.dll and start a new game, this effect does not happen. When I put back my cvgamecore.dll and start a new game, the effect starts happening again. So it is obviously caused somehow by my cvgamecore.dll.

Can anybody suggest what may be wrong with my cvgamecore.dll?
 

Attachments

  • funny-lighting.jpg
    funny-lighting.jpg
    76.6 KB · Views: 235
When I was trying to make the surface of the ocean invisible for Dune Wars, I had the ocean surface texture looking similar to this at some points.

Basically, it looks like there is a dark semi-transparent layer parallel to the ground.

I wonder if somehow the level of the surface of the ocean is being raised to above ground level and creating the dark layer. I can't see enough from the screenshot to see if the twinkling ocean surface is also visible.

As an experiment you could try using the water directory from the Dune Wars assets/art folder into this mod and seeing if that has any effect on your grey layer. That would confirm whether or not this is the ocean surface malfunctioning somehow.
 
I thought it is highly unlikely that an SDK change could cause this so I've just tested a mod with only your custom DLL and nothing else. It works fine with no strange dark layer. This suggests that one of your custom Fury Road assets is causing the issue. Why this didn't also cause an issue in 3.17 I don't know. Are there any graphics engine changes mentioned in the 3.19 change list?

In any case, I think you best bet as a starting point is to maybe point all your unit and building art defines to a vanilla asset and then gradually add in the Fury Road art to see if you can narrow down the issue.
 
I accidentally recreated something that looks quite similar to your problem.

It is basically caused by a unit having an absolutely massive shadow. In my case, the original unit was very small so I had to set the fScale to over 30. However, I didn't reduce the fShadowScale of the shadow by a factor of 30 and so I got unit shadows that were 30 times normal size.

Just thought I'd let you know since the result looks pretty similar with the hills poking through a grey layer. You could try setting all your fShadowScales to zero and see if the grey layer disappears.

Edit: Had a look at your XML. ART_DEF_UNIT_BEAR has fScale = 30.0 and fShadowScale = 1. That's a prime candidate.
 
Problem solved! :)

It is your Deathclaw graphic that uses the ART_DEF_UNIT_BEAR entry.

See before/after screenshot. I simply changed fShadowScale from 1 to 0.033 for ART_DEF_UNIT_BEAR.

Now you can get back on the Fury Road...
 
Awesome! Deathclaws are terrifying but there is no reason for them to have a 100 mile wide shadow. I will put in your scorpions, and put up a new version!
 
hi guys, have you got the radscorpion unit finished? I tried adding the basic brown version you released but all i get is a shadow on the ground underneath where the scorpion should be? I can't see any issues with my artdefine XML so I am confused. Also if i download your 3.19 DLL is the only thing i need to do to fix it is change the shadow on the deathclaw? cheers

Also where do I put the 'changed files' I don't know where they exist or in what folder structure i would need to place them in
 
I can't see any issues with my artdefine XML so I am confused.

Do you have the fScale set to a big enough value in the XML? I gave some guideline values in the Scorpions download in a text file.
 
Top Bottom