Jump to content
Sign in to follow this  
shadow

No shadow on vehicle

Recommended Posts

I've just started trying my hands on O2.

I've used the "famous" ODOL to MLOD converting-tool on BIS Apache-model. At the moment this is only a private learning-project due to the legal issues with CM/BIS.

So I've started trying to convert the AH-64A into a AH-64D.

...and I got a problem sad_o.gif

There is no shadow.

I noticed the MLOD-converter screwed up some selections (no mass on the object etc), so the missing shadow might also be what the converting-tool has altered.

I've searched and can't find any shadow-related topics here. All tutorial-links I've found are either dead or does not include my problem (most are dead).

I saw the video-tutorial on OFPEC by Jahve (setting nolodshadow 1) but that did'nt help.

Any ideas?

Share this post


Link to post
Share on other sites

All (numbered) lods from 0.75, 1  down with more then say 300 points in them. do this

open them 1 at a time then press  Alt-P this will bring up window at bottom of screen.

In property name put lodnoshadow

In the value put  1

Alt-p again to close window

Share this post


Link to post
Share on other sites

I've done that but the shadow still won't show. I noticed the video-tut spellt it wrong (they spelt it nolodshadow).

I've put the lodnoshadow 1 in the following view-lods: 0.500 , 1.000 , 2.250 , 5.000 and 7.000. I did not put it in 9.000

Is the shadow a texture loaded in each of the visible LODs?

I'm only asking because I got an error-message on two or three texture-paths saying "texture name is too long" when I updated their paths because of the addon foldername. I can't see any textures missing on the model though.

Right now I've only updated the texture-paths for LOD 0.500

LOD 5.000 also has a propertyname called lodneeded 2. Is this normal?

Share this post


Link to post
Share on other sites
Quote[/b] ]LOD 5.000 also has a propertyname called lodneeded 2. Is this normal?

Yep it is

Quote[/b] ]"texture name is too long"

Dont worry bout that

I am still thinking bout the other

Share this post


Link to post
Share on other sites

I opened up BIS newly released MLOD Hind.

As far as I can tell there are no difference between the two regarding LODs and their Selections (except some different numbers for the visible LODs).

When I look at the shadow of the original Apache in-game it looks identical to the Fire Geometry LOD (just thinking out loud).

Share this post


Link to post
Share on other sites

Try this and if it doesn't work then you can change back.

change the property of the 9.000 lod to 2.249 so it sits just before the 2.250.

Share this post


Link to post
Share on other sites

The higher the number of the LOD the lower the resolution (less faces).

So your LOD 9.000 would be the first candidate for the shadow

The 9.000 LOD should have the least amount of faces and will be the LOD that produces the shadow (the game makes a shadow from the model)

Possible that your 7.000 LOD may also be capable of producing a shadow (if it has less than 300 faces or 600 vertex's or something around that)

I think different types of addons may have different resolution shadows (from my experiences planes are around 300 faces ,but I have heard of others saying their addon is 400 face shadow and even 600 faces)

The texture name too long is a problem and will cause problems,and its not that the texture name is too long its prolly because it has too long of pathname (too many subfolders)

I've had that problem and now my O2 is in the root of my D: drive and the addons I work with are just in their single directories,so when I work with them...the only path is the addon dir

I even had sorted my stuff in subfolders and that gave me too long texture name

(ie: i put textures in a texture dir,sounds in sound and etc..)

Was even too much

And after recent reading of these forums I see that the shorter the names (all names) is more effecient ingame (execute faster etc...)

Share this post


Link to post
Share on other sites
Guest

Shadow has a problem with shadows? rock.giftounge_o.gif

I think this has been answered many times, please use the search function (god I'm enjoying this post).

There's a post somewhere that Kegs wrote saying (IIRC) the magic number is less than 300 vertices, not faces. Also make sure you have object shadows switched on Shadow biggrin_o.gif

Share this post


Link to post
Share on other sites
Try this and if it doesn't work then you can change back.

change the property of the 9.000 lod to 2.249 so it sits just before the 2.250.

Did'nt make any difference.

Quote[/b] ]The higher the number of the LOD the lower the resolution (less faces).

So your LOD 9.000 would be the first candidate for the shadow

The 9.000 LOD should have the least amount of faces and will be the LOD that produces the shadow (the game makes a shadow from the model)

Possible that your 7.000 LOD may also be capable of producing a shadow (if it has less than 300 faces or 600 vertex's or something around that)

I think different types of addons may have different resolution shadows (from my experiences planes are around 300 faces ,but I have heard of others saying their addon is 400 face shadow and even 600 faces)

The 9.000 LOD has 370 points and 149 faces. The 7.000 LOD has 1060 points and 434 faces. Those two LODs are the only ones that don't have lodnoshadow 1 which I assume is correct if those two are supposed to generate the shadow.

Quote[/b] ]The texture name too long is a problem and will cause problems,and its not that the texture name is too long its prolly because it has too long of pathname (too many subfolders)

I gathered as much since they work if the addon-folder is called Apac and not Sha_ah64. But I just renamed the texture-name just in case.

Quote[/b] ]I think this has been answered many times, please use the search function (god I'm enjoying this post).

I have searched. You should try smile_o.gif

Quote[/b] ]Also make sure you have object shadows switched on Shadow

Ha ha funny tounge_o.gif

Share this post


Link to post
Share on other sites

The only LOD that shouldn't have the lodnoshadow 1 is the very last one.... 9.00 - since it is the one that can and should produce the shadow. I think OFP goes up through the different lod's low to high and stops at the one lod that doesn't specify "no shadow"

If that doesn't work....try droping the points lower..in 9.00..the faces are fine

One thing that I guess is just a personal preference, is that my shadow LOD is a lot higher since it has the very least detail. Like 50.000 or something. The signifigance of the numbering (some one correct me if I'm wrong) is in the game at around that distance from the model it will switch to that LOD for you to see.... so 9 meters or so away from it (which is not very far) it switches to the lowest LOD and may look a lil funny.... I'd probably set the 7.00 to 9.00 and then 9.00 even higher.

p.s. I had the same probablem about a year ago and searched and found it....not sure if they deleted topics or not....

Share this post


Link to post
Share on other sites
There's a post somewhere that Kegs wrote saying (IIRC) the magic number is less than 300 vertices, not faces.

Think he said around 600 vertices ,like I stated in my earlier post.

Regardless my F4u has 331 points on the shadow lod

Share this post


Link to post
Share on other sites

Looks like the problem lies in the amount of vertices or faces.

I deleted a bunch of faces in the 9LOD and the shadow appears when I'm far away from the object. I zoomed out to the max when in commander-view and the shadow appeared. As soon as I zoomed a little in it disappeared again.

When I deleted some vertices I accidentally deleted the whole tailboom  biggrin_o.gif but the tailboom is still part of the shadow...well most of the time. Some times it flickers on and off.

So I got 297 vertices and 127 faces in the 9LOD (sounds like 300 vertices might be the max for that LOD).

Is it the same max amount in the 7LOD too?

Assuming the reason for the disappearing shadow when zooming in is that it is supposed to load a new shadow based on the 7LOD?

edit: oh and I could use some tips from you guys who know what you're doing on typically which parts should I remove to maintain a best looking shadow smile_o.gif

Share this post


Link to post
Share on other sites

hmmmm...i just thought of something...... sometimes this helps and sometimes not...

do a copy or duplication of your 9.00 LOD and set the property as "view geometry"

I've seen it work a few times....

Share this post


Link to post
Share on other sites
hmmmm...i just thought of something...... sometimes this helps and sometimes not...

do a copy or duplication of your 9.00 LOD and set the property as "view geometry"

I've seen it work a few times....

Did'nt help I'm afraid.

Share this post


Link to post
Share on other sites

I think I've managed to get LOD 7 and 9 to work as shadows but only when I'm far away. As soon as I zoom in the shadow disappears and when I zoom out again the shadow does'nt always return. I have a feeling it is because the higher LOD is then cached and the engine "feel" it does'nt need to return to LOD 7 again.

I'm confused how everyone else gets so detailed shadows.

Here are the number of vertices and faces for each LOD:

LOD - vertices - faces

0.500 - 6017 - 2968

1.000 - 4734 - 2273

2.250 - 3438 - 1566

5.000 - 1969 - 926

7.000 - 699 - 324

9.000 - 282 - 134

Looks to me that only LOD 0.5 is used for the model, but more than LOD 7 and 9 should be used for the shadow.

Share this post


Link to post
Share on other sites
Guest

Yup. Send it to me and I'll have a loof for you. smile_o.gif

Share this post


Link to post
Share on other sites

Thanks. That would be great smile_o.gif

It's 2MB zipped (with all BIS textures).

Shall I send it to the email adress you signed up with on this board?

Share this post


Link to post
Share on other sites
Guest

Yep...that one is fine smile_o.gif

Share this post


Link to post
Share on other sites

ODOL Explorer makes many mistakes, especially when it comes to Vertices. The Vertex Count is extremely higher, that it is for the original model. Try this:

CTRL-A

and then under Vertices -> Merge Near...

and press OK.

Vertex Count should be reduced much, perhaps this solves your problem. But be cautious with this, since it can f**k up the model again, if vertices are merged which weren't supposed to be merged.

Share this post


Link to post
Share on other sites
Guest

I've had a look and nothing obvious sticks out. Its a bit weird actually. My best guess is a problem with selection names not corresponding to any parts of the model in the ResLODs that could actually make a shadow (7.000 and 9.000 in this case). I've sent Shadow more detailed info, but if anyone who models Helis knows about this for sure.....please post smile_o.gif

Share this post


Link to post
Share on other sites

I've tried the "merge near" function on LODs .5 to 9

LOD .5 is now down to 3335 Vertices

I can't see any visual difference on the model in the different LODs and it did'nt make a difference regarding the shadow either.

I think I'm going to convert the ODOL BIS Hind and compare it to the MLOD version BIS recently released to see what kind of differences the converter does to the model.

Thank you very much for trying, Leone smile_o.gif

Very good idea what you did to the LODs (added different shapes above it). I see that most of the time OFP uses LOD .5 and some times LOD 1

The missing selections in the higher LODs are just the muzzle-flash and hellfire-proxies. Nothing that should interfere with the shadow.

Share this post


Link to post
Share on other sites
Guest

Nothing that should interfere, but OFP is a strange mistress. That's still my best guess, as both the last two LODs should be able to produce a shadow. It's not a problem with having too many vertices/faces, it's something else.  smile_o.gif

Edit: Just as an experiment, I grabbed the 9.000 LOD and copied it to a new p3d file. Then I removed all the selection names and config it up as a basic static object. Presto...a perfect shadow. Selection names I am almost 100% sure are the problem.

Share this post


Link to post
Share on other sites

All selection in the 9'er LOD only?

I'm going to first try removing the selections that are not in use and go from there. I still don't feel too well at home with O2 so I'm taking one micro-step at a time biggrin_o.gif

edit: I removed all selections in the 9 and 7 LODs and still no improvement.

When you configured it as a static object, was that only in config.cpp or did you do something in O2 too besides removing the selections?

Share this post


Link to post
Share on other sites

Woohoo I made a small step for man kind but a big step for me biggrin_o.gif

In the P3D I received from you it had lodnoshadow 1 in the 7-LOD and it did not have lodneeded 2 in the 5th. I added those after removing all selections in the 7 and 9 and it works now. Except I got a static rotor-shadow but that's because the selections for the main-rotor and tail-rotor now missing. Going to put them back in and see if the shadow still works.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×