Page 3 of 10

Posted: Sun Feb 05, 2006 6:48 pm
by Pazystamo
Thanks for good replys :) But i have to find way to make it beter quality(i think ist texture fault). I almost made texture interpolation and now i need to decide to use it or not. It is quite good with simple uv reseting so i think its not worth to make interpolation(texture rescale).Now i need to sinchonize sun with sky color and ambient color.

Posted: Sun Feb 05, 2006 7:09 pm
by TheRLG
I just messed around with the textures some, and I think with a little messing around, it'll look just fine!

Here's a simple star texture I made:

http://img.photobucket.com/albums/v230/ ... /stars.jpg

Posted: Sun Feb 05, 2006 7:18 pm
by Pazystamo
RabidLockerGnome wrote:I just messed around with the textures some, and I think with a little messing around, it'll look just fine!
Could you upload new texture? I want to look :) I take this texture and idea from http://www.geocities.com/ngdash/whitepa ... color.html and resize to 128*128. But i will remake it for this project,its just for testing.

Posted: Sun Feb 05, 2006 7:57 pm
by TheRLG
hehe, this texture is crappy, just a simple gradient, but its 1024 for quality reasons.. but here ya go.

http://www.hybridmenace.com/sky2.tga

Posted: Mon Feb 06, 2006 2:15 pm
by Pazystamo
Some updates:
Fixed sun position calculation and time calculation(GTM time is in console).
Added ambient color from texture(experimenting).
updated sky texture(not final version).
sky uv now depends from sun height.
To do (this week):
create sun scene node with disabled z and make interpolated movement (now its buggy).

Download
Waiting for comments and ideas ;)

Posted: Mon Feb 06, 2006 8:07 pm
by Halan
can you explain me one thing why dont you just switch the sky texture to the star texture at night instead of having both rendered all the time?

but really it looks nice i really would use it in my project if you show the source code...

Posted: Tue Feb 07, 2006 9:29 am
by Pazystamo
I cant switch textures because at night near horizont is something like haze and you cant see stars near horizont. Besides stars will be on sphere and rotates,now its simple skycube. Source will be released when it works, i clean up code and create some functions to get/set values(now some is build in). Maybe after month i'll release some alpha version :)

Posted: Tue Feb 07, 2006 9:36 am
by etcaptor
Looks very well!
You can also change the color of the sun between horizon and zenith.
Congrats. I even thinks that you must post your node to Niko. Irrlicht yet has not skydome and yours looks great.

Posted: Tue Feb 07, 2006 9:42 am
by bitplane
this is looking pretty good! Just need the sun to change colour .. maybe size too, but that might just be an optical illusion
great work man, looking really good so far :)

Posted: Tue Feb 07, 2006 9:49 am
by Pazystamo
Thanks Etcaptor and Bitplane:)
Yes, i'll do sun color "blending" acording to sky color behind it and change ambient (near horizont from texture,higer its simple gray),but maybe next week :) This work must be finished until July(its my term paper), so then i will post code to Niko,write some tutorial and some documentation.

Posted: Wed Feb 08, 2006 8:25 pm
by Halan
Pazystamo wrote:I cant switch textures because at night near horizont is something like haze and you cant see stars near horizont. Besides stars will be on sphere and rotates,now its simple skycube. Source will be released when it works, i clean up code and create some functions to get/set values(now some is build in). Maybe after month i'll release some alpha version :)
looked at it again and now i know what you mean :)

something like that would also be good to be a build-in of irrlicht

Posted: Wed Mar 01, 2006 5:30 pm
by Pazystamo
Hi, again! After month (i haven't alot of time for this) i almost dont have any visual updates :( . But i started to make demo with GUI, that i could experiment with changeable variables,not hard coded. I have one queston, is it posible to set billboard as ESNRP_SKY_BOX with registerNodeForRendering without copying and rewrite all billboard node? Or i have to copy billboard code as new node and change this?

Posted: Wed Mar 01, 2006 6:54 pm
by etcaptor
Because SceneManager->registerNodeForRendering(this, ESNRP_SKY_BOX);
is invoked every frame in OnPreRender() funtion, you must use it for new node or can add an flag value in Billboard code for swithching of render pass, but in this case user can't use interface ISceneNode and will be forced to use CBillboardSceneNode. Also similar flag can be added for ISceneNode, but this will modify engine code.

Posted: Wed Mar 01, 2006 8:51 pm
by Pazystamo
Thanks, so i have to copy billboard code into my cpp file and edit that line and save as node with other name...
Other question, i create 2 nodes with ESNRP_SKY_BOX and looks that they are rendered by creation order. Is it true, or they are sorted by somethig else (pos,material)? I think that best way to order nodes as layers should be use node->render() in update after driver->beginScene. But how to stop that engine itself dont render that node again after manual render?

Posted: Wed Mar 01, 2006 10:28 pm
by etcaptor
I just take a quick look on CSceneManager code and saw this:

Code: Select all

	// render skyboxes
	case ESNRP_SKY_BOX:
		SkyBoxList.push_back(node);

......................
............................
..............
	CurrentRendertime = ESNRP_SKY_BOX;

	for (i=0; i<SkyBoxList.size(); ++i)
		SkyBoxList[i]->render();
Nodes from this type are rendered by creation order.