-
Hai it's me again xD
Feels like I'm asking too much, but I just started all that coding and designing and yeh.. x3
So this time I tried to make that big arrow, that shows up when you click somewhere for your char to run to, transparent.
I changed the file called cursorTex.jpg to a transparent .png file, and transliteratet the jpg to png in the media-materials-Cursor Folder.
As always, I failed and now that arrow is black.
Anyone knows how to make it transparent/invisible?
-
I tried looking this up to see if I could be mistaken on this but really little to nothing came up about this. I would assume that you would open the cursor ( edit with GIMP or whatever program you use ) and made sure that it was on a checkered background and erased the cursor before proceeding to save as a .PNG there might be a file that in the main folder that has the cursor saved and you might need to change it ( Could be wrong ). But if not you could always simply hide your cursor by pressing 'Tab' I think and then 'C' to open your chat window, 'V' to get your map up again, etc. etc.
-
Assuming the new cursorTex is a transparent .png, then add the line alpha_rejection greater_equal 128 above the texture_unit line.
Full new code:
material cursorMat
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
env_map spherical
texture cursorTex.png
}
}
}
}
-
Just adding on to what Phloxen said, try this code if the one above doesn't work (I have a transparent cursor myself). It's just a couple of extra lines added, no big change:
material cursorMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
env_map spherical
texture cursorTex.png
}
}
}
}
[/color][/size][/size]
-
Already tested mine in-game. cx
The cull lines don't serve a purpose in transparency typically, they affect how faces are rendered.
Which, if you're trying to make all the faces disappear, aren't needed.
-
Thanks for those codes cx I tried them, but now it's white instead of black xD
And I gotta correct myself, I'm not trying to get the cursor transparent, but the big arrow that appears whenever you click somewhere with your cursor. I just thought it's the same because the texture files of that arrow are called cursorTex.
Is it even possible to make it transparent?
-
I don't think I have ever seen it done before so maybe there really isn't a way to make that arrow transparent in the game ( Could be wrong and maybe I didn't look harder or overlooked it ) but so far, nothing.
-
What art program are you using? And perhaps try saving the file as .jpg rather than .png, like the original file.
-
Art program is gimp and paint tool as, I tried both. And I think if I save them as .jpg, it won't stay transparent..
-
In order to save something you want to be transparent, it indeed does have to be .png
-
Thanks for those codes cx I tried them, but now it's white instead of black xD
And I gotta correct myself, I'm not trying to get the cursor transparent, but the big arrow that appears whenever you click somewhere with your cursor. I just thought it's the same because the texture files of that arrow are called cursorTex.
Is it even possible to make it transparent?
Mine is currently, transparent, so I'm not sure why yours isn't working...
it is a .png and you changed it to a .png in the code, yes?
I mean, if you want proof it's possible, here's me clicking to move with no cursor showing up:
(https://i.gyazo.com/41b6413701caea22c24b76cdab338be7.gif)
So it must be something on your end...
EDIT:
Are you certain you've made actual transparency? GIMP works differently than SAI for this. By default, jpgs are flattened and will erase to white, yeah?
(https://i.gyazo.com/477c09331279d31600d03a6440fec017.png)
So did you add transparency to the layer in order to erase the image to the actual transparency squares, not white?
(https://i.gyazo.com/8d2775c44b55d12d636ec78bda92c254.png)
(https://i.gyazo.com/999cad66dcc0b8380993afad036ee06e.png)
-
It finally works!
I did the same on my Windows pc, and there it worked. I'm not sure but I guess mac somehow messed up the material codes before.
Thanks for all that effort Phloxenfree, it helped a lot! :3
-
It finally works!
I did the same on my Windows pc, and there it worked. I'm not sure but I guess mac somehow messed up the material codes before.
Thanks for all that effort Phloxenfree, it helped a lot! :3
Anytime! Glad you got it working. c:
-
Locking this up for you as you have found how to get it working. Have fun with it!