Jump to content
Sign in to follow this  
Ravendark

Holographic decal instead of housecolor

Recommended Posts

I never liked housecolor effects on objects...they feel verry artificial compared to the object it is used on, even if you tone down the intensity or amplify it etc.

I was thinking of doing away with the actuall housecolor texture on the model and using a seperate model+draw and maybe use the shadowinfo/decal module to project some kindof holographic overlay effect.

 

for a volumetric effect one could probably just use a modelcon.state like USER_20, only give this to a seperate draw that uses a 3d model that resembles a holographic hitbox/targetbox. You could give each unit a aura that only effects enemy units within its vision range and aplies the USER_20 condition to enemies.

Or something along those lines for a quick brainstorm.

 

What i am actually curious about are some of the settings for DECAL and SHADOWINFO

 

like:

 

for the commando

<ShadowInfo
            Type="DECAL"
            SizeX="14"
            SizeY="14"
            Texture="ShadowI" />
 

or

used with the repair drones from warfactories:

 

<!-- draw a decal when this thing is selected -->
			<!-- This is duplicated in several files. Please do a search and update those too -->
			<ScriptedModelDraw
				id="ModuleTag_Draw_Selected_Repair_Decal"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model Name="" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SELECTED">
					<Model Name="FXInvisBone" /> 
					<ShadowInfo
						Type="ADDITIVE_DECAL"
						SizeX="=$REPAIR_DRONE_HOME_DECAL_SIZE"
						SizeY="=$REPAIR_DRONE_HOME_DECAL_SIZE"
						OverrideLODVisibility="true"
						MaxHeight="200"
						UseHouseColor="true"
						LocalPlayerOnly="true"
						Texture="Decal_Rig_CO" 
					/>
				</ModelConditionState>
			</ScriptedModelDraw>

 

would anyone be willing to explain some of the atributes and how they are used(useable) of the below schematic?

 

 

<xs:simpleType name="ShadowType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NONE" />
      <xs:enumeration value="DECAL" />
      <xs:enumeration value="VOLUME" />                            How would this type be useable or differ from DECAL?
      <xs:enumeration value="ALPHA_DECAL" />                       transparancy i asume?
      <xs:enumeration value="ADDITIVE_DECAL" />                    Used with 2 textures?
      <xs:enumeration value="ALPHA_DECAL_DYNAMIC" />                Dynamic?
      <xs:enumeration value="ADDITIVE_DECAL_DYNAMIC" />
      <xs:enumeration value="MERGE_DECAL" />                        Used with 2 textures?
      <xs:enumeration value="VOLUME_OR_DECAL" />
      <xs:enumeration value="TIBERIUM_ROOT" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ShadowInfo">
    <xs:sequence></xs:sequence>
    <xs:attribute name="Type" type="ShadowType" />
    <xs:attribute name="Texture" type="TextureRef" />
    <xs:attribute name="AdditionalTexture" type="TextureRef" />               addictive or merge decals?
    <xs:attribute name="SizeX" type="SageReal" default="0.0" />               
    <xs:attribute name="SizeY" type="SageReal" default="0.0" />
    <xs:attribute name="OffsetX" type="SageReal" default="0.0" />
    <xs:attribute name="OffsetY" type="SageReal" default="0.0" />
    <xs:attribute name="OpacityStart" type="SageReal" default="0" />              |is this a one shot effect or could you 
    <xs:attribute name="OpacityFadeInTime" type="Time" default="0s" />            | get this to basicly repeat every few seconds/frames?
    <xs:attribute name="OpacityPeak" type="SageReal" default="1" />               |
    <xs:attribute name="OpacityFadeOutTime" type="Time" default="0s" />           |
    <xs:attribute name="OpacityEnd" type="SageReal" default="0" />                |
    <xs:attribute name="MaxHeight" type="SageReal" default="20" />                  how does height factor into using decals or 2d textures?
    <xs:attribute name="OverrideLODVisibility" type="SageBool" default="false" />
    <xs:attribute name="UseHouseColor" type="SageBool" default="false" />
    <xs:attribute name="IsRotatingWithObject" type="SageBool" default="true" />
    <xs:attribute name="LocalPlayerOnly" type="SageBool" default="false" />
    <xs:attribute name="SunAngle" type="SageReal" default="0.0" />               I am assuming this is a lighting effect no
  </xs:complexType>                                                               longer used in TW but left over from BFME?
 
  <xs:complexType name="RadiusDecalTemplate">
    <xs:sequence>
      <xs:element name="Color" type="Color4" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Texture" type="TextureRef" />
    <xs:attribute name="Texture2" type="TextureRef" />
    <xs:attribute name="Style" type="ShadowType" />
    <xs:attribute name="OpacityMin" type="Percentage" default="1.0" />
    <xs:attribute name="OpacityMax" type="Percentage" default="1.0" />
    <xs:attribute name="OpacityThrobTime" type="SageReal" default="1000" />             this is used to give a pulsing effect by having opac go from min to 
    <xs:attribute name="RotationsPerMinute" type="SageReal" default="0.0" />             min?
    <xs:attribute name="OnlyVisibleToOwningPlayer" type="SageBool" default="false" />
    <xs:attribute name="MaxRadius" type="SageReal" default="0.0" />
    <xs:attribute name="MinRadius" type="SageReal" default="0.0" />
    <xs:attribute name="MaxSelectedUnits" type="SageUnsignedInt" default="0.0" />
    <xs:attribute name="SpiralAcceleration" type="SageReal" default="0.0" />               what would this do?
  </xs:complexType>
 

 

 

Share this post


Link to post

<xs:simpleType name="ShadowType">

<xs:restriction base="xs:string">

<xs:enumeration value="NONE" /> -No shadow

<xs:enumeration value="DECAL" /> -Simple texture, subtractive iirc

<xs:enumeration value="VOLUME" /> -Shadow generated by engine, calculated by geometry

<xs:enumeration value="ALPHA_DECAL" /> -texture with transparency

<xs:enumeration value="ADDITIVE_DECAL" /> -texture that is "added" to what is beneath (ground rgb + texture rgb)

<xs:enumeration value="ALPHA_DECAL_DYNAMIC" /> -don't remember

<xs:enumeration value="ADDITIVE_DECAL_DYNAMIC" /> -see above

<xs:enumeration value="MERGE_DECAL" /> -texture1 & texture2 (bool op)

<xs:enumeration value="VOLUME_OR_DECAL" /> -iirc scales depending on fps, goes to decal when fps decrease to save power

<xs:enumeration value="TIBERIUM_ROOT" /> -uses special shader iirc

</xs:restriction>

</xs:simpleType>

 

<xs:complexType name="ShadowInfo">

<xs:sequence></xs:sequence>

<xs:attribute name="Type" type="ShadowType" />

<xs:attribute name="Texture" type="TextureRef" />

<xs:attribute name="AdditionalTexture" type="TextureRef" /> -merge and I think tiberium roots

<xs:attribute name="SizeX" type="SageReal" default="0.0" />

<xs:attribute name="SizeY" type="SageReal" default="0.0" />

<xs:attribute name="OffsetX" type="SageReal" default="0.0" />

<xs:attribute name="OffsetY" type="SageReal" default="0.0" />

<xs:attribute name="OpacityStart" type="SageReal" default="0" /> -decals can have a pulsating effect, so this is the start alpha value

<xs:attribute name="OpacityFadeInTime" type="Time" default="0s" /> -the time it iterates from start to peak

<xs:attribute name="OpacityPeak" type="SageReal" default="1" /> -peak alpha value

<xs:attribute name="OpacityFadeOutTime" type="Time" default="0s" /> -the time it iterates from peak to end

<xs:attribute name="OpacityEnd" type="SageReal" default="0" /> -end value, usually same as start value

<xs:attribute name="MaxHeight" type="SageReal" default="20" /> -the object should be at most this value above the ground to draw a decal, if higher the decal is not drawn

<xs:attribute name="OverrideLODVisibility" type="SageBool" default="false" />

<xs:attribute name="UseHouseColor" type="SageBool" default="false" />

<xs:attribute name="IsRotatingWithObject" type="SageBool" default="true" />

<xs:attribute name="LocalPlayerOnly" type="SageBool" default="false" />

<xs:attribute name="SunAngle" type="SageReal" default="0.0" /> -dunno, maybe what you said, maybe an override for map settings

</xs:complexType>

 

<xs:complexType name="RadiusDecalTemplate">

<xs:sequence>

<xs:element name="Color" type="Color4" minOccurs="0" maxOccurs="1" /> -

</xs:sequence>

<xs:attribute name="Texture" type="TextureRef" />

<xs:attribute name="Texture2" type="TextureRef" />

<xs:attribute name="Style" type="ShadowType" />

<xs:attribute name="OpacityMin" type="Percentage" default="1.0" />

<xs:attribute name="OpacityMax" type="Percentage" default="1.0" />

<xs:attribute name="OpacityThrobTime" type="SageReal" default="1000" /> -yes, basically same behavior as above, you just cannot set a different end value

<xs:attribute name="RotationsPerMinute" type="SageReal" default="0.0" />

<xs:attribute name="OnlyVisibleToOwningPlayer" type="SageBool" default="false" />

<xs:attribute name="MaxRadius" type="SageReal" default="0.0" />

<xs:attribute name="MinRadius" type="SageReal" default="0.0" />

<xs:attribute name="MaxSelectedUnits" type="SageUnsignedInt" default="0.0" />

<xs:attribute name="SpiralAcceleration" type="SageReal" default="0.0" /> -as there is rotation per minute this is probably to accelerate that, didn't test it

</xs:complexType>

btw: http://www.moddb.com/mods/tiberian-sun-rising Edited by Lauren

Share this post


Link to post

thanks megumi,

 

And yes forgot about that mod (seems its dead, such a same), i do feel that the way they applied the decals seem abit excessive imo. Hence why i was thinking on using a SELECTED state for decals seen by the player(greem decal). and other states triggered only when you spot the other unit (cant remember if you can set auras to ENEMIES(red decal) or ALLIES(blue decal). something like that. OTOH maybe the opacity controls could help in making it so that the decals arent visibil all the time or less strongly present all the time.

Share this post


Link to post

Please remember that a number of Scrin units (both aerial and ground based), have house colour decals (this is in addition to having standard house colour of course).

 

Maybe some data to take from the code used.

Edited by Madin

Share this post


Link to post

yes idd they use their decals rather straitforward.

 

Basicly the idea that is going round in my head atm:

 

I did a predator movie marathon a good week ago...and during one of the movies the thought popped up: That plasma caster target thing they do (triangle shaped 3 red lines) wouldnt it be tactic(cool) to have a friend or foe indication show up on units when they enter the range of other units that looks like along the lines of that predator thing? Or targeting crosshairs for each side or such thing.

 



 

Replace the housecolor (wich basicly is a ugly friend or foe indicator to me) with a animated targeting cursor effect...red for hostile, blue for allied or so..or in housecolors or so.

 

So ive been looking at the decals and thinking about maybe using a animated model etc to achieve something like that...the perfect idea would be to have it strong and visible when it triggers on spotting another unit..then for its duration have it constantly present WITHOUT overcrowding o shadowing a unit..specialy when having lots of units onscreen, and follow by vanishing quickly when the units exits vision range or dies..along those lines.

 

The opacity and rotation atributes seem interesting to achieving this im roughly thinking atm.

Edited by Ravendark

Share this post


Link to post

The tricky part (maybe) would be to only show Hostile targeting on enemies (the owner of the enemy unit doesnt see the decal or mesh etc.)

If it was just friendly only...you could set that with the corresponding atribute. But there isnt a "show only on enemy or for enemy" function...might have to get creative there.

 

 

Maybe have like a invisible object/dummy that ATTACHES to enemies, have it get the right decal effect during the ATTACHED condition. (because the attached object is owned by the right side, you can set the decal to player only -LocalPlayerOnly="true"-) And this would make it so friend or foe indication is only visible to the corresponding side.

Edited by Ravendark

Share this post


Link to post

There actually is a state which is owner only (and decals can be owner only anyway). I remember way back when Golan was doing his own mod where he had an MSA that basically shot markers at enemy units in range. Iirc the Stealth Tank uses it to display the distortion to the owner.

 

Also you can use 3d marker by having the w3d camera aligned.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×