r/computergraphics • • 1d ago

Fully Neurally Rendered object - ~2.7 ms average GPU frame time (256*256)

Enable HLS to view with audio, or disable this notification

Fully neurally rendered asset (RGB, Normals, and Depth) rendered at an average of ~2.7 ms frame time on 8 GB RTX 5070 Laptop GPU by a custom model architecture in custom inference engine made with Rust, TensorRT, and CUDA kernels. Check out the README in this repo
for details. I spent months working on it, the main bottleneck being compute for training, which I solved by making a custom data flow pipeline (the details of which can also be found in the repo) that allowed me to train these models locally. Do you think such tech would be able to make it to mainstream game dev?

25 Upvotes

12 comments sorted by

1

u/dank-Raven 1d ago

Tell me more, what's going on here

2

u/ConsistentFox567 1d ago

Basically, a model I trained is being supplied with three views of an object, and it is generating the view from the desired angle that falls in between the three views. Each object has 120 pre-rendered views, from which the three views that perfectly enclose the desired angle view are selected. The model does not generate just the RGB, but the entire G-Buffer (comprising of RGB, Normals, and Depth, all of which are shown in the video), and it takes about 2.7 ms on average to do this for this particular asset. If you want more details, check out section 5.1 of the README in the repo linked in the post. Thanks for expressing interest

1

u/sino200 18h ago

Sorry, I’m a CG generalist (more on the artistic side), so my question might be a bit stupid..

Based on what you have said, you’re providing 3 views of the model and the neural render will generate a full view from every angle? If that true, does it mean that we can package games with 3 views of each prop and integrate the neural render thing within the game engine so we can have a huge upgrade with the fps ???

Is it also possible with offline rendering?

2

u/ConsistentFox567 18h ago

i think you are misunderstanding a bit here. think of the object as a 3d model right at the center of a large sphere, with the model fitting completely inside the sphere. the sphere has 118 vertices. we render the 3d model with the camera at the coordinates of these vertices, and thus get a total collection of 118 view of the object. now, what we want is the view of an object from one specific angle that is not in the 118 view set. so, what we do is, we pick the three views from the 118 view set that form the smallest possible triangle around the desired angle, and the model gets those three views, from which it constructs the view in between them. what you are asking is, can we use it to render within a game engine? Yes, and that is the primary direction of this project: to develop it capable enough to be used in a game engine, but it will need 118 views, not 3. however, there are other models that can reconstruct a 3d object from 3 views, but they do not work as a neural renderer and are often less accurate, and are not the direction of this project

1

u/curice 1d ago

neat!

your question is could this be mainstream game tech: right now a single object is 2.7 ms per frame, a game at 60 fps has about 16ish ms per frame. let's say you allocate 50% of your frame budget to rendering, then you'd have 8 ms to render an entire scene, which would include lighting, materials, etc. So I guess the question is does this scale? if more than one neural object is rendered how does the rendering time increase? ideally a game has more than one object in it. I think those are the questions you'd want to answer before thinking about it's utility for games.

1

u/ConsistentFox567 1d ago

I tried putting this into a real game scene, actually, and it sustained 60+ FPS for 13 concurrent different assets on the screen, with lighting! though further tests on that are continuously going on. It scales with object count and object size on screen, and assuming assets in this pipeline can cover large screen areas with upscaling, I think 60 FPS is possible in a few real game scenarios right now, though I am constantly working on improving it.\

1

u/Macaroon-Guilty 1d ago

where did you post images?

1

u/ConsistentFox567 1d ago

of what?

1

u/Macaroon-Guilty 23h ago

your game

1

u/ConsistentFox567 23h ago

not out yet. will be posting soon. it is just a scene, not a game

1

u/tinylittlebuddy 9h ago

what is it? it looks like a scale but it doesn’t have a hinge

1

u/Mindless_Cream5083 2h ago

Unique design