#That looks really bad with the contrast

1 messages · Page 1 of 1 (latest)

frosty sparrow
#

What does it look like now, where are the lights and what are their properties

stoic agate
#

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

frosty sparrow
# stoic agate

Your point lights have a very small radius so that prevents them from looking like ambient light

stoic agate
#

they have a range of 50m 😄

frosty sparrow
#

radius, not range

stoic agate
#

oooooh

#

I'm stupid

#

oh my

frosty sparrow
stoic agate
#

goddamn

#

I missed this

#

IQ in the single digits

frosty sparrow
#

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

frosty sparrow
#

the tricky part is probably to do this but make it smooth while the lamp is being waved around

stoic agate
#

but it seems like intenstiy needs to be high

#

for the light

#

I mean the point lights

frosty sparrow
#

Their intensity should be proportional to how much light is hitting the surface

stoic agate
#

yours looks good

#

what's your radius setting?

frosty sparrow
#

2.5 in the further away one, 0.9 in the closer up one

#

Intensities of 34 and 47 respectively

stoic agate
#

in lumen??

frosty sparrow
#

Yes

stoic agate
#

better

#

but my intensities are way higher

frosty sparrow
#

Intensities are relative to exposure in HDRP

stoic agate
#

also the tricky thing is I can focus the beam of mine with the mouse scroll

frosty sparrow
#

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

stoic agate
#

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

frosty sparrow
#

Eh
Try a spherecast instead if you need a "thicker" raycast

stoic agate
#

but I guess I'd be able to calculate the surface or something

frosty sparrow
#

But missing one would be intentional

stoic agate
#

I'm getting ahead of myself now

frosty sparrow
#

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

stoic agate
#

I see what you mean

frosty sparrow
#

Even with just one raycast down the middle it might be plenty convincing enough, who knows

stoic agate
#

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

frosty sparrow
stoic agate
#

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

frosty sparrow
#

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

stoic agate
frosty sparrow
#

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

stoic agate
#

they're going to be outside my vision, those areas, no?

frosty sparrow
#

Usually

#

I wouldn't use the shadows unless there was some absolute need for it

stoic agate
#

ok I won't

#

I almost forgot, I have lit particles flying around

#

it might look good with point lights

frosty sparrow
#

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

stoic agate
#

yeah, because I want them to move in world space, the radius is giant lol

frosty sparrow
#

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

frosty sparrow
stoic agate
#

I see that all the time in horror games with dust flying around

#

I'll see how I can get it to perform

frosty sparrow
stoic agate
#

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

frosty sparrow
#

The advantage of following the player is that you don't have to deal with the culling to keep the particle counts sane

stoic agate
#

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

frosty sparrow
#

You'll probably want a triplanar shader

stoic agate
#

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

frosty sparrow
#

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

stoic agate
#

I will see how that works out first

#

I didn't know polybrush edited UVs at all