#That looks really bad with the contrast
1 messages · Page 1 of 1 (latest)
rather than raycasting and calculating where exactly I should place my point light on the beam
I just literally placed some point lights along the beam and moved along the terrain
to better see where they should bounce, right?
I can show you with and without area lights
without point lights
with point lights
1 more example
without
with
it looks better but you can see the floating point lights
also it's still weird
I might need colorbleed too
maybe I should use one point light with a very large diameter and somehow decide to place it one of the raycast hit points
Your point lights have a very small radius so that prevents them from looking like ambient light
they have a range of 50m 😄
radius, not range
In my experimenting this one point light looks great anywhere relatively close to the surface that's being hit, as long as it doesn't go through it
Might still need a couple of more of them for situations where the light in motion hits different objects at different parts of the cone
yes exactly
the tricky part is probably to do this but make it smooth while the lamp is being waved around
but it seems like intenstiy needs to be high
for the light
I mean the point lights
Their intensity should be proportional to how much light is hitting the surface
2.5 in the further away one, 0.9 in the closer up one
Intensities of 34 and 47 respectively
in lumen??
Yes
Intensities are relative to exposure in HDRP
also the tricky thing is I can focus the beam of mine with the mouse scroll
The smaller the area of the light is on the surface that's being hit, the smaller the radius of the "bounce" light should be as well
My first option would be to do say five raycasts for five lights around the cone, halfway from its center, accounting for change in the cone
Then at each raycast place the bounce light source at maybe 25% of the distance in
Then see how it looks and figure out how the radius and intensities need to change over distance
I hate the fact that one of the raycasts might not hit
maybe I could find overlaps or something
like if I place a trigger on my spot light cone
maybe too expensive every frame
Eh
Try a spherecast instead if you need a "thicker" raycast
but I guess I'd be able to calculate the surface or something
But missing one would be intentional
I'm getting ahead of myself now
If a raycast misses it presumes that that part of the light cone is missing the thing you're illuminating, so less light is bounced
Which is exactly what we want
I see what you mean
Even with just one raycast down the middle it might be plenty convincing enough, who knows
more raycast hits = higher surface = more point lights
but like, If I'm just hitting a wall in the upper right corner with my beam, it wouldn't hit if the wall doesn't rotate in
but that's a specific case now
shouldn't get ahead of myself
also maybe a colorbleed effect or something
You can do as many raycasts and lights as your performance budget allows, but only so many
ok ok
thanks mr. pro
I will experiment further
I'm still in my prototype phase, just testing
but I need to figure these things out
btw should the point lights not use shadows?
I don't know how they'd mix with the spot light
I tried and it looks alright either way...idk
They're significantly more expensive with shadows, and with a large radius the shadows are hard to notice
But they technically do prevent illuminating areas that should not be illuminated
yes but it's FPS so I don't know if I could really tell the difference
The issue with color bleed is that raycasts are against colliders, not meshes with textures on them
Iirc you can also cast against meshes, or get the nearest mesh vertex and UV coordinate, but the first option is way more expensive and the second one is way more complicated
You could instead just get the meshrenderer of the collider hit and read a color property stored in its material or somewhere, to guess the bounced light color
they're going to be outside my vision, those areas, no?
ok I won't
I almost forgot, I have lit particles flying around
it might look good with point lights
Yes, but since they can get very close to the lights you must ensure the radius is never too low
Or the particles get logarithmically brighter when approaching the light
radius of what? the particle system
yeah, because I want them to move in world space, the radius is giant lol
Radius of the bounce lights
The smaller the radius, the more the light's brightness is concentrated at its origin point
You can test it by setting a light's radius to 0 and moving something very close to it
I expect it will practically nuke the screen brightness
This also often requires optimization
If you've got some kind of atmospheric specks, like marine snow in your case, you don't want to cover the whole level with it, but rather have the system follow the player to only spawn the particles in their vicinity
silt but yeah I wanted to avoid the particles moving with the player
I see that all the time in horror games with dust flying around
I'll see how I can get it to perform
They don't move with the player if if the simulation space is world, regardless of how the system moves
hmmm it might work if I have a big enough radius
I didn't want them to just spawn into existene
and I didn't want them to spawn from the player direction but I guess I make make the shape a sphere and spawn them randomly from within
that might work
Fading them in/out is pretty much guaranteed to be unnoticeable in that situation
The advantage of following the player is that you don't have to deal with the culling to keep the particle counts sane
that's true
ok more thing and then I'll leave you alone
I'm thinking about how exactly I'll make my cave system
I am using the digger asset but its shader is broken in unity 6, so the test cave mesh you saw was an exported fbx mesh
I was going to texture exported meshes with polybrush or something
is this an ok workflow?
though I think the cave meshes may have broken lighting because they lack UVs
I'm just considering the way I should approach this
I briefly considered importing all the meshes in blender, generating UVs, importing into substance painter and texturing them but my game would be like 200GB
I know splat maps are the way to go, maybe I hsould just go with exported digger meshes + polybruh and see if the polybrush shader fixes the shadow issues
Nnot really
Lightmap UVs are required for baked lighting which can be generated automatically
And I wouldn't ever consider unwrapping such an organic mesh with polybrush, or in general
You'll probably want a triplanar shader
I thought polybrush can do triplanar
someone told me that microsplat shader still works for digger in unity 6 so I guess I'll bite the bullet and buy all those needed add ons for that if it will make my life easier
I think polybrush can only splat 4 materials anyway which is a few too few for me
and I think I can make the bounce light look good with some raycasts, then sample pixel color and turn the light color to that of the pixel
I will experiment
Polybrush is a mesh editing tool that can edit UVs
Triplanar is a shader that doesn't require UVs, it doesn't matter where it comes from as long as it supports the shader features you need
You may find that "sampling a pixel color" can be quite a complex that
I would recommend storing a color in some component or asset instead, if possible
Now I'm curious lol
I will see how that works out first
I didn't know polybrush edited UVs at all