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 Discussion / Flat-shaded polygons?

Author
Message
FuzzyFish
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location:
Posted: 6th Jun 2006 08:43
Just a thought, but is it possible to create a flat-shaded model and define the colors of certain polygons during run-time?

<|;^{D>
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th Jun 2006 13:50
I think it's possible to edit colors, but only when you have DBC Enhanced. (using memblocks)

I don't think you can create a flat-shaded model though.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 7th Jun 2006 13:54
you can assign colours to polygons using most modelling packages with ambient / diffuse / specular settings.
flat shading could be achieved for sure from a modelling package and code.

if you want to program this you will have to assign a colour to each polygon and create each polygon one at a time with code.
or write your own program that records what polys have what colour and through dynamic coding assign a texture map to each poly as its created, giving the effect of flat shaded with lines around the outside if you wanted that effect.

killing the smoothing groups on your models will help with a better looking flat shading etc..

DBC is a little more limited then pro but that wouldnt stop me and yes what i have mentioned above would be possible in both pro and classic.

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself &#63743;
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 7th Jun 2006 19:17
there is a way easyer way to do it, not sure it wil work though
make your own cube in a 3d modeler then texure it so each side takes one pixel (6 pixel texture). then when you want to change the collor just paint over the texture and update the model.

Don't look at my sig!
FuzzyFish
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location:
Posted: 10th Jun 2006 10:33
Yeah the pixel texture method is not acceptable for what I want to do with this, that is keeping models under 20KB. And not using a single texture for the game, as I would be chaninging certain things dynamically. So it looks like memblocks would be the way to do it.

<|;^{D>

Login to post a reply

Server time is: 2025-05-25 04:18:11
Your offset time is: 2025-05-25 04:18:11