Page 4 of 10

Posted: Wed Mar 01, 2006 10:34 pm
by bitplane
you could comment out the RegisterNodeFoRrendering line in the billboard's OnPreRender, and do a forced render inside the skybox (replacement/skydome whatever) scene node's render function

Posted: Thu Mar 02, 2006 5:21 pm
by Pazystamo
Thanks for both of you. Now its more clearly for me. Just one part is unclearly, if i render node without RegisterNodeFoRrendering as ESNRP_SKY_BOX how can i be sure that nothing else was rendered before? I think that if i dont set node type it uses AUTO type. So i have somehow make that node user couldnt render anything else before my sky node. Now i use my class which controls all sky nodes (sky,sun,stars). So should i render all nodes from my class manualy and force user to update class before all others nodes (first after beginScene)? Does it work correctly if user uses other nodes with ESNRP_SKY_BOX?

Posted: Fri Apr 07, 2006 2:06 pm
by etcaptor
Hi Pazystamo,
Do you have any progress with your project?
I suppose you manipulate vertex colors, for sky dome and diffuse color for models right? If this is true is very interested case when on the terrain exist some building /castle/. It's necessary to prevent "lighting" inside of building.

Posted: Sun Apr 09, 2006 11:40 pm
by needforhint
a solution to inside light syndrom, if you want to have loaded both, outside and inside in one scene, could be setting materials of the inside with another flag...whole insisde should be separate mesh, placed well and having set material flag to a material that doesn't respond to the light present outside... the material type of the inside mesh will simply respond to the light present inside, absolutely different then outside....

....so I supose the sky dome should have a parameter core3df(), which is ment to carry a direction, which will be mapped into a shader creating per pixel directional light :wink: and that shaded material will care all meshes on the outside... this material will need a flag, like EMT_SKY.... I am creating a flag for a per pixel directional light (with specular color too and mapping normal map as well)... the insides perhaps are gonna be fixed function clasic lights, unless you want a multiple light shaders, and dont know what will be the performance then...
for know the light I have done is target 2.0 pixel shader soo, only better graph cards...it has theese parameters:
1-colorRGBA ambient
2-colorRGBA diffuse
3-colorRGBA specular
4-vector3df direction
5-float specular_strength
it maps both texture layers
so you can for example animate the diffuse color with a dumy node to achieve nice "redding" sunset or sad white morning .....
if you got here,..I am thinking, should I write my thoughts into a tutorial on shadering specificly for irrlicht?

Posted: Wed Apr 12, 2006 5:06 pm
by Pazystamo
etcaptor wrote:Hi Pazystamo,
Do you have any progress with your project?
I suppose you manipulate vertex colors, for sky dome and diffuse color for models right? If this is true is very interested case when on the terrain exist some building /castle/. It's necessary to prevent "lighting" inside of building.
Hi, sorry, i havent time to code for a month :( But maybe next weak i have to show intermediate work so i have to start code again :) (left ~45 days to finish). I manipulate with sky cone UV (slides on sky color texture) and now for lighting i change ambient color. But i recomend slow dynamic light (sun) for correct inside lighting (shadow inside or inside light). I'll realese unfinished code when i clean up it.

P.S. from my site statistic i see that people cares my demo (about 50 downloads this month) so i'll try not to disappoint you.

Posted: Thu Apr 27, 2006 10:14 pm
by Pazystamo
UPDATES!
Added sun movement interpolation (in demo every 30 virtual minutes).
Copy billboad code and disable Zbufer,made ESNRP_SKY_BOX and use updateAbsolutePosition. So now sun dont jumping on camera move.
Some fixes, so now works a little faster ;)

New demo http://www.pazystamo.projektas.lt
move with arrows, rote with mouse. press spacebar to activate cursor (for speed adjustment), press again for camera move.

Maybe on weekend i will play with sky textures...
Good night! :)

Posted: Sat Apr 29, 2006 9:49 pm
by krama757
Wow, I like it a lot! Ive been working with a sky box with the drynamic sky...using Magic 2D. But this is a very promising project also!

Posted: Thu Jun 01, 2006 9:43 am
by Pazystamo
HI,
I have some good and some bad news ;). Good is that i released source and demo. Bad - project is unfinished and almost without coments, also untidy code :oops: . I took academic holiday and don't have time and desire. But i plan to finish it next year, after my holiday. Now it is only with sun, no moon, but you can add moon formulas from here.
Also you can add light to sun position.
Download from my site http://www.pazystamo.projektas.lt

Posted: Thu Jun 01, 2006 12:59 pm
by dawasw
Excellent work. Very nice code (even untidy its actually quite good) - I mean here the implementation.

Thank you very very much :D

Posted: Thu Jun 01, 2006 1:02 pm
by Pazystamo
Where do you find nice code? :) Thanks for comments!

Posted: Thu Jun 01, 2006 8:51 pm
by andrei25ni
Your project it's excellent. Good work.

Posted: Thu Jun 01, 2006 11:29 pm
by etcaptor
Thanks for that code. I believe that now many users can give you any ideas or code issues in addition.

good job

Posted: Fri Jul 07, 2006 12:15 pm
by juliusctw
hey Pazystamo

why is your sourecode in executable? i'm running linux so i would have to recompile your source code to check it out, how can i see the source?

Posted: Fri Jul 07, 2006 1:31 pm
by stodge
You may be able to extract it using Wine.

Posted: Fri Jul 07, 2006 8:42 pm
by Pazystamo
Juliusctw, now i put .TAR compresed file. I hope that now you can extract it on linux. I didn't expect that someone still looks this my old code ;)