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.

Newcomers DBPro Corner / Problem with the SCALE OBJECT command.

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Oct 2003 17:28
Hello

I have set up a basic scene but I'm having problems with the lighting. I haven't put any lights in the scene as you can see from the code below and yet objects are reacting to light. I presume this is the default ambient light because adjusting ambient light does adjust the affect.

However, I don't understand the effect that I am seeing and was hoping someone could explain what is happening and why.

If I remove the SCALE OBJECT command then all the objects in the scene are equally illuminated but scaling the object up in size makes it darker and scaling it down makes it brighter. I could understand it if it was getting brighter because I was moving it closer to a light source but that isn't happening.

1) Why does SCALE OBJECT affect lighting?

2) How can I scale an object and keep it the same brightness as it was before scaling?

Thanks for you time
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 18th Oct 2003 17:43
with this sample code run it and show me where via snapshot what your refering to please. If there isnt enough code pertaining to your problem then add some and make a snapshot and show me what your refering to.



Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Oct 2003 18:38
Hmmm.... Your program doesn't create the effect that mine does - wierd!

Here is my complete code:



There is media involved so it wont run 'as is' but maybe you can deem something from it.

I will try to upload some screenies demonstrating the effect I am talking about.

Thanks for your help
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Oct 2003 19:04 Edited at: 19th Oct 2003 23:14




There should be two screen shots above. If not then they can be found here: http://www.freewebs.com/scraggle/doga.htm
Called 'Test screenshot1' and 'Test screenshot2'

I've kept them small for the web but you can still see what I mean.
The first image has the 'Home Base' model scaled up and it is fairly dark. In the second image I have 'REMed out' the scale command and now the object is bright.

I don't understand why! If you do then please help

P.S. I don't know if it makes a difference or not but I created the models in DoGA.

Thanks
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 18th Oct 2003 19:28 Edited at: 18th Oct 2003 19:31
There is a default light (number 0) that you can not remove. But, you can hide it. The scaling/lighting deal is merely a side effect of your model being further from this default light.

DBP seems to be loaded with quirks like this that can drive you nuts until the answer comes to light. SET NORMALIZATION ON is another of those gotchas.
--
TAZ

` this will remove the effects of the default light
HIDE LIGHT 0
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Oct 2003 22:46
Thanks for the input zircher. Whilst you have taught me about LIGHT 0, turning it off doesn't really help.

With LIGHT 0 hidden all me models are uniformley dark, increaseing ambient light makes them uniformley light but unfortunatley I lose the reflective qualities of the models textures. So I added a directional light which brings back the reflection but now I am right back at square one, the scaled up model is darker than the rest.

Quote: "The scaling/lighting deal is merely a side effect of your model being further from this default light.
"


I overlooked this comment when I first read your post but now that I have re-read it I think I should point out that the model should be no further away fro the light than it was before because I have not moved it at all, I have simply altered its scale. Or is this another quirk? Does altering the scale of an object actually alter its Z value?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Oct 2003 03:57
the best thing i can suggest is to take the model at hand and make a test for it.

Doga doesnt allow you to set the diffusion or the specularity of a model and this could be a contributing factor.

Isolate one model and do some tests with it in a seperate source.
Once you have found out what the cause is then u can reimplement it back in.

zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Oct 2003 11:28
Well, I didn't say that hiding the light would fix the problem as much as it could be contributing to the problem. With it hidden, you can then add your own lights and not get any interference.

Does changing the scale alter its Z value. It does not change the origin of the model but sure as hell changes the XYZ values at the extremities. So yes, change the scale will effect how point and spot light are shown on a model. Scale should have no effect for ambient or directional lighting.

---------------------------------------

Side note: DoGA L2 has a palette of materials settings that include various (preset) levels of specularity and diffusion. L3 extends this palette and includes a full detail settings section with six or seven sliders for controlling all of the parameters.

There are also some nice anime/cell shading materials as well in L3, but they do not export since they are actually controling the renderer. [But, if you're want to render manga or anime easily, its very fun to play with.]

My son designed this model in 15 minutes. He spent another 10-15 minutes to set up the background the way he wanted:
http://www.geocities.com/tzircher/15_justin.htm
--
TAZ
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 19th Oct 2003 18:10
that doga game looks pretty good graphics wise =)

http://www.freewebs.com/ingamers
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Oct 2003 23:03
Thanks, but DoGA is kind of like 3D modelling studio and not a game. It's like virtual Legos or Technics where you pull parts from a 'bin' and use those parts to make models. Depending on which version of DoGA CGA you try (Lesson 1, 2, or 3), you have different capabilities. But even at L1 you can stretch, rotate, and position these parts as needed. At L2 you can add more colors and textures, and at L3 you can easily add custom parts and textures.

They are all free to download and each adds on to the next version. The shareware part of DoGA L2 and L3 is AVI creation. You can use the motion editor to make some nice stills, but not a movie without registering.
--
TAZ

Login to post a reply

Server time is: 2024-09-21 05:24:29
Your offset time is: 2024-09-21 05:24:29