Added: 2 years ago
From: NemoKradXNA
Views: 5,766
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • I got this code semi-working in my game but the snag is that the upper outer atmosphere has a very hard edge to it as opposed to the dithered edge in your video. Any thoughts about why that might happen?

  • @zer0sumGames hmmm, not without seeing your implementation really, the original sample was double rendering, if you are still doing that, try removing it, but you will then have to play about with the intensity of the out put...

  • x-com

  • @defragen1 lol, yes, I loved that game..

  • dude... that looks great!!

    all the fine details like lit cities and moving atmosphere!

    one thing you could add to make look even better: auroras on the north and southpole!!

  • I have been messing around with your XNA implementation of this and found some strange things going on. For example, you have a for loop that executes effect.CurrentTechnique.Passes­.Count times but all that seems to do is render all five passes five times each additively. If you run it once instead, it does all five stages of the shader. It doesn't look as awesome but you can have the shader do the clouds two or three times to brighten them up or something. Seems wasteful to do it all 5 times.

  • Been a while since I did this, will take a look, may be a malformed loop from me copying code from one project to the next...

  • Thanks for the super fast reply :D. After disabling the frame rate limiter I tested the performance difference caused by eliminating the extra renders and there was a significant difference. Interestingly, the planet doesn't look as good with only one render. All the components are there but it's missing brightness and contrast. Using three passes of the cloud code doesn't hit performance much but brings back a lot of the brightness qualities. And adding texture mipmaping makes it look smooth.

  • Yes, took the loop from another shunk of code. Remove the loop. You can raise the brightness on the clouds by doing this in the shader output.Color = (clouds + cloudsN) * 2;

    Having ran it now, I really don't like this shader now lol, must do better in future..

  • Yeah, I made the same adjustments and it looks a lot better. I also removed the specular as it seems to look bad on planets. Do you mind if I use this shader in a project I'm working on? I may write my own eventually but yours is good for my purposes and runs pretty fast. If you do write a new one, post a video! I'd be very interested to see it.

  • Sure, use it wherever you like, as long as you credit the source I don't have a problem.

    Yes, the specular is way to high, but you can adjust that too, or as you did, remove it :)

    I have like a million and one things on at the moment, but if I do create another planet shader, like all my stuff I will post it :)

  • I am downloading the sample now. In the shader I recall making a few adjustments for brightness. As I say, I'll take a look.. :)

  • This is pretty cool, do you have the shaders up for download at all? Is this something i can follow as a tut using renderMonkey? i'm not the greatest shader coder lol

  • Yes they are all on my blog, I am sure I put the link at the end of the clip, if not then go to my channel page and it will be on there.

    I have not used many semantics so not sure if renderMonkey will like it much or FX Composer either.

    Let me know how you get on with it :)

  • Hey i'm curious, i have this shader used to render planets and atmosphere, no clouds or anything, what it does is shade the planet and atmosphere from space, as well as on the surface. I want to get atmospheric scattering implemented into it but i'm not a good shader programmer like i said, think maybe you'd be able to help?

  • No idea, can you put up a clip of how it renders now?

  • Yea i'll try and get one up real quick.

  • Comment removed

  • Comment removed

  • alright it finally uploaded:

    watch?v=x5jg80X1tWg

  • hmm, it has atmos scatter, in fact it looks like actual scatter rather than the one on my clip which is actually fake lol

    I don't realy understand what you want to do with it?

    I am sure Dark GDK supports shaders so you should be able to use my shader from the blog.

  • It does, kind of, but not the way i want, i've got an article from gpu gems 2 wich does what i want but its in glsl, i need hlsl, these two effects i have are similar but i cant figure out how to implement the changes into what i've got here. I can message you with the links if you like

  • No I have the book too.

    glsl is very similar to hlsl you should be able to port easily..

  • Oh i'm sure it is really, my main issue is that i dont know what the differences are, or even how to start trying to convert. What i'm really looking for is someone who can help me upgrade my current shader to include these effects.

  • What's the salary like? lol

    Mail me the stuff you have and I'll take a look when I have time.

  • Thanks for posting these tutorials... they are absoluteley awesome!

  • Sweet Mr NemoKradXNA Sir..! Very polished. Particularly like the scatter effect. Now, if you combine it with DrJNB's last "rays" code and plant the camera on the moon (with some topology). Et Voila... "Earth Rise!". Best done to "Apollo and Atnospheres" by Brian Eno of course!

  • Wow! Thanks, compliment indeed :D

    Not sure how I would use the ray's in an earth rise, but might just do something like that :D Good idea..

  • I was thinking you could do an Earth rise and have the earth eclipse the sun.

  • I get you I think.... might not get much of a view of the earth render though with all that sun light :P

    I'll have a play and see what I come up with..

  • Awesome. Looks great but the second atom scatter doesn't look quite right. Should it stop so suddenly, maybe a fade would be better?

  • Yes, as I say in the clip, was playing with it and didn't feel it fully worked as I wanted it to.

    Will play with it some more, I guess once I have put my post up on the blog you can have a look at the source and see what you can come up with :)

  • That will be awesome. I'm really

    interested to see how you've created the atmosphere, so I'm definitely going to be playing with it. :)

  • I am cheating...

  • Code is up on the blog now, check it out.

  • Great, Thanks for reminding me I got lost debugging some A.I. I'll check it out now :)

    A bit off topic from this video but are you planing on making any  tutorials on A.I.?

  • I have already done a post on finite state machines, but it was quite basic. I do plan on expanding on A.I and giving a more useful example in the future.

  • Cool, I look forward to that.

    At the base of my A.I. is a FSM but I'm currently working on Avoidance/steering and A* pathfinding but there are very few tutorials out there.

    As for the atmosphere I was wrong to judge it on youtube :) it looks awesome "in real life"

    After messing around with it for a bit I couldn't get any better results..

    Oh and cheating is such a harsh word. :)

  • Well it's the truth lol!

    Glad you like the sample, and it looks better "in real life"

  • really nice!

  • Thanks :)

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more