Basically, I was going to play around with a tree replacer again- had some new ideas about things I could try.
Ran into several major problems, though.
1. SetFeatureDirection doesn't seem to do anything at all atm. So, no randomized trees, best I can do is to randomize them upon Create, which makes for other problems.
2. The DrawUnit pass doesn't seem to include Features. I was hoping to shoehorn them into using normalmaps, IDK where to go with that, since a lot of the callouts don't seem to work.
3. There doesn't seem to be any way to hold off their death from returning until I have "animated" them.
It's the same old problems, basically- Units do a lot of things I want, in static props- death animations, flexibility, can be affected by Lua well.
Features draw shadowmaps correctly (boo! hiss! it's possible!) and have very low CPU load.
It's a no-win for me atm, static props that can, at best, have some particle effects thrown about when they die and can, at most, have 4 cardinal directions... kinda suck. I'd keep messing with this, but meh, I have too much else to do, and I guess this is another dead end.
SetFeatureDirection; Rendering of Features
Moderator: Moderators
Re: SetFeatureDirection; Rendering of Features
OK, I see that SetFeatureDirection's been fixed. So, I can make them fall, and they'll have shadowmaps that work right... if I am willing to give up normalmaps and detailed interactivity.
Next problems, just as un-trivial:
There is no equivalent to the DrawUnit() pass for Features. If I want to replace them visually, how would I go about this?
As an alternative... I know this is probably far-fetched, but can I intercept DrawUnitShadow() and use a shader to send an altered shadowmap back to Spring, and perhaps fix the shadowmap issues that way? Or is $shadowmap read-only from the Lua side?
Next problems, just as un-trivial:
There is no equivalent to the DrawUnit() pass for Features. If I want to replace them visually, how would I go about this?
As an alternative... I know this is probably far-fetched, but can I intercept DrawUnitShadow() and use a shader to send an altered shadowmap back to Spring, and perhaps fix the shadowmap issues that way? Or is $shadowmap read-only from the Lua side?
Re: SetFeatureDirection; Rendering of Features
If I use DrawUnitRaw within DrawWorldShadow(), can I alter the result of $shadow, by passing the geometry and an appropriate shader?
Or is that read-only?
Or is that read-only?
Re: SetFeatureDirection; Rendering of Features
Nevermind.
It doesn't matter if I return false or true within that loop, Spring still draws the shadowmap using the fixed-function stuff.
So, what about altering the $shadow texture in a FBO within DrawUnit? Is that what the drawMode is for?
If I set drawMode 2 as required, the UnitRendering stuff fails to draw. 1 is what's required.
So, what's drawMode 2 about? It appears to operate *before* 1.
It doesn't matter if I return false or true within that loop, Spring still draws the shadowmap using the fixed-function stuff.
So, what about altering the $shadow texture in a FBO within DrawUnit? Is that what the drawMode is for?
If I set drawMode 2 as required, the UnitRendering stuff fails to draw. 1 is what's required.
So, what's drawMode 2 about? It appears to operate *before* 1.
Re: SetFeatureDirection; Rendering of Features
UnitRendering is for ... units
-> LOD system for features is currently not doable, only if you use gaia units, which will increase the cpu overhead dramatically.
PS: I fixed the SetFeatureDirection bug w/o knowledge of this post
when I worked on this:

-> LOD system for features is currently not doable, only if you use gaia units, which will increase the cpu overhead dramatically.
PS: I fixed the SetFeatureDirection bug w/o knowledge of this post

when I worked on this:

Re: SetFeatureDirection; Rendering of Features
Looks great. With a better skin, those could be very nice.
Yeah, and as I said, that addresses one of the problems, but basically leaves me with Features that I can't apply fancy shaders to, because I can't shut Feature rendering off.
So... either the Unit shadowmaps need to use the same process as the Feature shadowmaps do, since that's working just fine... or I need to be able to reach in and alter $shadow via Lua, which thus far, appears to be impossible.
Yeah, and as I said, that addresses one of the problems, but basically leaves me with Features that I can't apply fancy shaders to, because I can't shut Feature rendering off.
So... either the Unit shadowmaps need to use the same process as the Feature shadowmaps do, since that's working just fine... or I need to be able to reach in and alter $shadow via Lua, which thus far, appears to be impossible.