Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How do you avoid 'white-out' when scaling an object?

Author
Message
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 12th Sep 2008 23:47 Edited at: 12th Sep 2008 23:47
I have noticed that some objects which have been made in an external packages and saved at a small scale become white when scaled in DBP.

Take the picture below for example (before scaling on the left and after scaling on the right):



It is a sci-fi container supplied by Spotaru in the Free Models by Spotaru thread.
There is nothing wrong with the model, it is a great model (thanks Spotaru) but in my project I need it to be scaled by 5000 DBP units and when it is a get 'white-out' as demostrated in the image above.
This isn't the only model I have problems with. The same thing has happened with many models, including some commercial ones.

I tried set object normals with no effect. I tried set normalization on with no effect and I tried scaling by moving the vertices as demonstrated in Cash Curtis's model viewer, but again, no effect.

Can anyone tell me what is causing the 'white-out' effect and what I can do to avoid it?

Thanks



Attachments

Login to view attachments
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 13th Sep 2008 00:47
This happens when you have glossiness on an object, DBPro seems to hate scaling glossy object. There's probably a display setting that gets rid of it - but I think your better off trying to fix it in your modeller.


Health, Ammo, and bacon and eggs!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Sep 2008 01:02
Maybe I'm doing something different to you, but I see no effect on the object brightness when scaling the object using the following code:


So what are you doing differently to me?

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Sep 2008 02:06
Ian, I have no idea what I am doing differently but I must be doing something odd!

Your code runs fine. I have ripped mine apart to try and isolate where it is going wrong but I can't seem to replicate it on it's own.



Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 13th Sep 2008 02:18 Edited at: 13th Sep 2008 02:19
I seem to rembember you can scale the specularity of the object in proportion or in inverse proportion to it's scale, so the lighting stays the same. Set object specular.

Spotaru
17
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 13th Sep 2008 04:18 Edited at: 13th Sep 2008 04:19
I don't have a clue why the texture is lost when scaling the model, so I made it 10 times larger for you. Hope this helps. Here is the zip. If you need it even larger, just let me know.

Attachments

Login to view attachments
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Sep 2008 09:40
Thanks Spotaru, I appreciate your help. I do actually need it larger because I am scaling by 5000 but don't worry about it the model isn't the problem as demonstrated by IanM's code above. I need to try to find out where the problem lies in my code.

Thanks



dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 13th Sep 2008 10:21
I've noticed something similar before, when scaling objects I've noticed the normals also get scaled thus render incorrectly with lights due to the normals no longer being normalized. However this was fixed by Set Normalization On, never seen this happen while using this.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Sep 2008 15:06
I think DC is on to something there - it rings a bell. I'm sure there's a simple solution. If you're still stuck email me a snippet showing the problem and I'll have a look (but you might need to pray for rain ).

Login to post a reply

Server time is: 2024-05-03 12:10:07
Your offset time is: 2024-05-03 12:10:07