- Home /
Cone mesh that gradually fades?
Edit 1:
Here is a picture of how far I have got. I have mapped a white to transparent radial gradient onto the cone but there is a very visible seam. Luckily if viewed from one side the seam isn't visible so it shouldn't be too much of a problem.
I want to make a cone mesh fade out on a gradient where at the top of the cone (the single vertex) it is white and at the bottom (the face) it has completely faded out, like a "lighthouse effect". I have done some research and I think it is referred to as "volumetric lighting" but I don't have the money to spend on asset packs under this name.
I have:
A cone mesh.
A gradient texture (white on the bottom, black on the top).
Another gradient texture (white on the bottom, transparent on the top).
I have tried many things that haven't worked and I would appreciate it if anyone can shed some light (pun intended) on the matter.
Thanks.
It's important to know how the UV's on the mesh are setup. (The Uv's map each vertex of the mesh to a particular point of the texture image.)
I don't think you need volumetric lighting for this. I'd think that the correct UV's on the cone, and a matching gradient texture (white to transparent), would be sufficient.
Show us some pics of what you've got now: might help us spot what's wrong.
Thanks, I've looked into UV mapping and set up an image (view Edit 1) that maps onto the cylinder. There is still a visible seam though.
I would have used an image where the white is in the CENTER, and fades out to transparent radially. Then I would map the apex of the cone to (0.5,0.5) Then, as I go down the cone "height", map each vertex to points on concentric circles on the image around (0.5,0.5). (So, points CLOSER to the apex will be mapped to circles on the image with S$$anonymous$$ALLER radius.)
Answer by IgorAherne · Jan 01, 2017 at 01:54 PM
It seems that the uv coordinates don't match the image.
I can see the image, but not the actual unwrapped "uv layout". Double check that that layout conforms to the correct area of the image. You should also "dilate" the sampled image, to avoid seams when looking from larger distances (if mip-maping is used)
Answer by Grench1 · Jan 02, 2017 at 11:41 AM
Create a new material and reduce periodically the Alpha value with a script.
Your answer
![](https://koobas.hobune.stream/wayback/20220612103737im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Poor spotlight gradient in Unity 1 Answer
Using shuriken to create volumetric lights effect 5 Answers
Negative light no longer possible? 2 Answers
I need help with directional light 1 Answer
My lighting is weird 1 Answer