Thought about 3d

Started by iWasAdam, September 15, 2021, 07:04:23

Previous topic - Next topic

iWasAdam

Loved the turok series.

I've been thinking about 3d and the pipeline and how things could be different.
I'll focus only on the display and not the lighting

1. lets assume that there is going to be much more done on the cpu than before
2. initial processing would determine what objects are visible
3. processing would then use the normals to decide what faces are visible
The above we already have

ok. lets look at bit a unreal and nanite - a way of using megascans to subdivide a scene in tiny bits and only render those tiny bits
First a look at the debug view of nanite:

this shows the breakdown into render triangles

so. what we need is some way to break big triangle into little ones and ignore really small ones and only send what is no 'visible'
1. take a triangle - find it's center
2. use the found center to create 3 new small triangles
2a. use a displacement map to offset the center by the normal
3. repeat until a min size is reached - and render

This would instantly give us some form of tessellated and displaced view?
I would need to do some live tests on this - but (is) the theory is sound??

Kryzon

There's some literature in here, explaining how the modern tesselation shader (OpenGL 4.0+) works: https://catlikecoding.com/unity/tutorials/advanced-rendering/tessellation/

Kryzon

I think you can simplify things, just subdivide each edge at the middle, then reconnect those points with their neighbors. That's uniform enough to look good.

iWasAdam

some excellent stuff to read there. I've already started to digest some of it ;)

This is the triangle subdivision I was thinking about:

STEVIE G

I have used this subdivision technique for shadow rendering but I can't for the life of me understand why you would bother with this for normal rendering. Can someone explain to a simpleton?

col

Adam, that form of subdivision won't work for anything but modelling, and maybe special effects. When it comes to a scene with displacement where you want higher geometry levels you have to break and move the edges too, then you also get the joy of making sure adjacent triangles also subdivide the adjacent edge as the exact same places and level of subdivision to prevent holes.

Learning all of this on the cpu is a great thing to do. Understanding how it all works makes working with the 'dedicated processor' so much easier.
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."

iWasAdam

Quoteadjacent triangles also subdivide the adjacent edge as the exact same places and level of subdivision to prevent holes.
Yep. that's exactly what I thought... It certainly makes you think and appreciate what's going on behind the scenes with 3d.

@Stevie G You mentioned using it for shadow rendering - what were the results like?

STEVIE G

Quote from: iWasAdam on September 19, 2021, 07:36:32
Quoteadjacent triangles also subdivide the adjacent edge as the exact same places and level of subdivision to prevent holes.
Yep. that's exactly what I thought... It certainly makes you think and appreciate what's going on behind the scenes with 3d.

@Stevie G You mentioned using it for shadow rendering - what were the results like?

Good. I used it for pre-processed shadow textures which needed to hug the landscape below so not real-time rendering.

iWasAdam

any examples of it in operation - or am I too late for that lol?


iWasAdam

excellent - it's always good to have a butchers and see stuff in action :)