SkyBox resize?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

SkyBox resize?

Post 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 ...)
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Yes,
In CSkyBoxSceneNode.cpp use
core::matrix4 mat = getAbsoluteTransformation();
instead
core::matrix4 mat;

Rotation and scale by xyz, works for me.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Guest

Post 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 ...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

So, must work. I get this one yearh ago.

Image

X scale = 7
Y scale = 1
ZScale = 7
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
pr3t3nd3r_guest

Post 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
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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?
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post 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 ...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Guest

Post 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?
pr3t3nd3r_guest

Post 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 ...
Post Reply