• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] How do you remove shadows ??

Status
Not open for further replies.
Credits to Deaod

JASS:
function CreateUnitWithoutShadow takes player owner,integer uid, real x, real y,real facing, string shadowfile returns item
    local image i=CreateImage(shadowfile, 64, 64, 0, 0,0,0,64,64,0, 3)
    if GetHandleId(i)==-1 then
        debug call BJDebugMsg("CreateUnitWithShadow: Invalid path for new shadow!")
        return null
    endif
    call DestroyImage(i)
    set bj_lastCreatedUnit = CreateUnit(owner,iid, x, y,facing)
    call DestroyImage(i)
    return bj_lastCreatedUnit
endfunction
 
Level 10
Joined
Dec 15, 2012
Messages
650
Credits to Deaod

JASS:
function CreateUnitWithoutShadow takes player owner,integer uid, real x, real y,real facing, string shadowfile returns item
    local image i=CreateImage(shadowfile, 64, 64, 0, 0,0,0,64,64,0, 3)
    if GetHandleId(i)==-1 then
        debug call BJDebugMsg("CreateUnitWithShadow: Invalid path for new shadow!")
        return null
    endif
    call DestroyImage(i)
    set bj_lastCreatedUnit = CreateUnit(owner,iid, x, y,facing)
    call DestroyImage(i)
    return bj_lastCreatedUnit
endfunction
I'm not want to remove the shadow of units :ogre_icwydt:
I want to remove the shadow of cliff level :ogre_hurrhurr:
(Will this remove the shadows of cliff level ?? I didn't tested it yet because :fp: it seems to be disabled in my trigger)
 
I would suggest trying to totally flatten your maps height(with the plateau tool and the largest brush) then under 'file' go to 'Calculate Shadows and Save Map'.
Once done undo those flattening jobs and see if you have got the result that you are hoping for.

WE can create some crappy shadow and these can be removed by doing what I said else change the field under 'Scenario' - 'Map options' -'Custom Light Environment'. The lighting effect will be the reason to your problem. Choose one that you think suits your map the most else there is nothing else that I might be able to help you with here.
 
Level 10
Joined
Dec 15, 2012
Messages
650
I would suggest trying to totally flatten your maps height(with the plateau tool and the largest brush) then under 'file' go to 'Calculate Shadows and Save Map'.
Yes, I done this but it generate extra shadows for models in the map.I don't want the extra shadows becaues some shadows didn't matched the model.

Also, change the light causes the :ogre_rage:models' colours turns extremely strange so I don't think it the way:ogre_hurrhurr:, thanks for your great help:ogre_haosis:.
:fp:Now I'm going to remake my map
 
Level 10
Joined
Dec 15, 2012
Messages
650
Maybe show us a screenshot and the map with the problem so I can get a clearer idea?
Would help alot!
Ok, here's my problem :goblin_cry:
After you applied Heigh in Terrain Editor, the stupid shadows will appear.Do you have any suggestion or way to remove that ??

Change Light in Map Option is not a good way because it makes a lot of doodads' colours turn "special"
 
Last edited:
The lighting model that you want to use is the reason you are having this problem.
Considering that you want to keep the colour of the lighting model in tact with how it doesn't make your models colour look weird I would suggest trying to change the terrain fog to a negative value! This will help the dull down the complete black hill face.

For this to work we have to use a little Jass as through this we can set any value to an action.
I am going to take a quote from myself from another thread on this forum as it already explains in some detail about what each value of this code does what for all of you Jass noobs.
.....

With the terrain for you can't set the Z Start value to a negative through "Scenario" - "Map Options" - "Use Terrain Fog" or GUI although can be changes with Jass script to add a cool effect. Here is an example. This can be placed in your maps initialization script with custom script.
JASS:
call SetTerrainFogEx(0, -7200.00, 8000.00, 0.00, .01, .07,  .02)
In the () we have 'The Style', 'ZStart", 'ZEnd', 'Density', 'Red Value', 'Green Value', 'Blue Value'.

  • 'The Style' keep this value as 0 as that style is linear(the one that we would want).
  • 'ZStart' This is the reason why we are doing this. Although I would suggest keeping it as a value of anywhere from 500 to the max value of 'ZEnd' but as a negative. (eg 'ZStart' = -2800, 'ZEnd' = 4000)
  • 'ZEnd' would be the value that you would usually want your fog to end, I would suggest trying any value from 1000 to 15,000.
  • 'Density' I can't really seem to find a reason for this field so I would suggest keeping it as 0.
  • As for the rest of the values they are just colours but instead of the max value being 100 as a percent the max is a real of 1.00.
Just do whatever you would think suit your map with any value.


I've also provided a test map.
Here is the [rainbow]Test Map.[/rainbow]
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
No it will only cause the terrain shadows to be removed (the ones generated by "save and calculate shadows"). These shadows are generated for doodads, destructible and the terrain mesh based on a WC3 style light source. They are mostly a problem to map makers as WorldEdit offers one no tools to modify them and fix "ugly" spots.

What is unclear is why a black and white shadow map is saved in 8 bit grey scale but I guess that was for lookup efficiency.
 
Level 10
Joined
Dec 15, 2012
Messages
650
:grin: I have solved this problem with two models.
Use ShadowRemover(Day) during the day and ShadowRemover(Night) during the night.
They remove the shadows that created by the terrain(not units' shadows).
:ogre_hurrhurr: Just download and use it if you want/need this.
PS : ShadowRemover(Day) seems abit blight


EDIT : added models :ogre_icwydt:
 

Attachments

  • ShadowRemover - Night.mdx
    832 bytes · Views: 80
Last edited:
Status
Not open for further replies.
Top