Page 1 of 1

SkyBox resize?

Posted: Mon Sep 05, 2005 3:52 am
by Pr3t3nd3r
i'm trying to scale the skybox and i get no result ... i made the changes on the forum ... rotation works but scale don't ...
Also i tried to change
f32 l = 500.0f;
f32 t = 1.0f - onepixel;
f32 o = 0.0f + onepixel;
the l value. but the texture is showing at the same dimension ...
I want an larger field of view but only on texture ...
Anyone have resized the size of sky box ?
(i want something change fov ... but to not affect other nodes .. only the skybox rendering ...)

Posted: Mon Sep 05, 2005 7:47 pm
by etcaptor
Yes,
In CSkyBoxSceneNode.cpp use
core::matrix4 mat = getAbsoluteTransformation();
instead
core::matrix4 mat;

Rotation and scale by xyz, works for me.

Posted: Mon Sep 05, 2005 8:12 pm
by Guest
I used search :) found that used that.
Get rotation to work.
But the size of sky box is making no diference ...
the textures of the sky box look the same ... or is disapearing totaly ...

Posted: Mon Sep 05, 2005 8:34 pm
by etcaptor
So, must work. I get this one yearh ago.

Image

X scale = 7
Y scale = 1
ZScale = 7

Posted: Mon Sep 05, 2005 8:42 pm
by pr3t3nd3r_guest
take irrlicht12 code
add magic line's
compile new dll ...

take example 10, copy dll, change global include path

put core:
scene::ISceneNode *skybox = smgr->addSkyBoxSceneNode(
and

smgr->drawAll();
skybox->setScale(irr::core::vector3df(skybox->getScale().X+0.01,skybox->getScale().X+0.01,skybox->getScale().X+0.01));
driver->endScene();

run ... and see no change on the box size ... if it was a box all the textures of sky box should change size .... and rendering mode ....
wait until skybox started to disappear ( no change in thexture rendering ... no real box ....)

Get depressed because even drawing an box and some textures ... in the right way seems is making lot't of problems


Post this ... and hope someone know the magic way to dray an box .. :P
be back very soon

Posted: Mon Sep 05, 2005 8:50 pm
by etcaptor
Dissapearing of skybox after this line occurs in Irr.011. You must add line like AutomaticCullingEnabled = false; for avoid this. But in Irr.012 culling is dissabled for sky box /check it/

Scale for skybox by default is 1,1,1.
Why do tou not try instead

skybox->setScale(irr::core::vector3df(skybox->getScale().X+0.01,skybox->getScale().X+0.01,skybox->getScale().X+0.01));

something like

skybox->setScale(irr::core::vector3df(10,2,10));

for test?

Posted: Mon Sep 05, 2005 9:33 pm
by Pr3t3nd3r
rotation is working fine ...
skybox->setRotation(irr::core::vector3df(skybox->getRotation().X+0.01,skybox->getRotation().X+0.01,skybox->getRotation().X+0.01));

scaling have no effect ... except culling made by video card ... tried you sugestions too

in the advances topic somewone say that the angles remain the same (no mather what size is the skyboc )... don't know why ...

Posted: Mon Sep 05, 2005 10:17 pm
by etcaptor
I have no idea. For me this works perfectly.
I even use two skyboxes with different scales. For the smalest skybox I set transparent material flag for all materials to get some clouds layer effect.

Posted: Tue Sep 06, 2005 7:21 am
by Guest
This sounds similar to my scaling problem using your tweaked code.. (all nodes speed up).. the node would dissapear even though I was scaling up.. or it didn't affect it at all.

Is your problem happening with STANDARD irrlicht code and not your tweaked version?

Posted: Tue Sep 06, 2005 3:58 pm
by pr3t3nd3r_guest
That was wat i was saying ... is happening in original irrlicht too ...
But scaling, re size is working fine ... the changes only don't have visible effect ...

http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8590

.... any way ... i updated the code ... my code ... all in one post with -out duplicates... and i test it and is working fine (of curse) resize, move .. etc ...