Noticed something else on vehicle shadow detail

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Noticed something else on vehicle shadow detail

Post by fo0k »

Im playing with a 'top down' micro machines style map (quite lol so far!)

I noticed that when i set the camera view to high above pointing down that the shadow detail deteriorated significantly on the vehicle. The pic below shows this.
The white car has normal driver camera viewpoint and the black car has the camera set 50 above and pointing straight down. I noticed this before in the DCME mod.. low res vehicle shadows.. but had no idea why. I now realise its because of the wide panning cameras they used to film vehicles.

Shadow detail is relational to the position of the camera view... so also perhaps the general size of the whole bundle.

Image

Image
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Noticed something else on vehicle shadow detail

Post by Apache Thunder »

Are these cameras addTemplated to the vehicles? If the object has something addtemplated that is set 10 or more meters away from the object, it's shadow gets degraded. It appears to effect the bounding box or virtual "size" of the object and when that happens the game for some reason also degrades it's shadow as a result. (also note how smaller stuff have better shadows) This isn't effected just by cameras. AddTemplate anything set in a distance similar to the cameras and you will get the same result. (also note how using 3rd person view results in camera moving much further way from the vehicle as it tries to get the whole "vehicle" into view)

So your cameras addTemplated so they are up high expand the object's virtual size of sorts and the game ends up degrading it's shadow. You might beable to get around this by addtemplating a child object that will carry the shadow instead. (like with the turrets with shadows I did in that tutorial thread I made about shadows for gun turrets and stuff)

What you do is disable the shadow on the visible geometry, then create a new geometry that has all the parts of the vehicle that you want the shadow to include, then addtemplate that to the main PCO (not to a complex bundle or other child object or else it won't work) and perhaps that would solve the degraded shadows issue you are having. :D
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Noticed something else on vehicle shadow detail

Post by fo0k »

Ill give this a go. In fact from that distance above I may be able to get away with no shadows. I might just make the entire terrain as a model as this will also allow for some cool lightmaps too :)

On this topic though I would like to have the view of the soldier the same.. so getting very GTA top down!

I had a quick go at making all 'isfirstpersonpart' active (1 instead of 0) then setting the first person cam up high too.. but i see no player.. and cant move until I go prone or crouch.. then I can move (standing.. which is weird)

Im going to fix any vehicle mounted weapons and the soldier weapons to have no vertical movement.. just shoot straight out front.. this should make for a fun top down shooter.

help with getting this top down (on first person cam mode, not chase) would be appreciated! :)
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Noticed something else on vehicle shadow detail

Post by fo0k »

Ok.. by enabling ObjectTemplate.CVMTrace 1 in the soldier camera settings i can achieve a fixed camera behind the full animated soldier (-5 placing camera back behind the body)

Code: Select all

ObjectTemplate.setPoseCameraPos c_BfSoldierStanding 0/0.65/-5
What I cant figure out is how to rotate the camera to point down.. (where are the settings to make the player only look 90 degrees up or down? I cant find them)

I have tried many variations.. but no luck.
e.g.

Code: Select all

ObjectTemplate.setPoseCamerarot c_BfSoldierStanding 0/90/0
ObjectTemplate.setPoseCamerarotation c_BfSoldierStanding 0/90/0
ObjectTemplate.setPoserotation c_BfSoldierStanding 0/90/0
ObjectTemplate.setrotation c_BfSoldierStanding 0/90/0
ObjectTemplate.rotation c_BfSoldierStanding 0/90/0
Also unless you prone or crouch the player is fixed in the run position at start and you cannot move.. until prone/crouch then its fine. This also happens again when you exit a vehicle.

also in soldiers/common/objects.con adjusting the pivot or trying to achieve rotation here seems to have no effect

Code: Select all

ObjectTemplate.setPivotPosition 0/0/0
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Noticed something else on vehicle shadow detail

Post by Apache Thunder »

If your going to make the terrain a model, you could also in theory make better detail textures. You can use BC42/ED42 to make a second set of textures that use detail textures instead. ;) Then merge them with the lightmap textures (making sure not to reduce the resolution) and voila! BF2 style terrain detail! PM me if you need me to help you on doing this. I think since you will be doing away with dynamic shadows anyway, making the terrain a mesh would allow you to add detail to the textures via the lightmaps like I described above for something that could make the terrain look a ton better!

Since the lightmaps will be high res, I would recommend making them DDS files!

As for making the body show up in 1p mode...I have tried this in my bfheroes42 mod with not so good results. I was able to move the 1p camera back and telling teh game to make all the body parts visible by reming out the commands that told it what view they would be visible in and then adding the outsideHUD command to the soldier camera so I could switch to my new 3p view. The body was visible, but kit parts were not and only the top half animated. (since the game thinks the view is 1p it doesn't animate the lower torso and doesn't display the kitparts).

I think Archi might know more on this as he knows more on animating soldiers and stuff and might know how to add 3p mode. But it would involve altering the soldier animations. Something I'm not really good at right now.
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Noticed something else on vehicle shadow detail

Post by fo0k »

I think Im on the verge of making atari 'top down' tanks for battlefield. This is hysterical.

Too tired to think right now but like your thinking. I shall review in the morning :)


...late afternoon

cheers!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Noticed something else on vehicle shadow detail

Post by fo0k »

I forgot about your dds find.. good point as they do get huge.
Heres the map so far.. main bases at top and bottom.. Ill have 3 CP's one in park, one right in middle and one in the empty are (to be done..) on the right.

I have tweaked the tanks to shoot straight, no vertical movement.. removed recoil also. I need to strengthen the suspension on the sherman to stop it tilting back and forward.. needs to be smooth to keep firing level

Image
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Noticed something else on vehicle shadow detail

Post by Apache Thunder »

That is looking great. A top down shooter like those arcade tank games. :D

On the Sherman tilting back. Most of that is from the recoil force on the weapon itself. You can reduce the recoil/firing "force" on the main weapon and it should reduce the kick back you get from firing it. ;)

Code: Select all

ObjectTemplate.fireingForce 110
ObjectTemplate.recoilSpeed 10
ObjectTemplate.recoilSize 3
That is the current setting for the Sherman. Reducing the numbers or remming them out should help prevent your tanks from swinging backwards from firing.


EDIT: .....Wait just spotted that you already removed recoil.....nevermind... :P
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Noticed something else on vehicle shadow detail

Post by Swaffy »

That mod look like it would be flat-out awesome to play. I know it take a lot of time to make something like that, but if you ever get a beta/release out for it, please let me know. It sounds very interesting, fighting on the battlefield like the old PS1 micro-machine games or like GTA 1.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply