Another rendering update

Anything concerning the ongoing creation of Futurecraft.
Ivan2006
Fleet Admiral
Fleet Admiral
Posts:3021
Joined:Fri Dec 07, 2012 12:10 pm
Affiliation:[redacted]
IGN:Ivan2006
Location:In a universe.
Contact:
Re: Another rendering update

Post by Ivan2006 » Wed Jan 02, 2013 1:29 pm

sorry, but due to my native language being german, I have difficulties getting much sense out of that text, as making sense of stuff like that is difficult enough and reading it in english doesn´t make it easier for me.
Anyway, I do believe fr0st is talking about the technique he wants to use for far-away rendering.
Quotes:
Spoiler:
CMA wrote:IT'S MY HOT BODY AND I DO WHAT I WANT WITH IT.
Tiel wrote:hey now no need to be rough
Daynel wrote: you can talk gay and furry to me any time
CMA wrote:And I can't fuck myself, my ass is currently occupied

Chairman_Tiel
Rear Admiral
Rear Admiral
Posts:1890
Joined:Sat Dec 01, 2012 9:39 am
Affiliation:GLORIOUS REPUBLIC

Re: Another rendering update

Post by Chairman_Tiel » Wed Jan 02, 2013 3:35 pm

No, he's talking about australian ice cream.

Or bumpmapping, if I'm understanding this right.
[spoiler]Image[/spoiler]

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Another rendering update

Post by fr0stbyte124 » Wed Jan 02, 2013 6:39 pm

Bump mapping is a much older and weaker technique. With bumpmapping, you skin your model with a normal map, which is then summed with the normals of each polygon (for those who don't know, a normal is a vector pointing directly out from a surface and is useful for calculating angles in vector math). This gives you more detailed control over how light hits the surface material. Parts with normals facing the light source are brighter, and parts with normals facing away are darker. This gives an indication of depth but does not actually displace the texture. Still, it's cheap and works well as a suplement to the geometry. Additionally, by messing the magnitude of the normal vectors, you can change the glossiness of the material for free.

Image
Above: left is bump mapped, and right is fully modeled. Note the outline and the shadow.


The thing I am talking about is a more computationally expensive technique which produces real depth from a flat texture. The long version is just describing how that technique is tailored for our needs.

blockman42
Lieutenant
Lieutenant
Posts:478
Joined:Thu Dec 06, 2012 8:04 pm
Affiliation:Voxel Co.
IGN:Blockman42
Location:Holocene

Re: Another rendering update

Post by blockman42 » Wed Jan 02, 2013 8:32 pm

fr0stbyte124 wrote:Bump mapping is a much older and weaker technique. With bumpmapping, you skin your model with a normal map, which is then summed with the normals of each polygon (for those who don't know, a normal is a vector pointing directly out from a surface and is useful for calculating angles in vector math). This gives you more detailed control over how light hits the surface material. Parts with normals facing the light source are brighter, and parts with normals facing away are darker. This gives an indication of depth but does not actually displace the texture. Still, it's cheap and works well as a suplement to the geometry. Additionally, by messing the magnitude of the normal vectors, you can change the glossiness of the material for free.

Image
Above: left is bump mapped, and right is fully modeled. Note the outline and the shadow.


The thing I am talking about is a more computationally expensive technique which produces real depth from a flat texture. The long version is just describing how that technique is tailored for our needs.
this is what the futurecraft planets should look like!

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Another rendering update

Post by fr0stbyte124 » Thu Jan 03, 2013 12:38 pm

I'm now wondering whether it is worth trying to optimize the step-size. The important rule in shaders is that all of the units running on a single stream processor have to be executing the exact same code at the same time. If there is any branching, like if-then statements, all the units with "true" will execute while the others are paused, and then all the "false" units will execute while the trues are paused. It's actually more complicated than that because lol graphics cards, but the general rule is that branching murders performance.

Now, with that in mind, traversing up and down the octaves is going to cause branching unless we get realy ridiculous with the math. So failing that, the most important thing to prioritize is probably that the thread with the most steps is running 100% of the time, since we don't get to average out the performance. We are a bit fortunate in this regard, however, in that if my numbers are right the entire heightmap texture can easily fit inside even the smallest texture cache memory. This means that once a textel from the heightmap has been pulled into the stream processor, we c an access it in a songle clock cycle (technically we can access 4 of them, but they have to be adjacent and get averaged together and I can't see that being terribly useful here).

With texture access being that fast, the game changes. It becomes faster to act than to think. In the time it takes to hop an octave and work out the proper iteration scale, you may have been able to make a dozen or more 1st order texture queries. The worst cases will happen when you exit the chunk without hitting anything, and when that ray grazes a bunch of blocks, it's even more expensive for the octave traversing. It's probably all going to come down to benchmarking and real-world tests.

--------------

I'm also a little concerned with how much space even this is going to take up. Even as space efficient as this is, the amount of video memory we actually need to render whole planets is simply staggering. I might have to set up yet another virtual texture, this one will have two colors (or more likely two points from a color pallet) and hightmap with a range of 0-65535. Unlike all the other textures, this one would be meant for a single plane, and have variable resolution (so actually scalable for once). The first color would be the top block (either solid or color depends on the face), and the second dictates the color for the remainder of the column. I'm still thinking a mix of tesselation and raycasting for blockyness would have the best result.
Like everything else, the pipeline would allow these to run concurrently in the same scene. Voxel details could be added by chopping out a part of the big heightmap and replacing it with chunk-level heightmaps, or even full polygon meshes. So now we're looking at at least 4 different geometry models, but I think this final layer will finally let us scale however much we like (for planets, anyway).

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Another rendering update

Post by fr0stbyte124 » Fri Jan 04, 2013 10:41 pm

Another update.
Hardware tessellation is awesome. That is all.



I just learned that you can, in fact, tessellate quads and it makes more quads. With this, it would be trivial to make a skintight hull around a heightmap and then raycast the interior to make it blocky. Due to the tightness of the hull, except for oblique cases we're looking at a max of two steps.

I'm not saying that you have to go out and buy a DX11 graphics card to play Futurecraft. I'm just saying that you totally should, because it will be mindblowing.

User avatar
hyperlite
Lieutenant
Lieutenant
Posts:360
Joined:Thu Dec 06, 2012 3:46 pm

Re: Another rendering update

Post by hyperlite » Fri Jan 04, 2013 10:49 pm

I assume your IRL stuff is over or almost, because you made a lot of progress posts.
Spoiler:

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Another rendering update

Post by fr0stbyte124 » Sat Jan 05, 2013 1:39 am

I'm trying to balance the two, but I think I've been favoring Futurecraft too much the last two weeks.

User avatar
Dux_Tell31
Midshipman
Midshipman
Posts:100
Joined:Thu Dec 06, 2012 12:22 pm
Affiliation:Tellrim
IGN:tell31

Re: Another rendering update

Post by Dux_Tell31 » Sat Jan 05, 2013 10:59 am

fr0stbyte124 wrote:I'm trying to balance the two, but I think I've been favoring Futurecraft too much the last two weeks.
Well I'm glad you're back anyway. ^-^
"This is Minecraft, sir. We don't make physics, we ruin them." -Fr0stbyte124
"We are made of the elements out in space, in essense we are the universe discovering itself" -Neil Degrasse Tyson

Dr. Mackeroth
Designer
Designer
Posts:397
Joined:Fri Dec 07, 2012 11:59 pm
Affiliation:Alteran
Location:In the Holy Citadel of Altera

Re: Another rendering update

Post by Dr. Mackeroth » Sun Jan 06, 2013 1:36 pm

fr0stbyte124 wrote:I'm trying to balance the two, but I think I've been favoring Futurecraft too much the last two weeks.
It's a shame we have no way of paying you, then we could get this done at 50x the speed.

So Fr0st, what will Minecraft look like, and what speeds will it run at once you're done with the rendering engine.

And one piece of advice: don't over-do it. We (you) can come back and add more later in the mod.
This is a signature.

Shadowcatbot
Vice Admiral
Vice Admiral
Posts:2623
Joined:Thu Dec 06, 2012 9:46 pm
Affiliation:Nivanshae
IGN:_Shadowcat_
Location:Munching on important looking wires.

Re: Another rendering update

Post by Shadowcatbot » Sun Jan 06, 2013 2:01 pm

Well I have like $5 worth of change sitting next to me, I'm sure if we all threw are change in a jar it would look like we had a lot of money to give fr0st....

Maybe we should try to scam convince people to give us money in a kickstarter?
In yo ceiling, stealin yo wires



Do not open. Ever. At all. Enter at your own risk to life and limb.
Trigger warning
Bot gore warning
Memetic biohazard
Error bait
Spoiler:
[Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted][Redacted]

User avatar
hyperlite
Lieutenant
Lieutenant
Posts:360
Joined:Thu Dec 06, 2012 3:46 pm

Re: Another rendering update

Post by hyperlite » Sun Jan 06, 2013 2:02 pm

Frost doesn't want money. We need to pay him in small, delicious insects.
Spoiler:

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Another rendering update

Post by fr0stbyte124 » Sun Jan 06, 2013 10:18 pm

I am happily employed and can buy all the insects I want, thankyouverymuch.

Starting out, I am trying to keep the new engine looking exactly like the old one, except for a few really cheap things like mipmapping and fxaa. We'll probably have dynamic shadowing before too long because baked lighting won't look good on a moving ship. After that, who knows. I'll take suggestions and give you all an idea of how much is left in the graphical budget to spend on the fancies.

Dr. Mackeroth
Designer
Designer
Posts:397
Joined:Fri Dec 07, 2012 11:59 pm
Affiliation:Alteran
Location:In the Holy Citadel of Altera

Re: Another rendering update

Post by Dr. Mackeroth » Mon Jan 07, 2013 4:07 am

fr0stbyte124 wrote:I am happily employed and can buy all the insects I want, thankyouverymuch.

Starting out, I am trying to keep the new engine looking exactly like the old one, except for a few really cheap things like mipmapping and fxaa. We'll probably have dynamic shadowing before too long because baked lighting won't look good on a moving ship. After that, who knows. I'll take suggestions and give you all an idea of how much is left in the graphical budget to spend on the fancies.
Besides dynamic shadows, we could also do with dynamic lights (natural progression), so we can have search-beams or torches.
This is a signature.

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Another rendering update

Post by Iv121 » Mon Jan 07, 2013 5:42 am

Most importantly I think we should have colored light ! (Screw movement :tongue: ). This can make all those screenshots I photoshoped a reality.
They're watching ... Image

"I am forbidden tag" -CvN

Post Reply