Something like a simple Modelviewer

Posted By: rvL_eXile

Something like a simple Modelviewer - 09/05/12 14:17

Hey Guy's, first time i posting here *YEAH!* ^^
I need a simple "Model Viewer" (really simple tongue ).
It should be just an .exe file wheres one model (f.e. an block model) is included with an normalmapping shader and dynamic shadows.
It would be really nice if i could move the light in any direction (W=forwards / S=Backwards / A=Left / D=Right / Q=Up / R=down).
The Normalmapping shader should handle more than 6 Textures.

Hopely someone could do this for me laugh

Nothing more to say laugh

regards Sebastian
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 15:04

I've got a question:
what do you exactly mean with 'The Normalmapping shader should handle more than 6 Textures.'?

...And if stencil shadows are good enough I probably could make something like that.
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 16:07

i will use more than 6 or 5 or what ever grin Textures in my model so the shader should be able to create the effect on all applied Normalmaps.

Quote:
...And if stencil shadows are good enough I probably could make something like that.

Would be great laugh

regards Sebastian

*moep*
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 16:13

wow, looks REALLY nice.

But I'm sorry, I don't know how to use multiple textures and multiple normalmaps, if the number of textures isn't static (I don't know if this is even possible)
because for every texture a texture sampler has to be created.

Well... I'll try wink
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 16:20

thank you.
Maybe create an simple block model an apply 6 textures / normalmaps to it.
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 16:30

...I'm using my own object shader and I kow it wont work.

What I mean is this:

my object shader looks like this at the beginning:
Code:
sampler ColorMapSampler = sampler_state 
{ 
	Texture = <entSkin1>;
	AddressU  = Wrap; 
	AddressV  = Wrap;
	MipFilter = Linear;
	MinFilter = Linear;
	MagFilter = Linear;
}; 

sampler NormalMapSampler = sampler_state
{ 
	Texture = <entSkin2>;
	AddressU  = Wrap; 
	AddressV  = Wrap;
	MipFilter = Linear;
	MinFilter = Linear;
	MagFilter = Linear;
};


So I've got 2 texture samplers. One for the actual texture (entity skin1) and one for the normal map (entity skin2)

The problem is that I can't just use multiple texters for one texture sampler.

this means for every texture and for every normal map I would have to create a sampler.

And if the number of textures is dynamic this just won't work frown
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 16:32

ah okay, could you create a sampler with 6 texture? This should be enough for my needs.
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 16:33

Ok I'll try that smile
(but it will take some time)
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 16:51

wow... I didn't expect that I get it working so fast since everything I could do was guessing and trying around grin



At the moment theres no customization and no shadows, yet but that shouldn't be that hard.

EDIT: The only thing that I don't know is how much textures it really supports.
My shader supports colormap and normalmap for 6 textures but the manual says 'entSkin1 ... entSkin4'
...so it could be that entSkin5 and higher just get ignored smirk
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 16:54

okay that sound great laugh if you finished could to publish it? i dont own A8 yet ^^
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 17:30

looks like I've got some shadow problems.

The stencil shadows work but somehow the blurring does not.
So the shadows don't look really good...
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 17:43

no problem... do you think youll finished it today?
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 17:45

an early and simple version yes.

I mean a version without customization and special features.

Tomorrow I'll add some settings like sunlight color, normal map intensity and this kind of stuff
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 17:55

yeah cool. just want to see how it looks like with normalmaps ^^
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 18:20

I managed to fix the shadow blurring problem.
The shadows still don't look very good but they are much better than before.

you can download it here wink

to use it drag a model over the .exe-file like this:


It doesn't matter if the model is in another folder as long as the texture files are in the same as the model is.
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/05/12 19:46

Hey KArtoffel, is mir jetzt egal das ich mit english angefangen habe... Habs gerade ausprobiert... sehe nur nen halben blurred shadow. Klappts bei dir richtig? Habs auch mit nem anderen model von mir probiert, funktioniert auch nichts...

hier maln screen(vom plate.mdl):
Posted By: Kartoffel

Re: Something like a simple Modelviewer - 09/05/12 21:39

hmm, das ist... sehr eigenenartig

bei mir sieht das ganze so aus:


Das einzige was mir spontan einfallen würde ist, dass du evtl. mal auf die ModelViewer.exe rechtsklickst.
Und dann auf Eigenschaften -> Kompatiblität -> Programm als Administrator ausfüren klickst, und das ganze nochmal versuchst.

Es könnte auch daran liegen, dass deine Grafikkarte kein PixelShader 3.0 unterstützt (wird für den object-shader benötigt), was mich aber extrem wundern
würde, da PS 3.0 schon ab DirectX9-Karten Standart ist und noch ältere Grafikkarten eigentlich niemand mehr hat. ( vor allem keine Game Developer wink )

Naja ansonsten werd' Ich auf jeden Fall nochmal genau schauen woran das Ganze liegen kann, Ich würde das aber gerne auf morgen verschieben, wenns Ok ist smile

Bis Ich den Fehler gefunden hab' kannst du's ja als Shadow Map Viewer ansehn grin
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/06/12 13:59

Also ich hab ne Geforce GTX 260 die supportet DX10 / SM4.0, sollte also nicht daran liegen.

Gruß Sebastian
Posted By: gri

Re: Something like a simple Modelviewer - 09/07/12 06:45

hallo ihr 2,

habs auch mal getestet.... und bekomme auch nur den schatten wie rvl. erst dacht ich da wär Dreck aufn Display grin sorry

Grafikarte ( NVIDIA GeForce 9800M GTX ) ist etwas älter unterstützt aber sm4 und dx 10.
Posted By: MasterQ32

Re: Something like a simple Modelviewer - 09/07/12 07:09

works for me (Mobile Intel 4 Series Express)
Posted By: HeelX

Re: Something like a simple Modelviewer - 09/07/12 07:10

For a simple model viewer, I would rather use simple softshadowmapping. You get into trouble, when the models are not closed.

There is a small demo in the Gamestudio \samples folder.
Posted By: Pappenheimer

Re: Something like a simple Modelviewer - 09/07/12 11:42

Falls das weiter hilft, ich kriege beim Starten des Model Viewers ein


"Malfunction W1527
No File!"

...und der Fensterinhalt bleibt schwarz.
Posted By: MasterQ32

Re: Something like a simple Modelviewer - 09/07/12 12:44

@pappenheimer:
das ist sinn und zweck der sache, zieh mal die player.mdl darauf... grin
Posted By: Pappenheimer

Re: Something like a simple Modelviewer - 09/07/12 14:07

Cool. Dropbox-mäßig. laugh
Okay, bei mir funktioniert es gut.
Posted By: Bone

Re: Something like a simple Modelviewer - 09/07/12 14:15

Hab ne ATI 4870 Karte und der Viewer läuft.
Posted By: rvL_eXile

Re: Something like a simple Modelviewer - 09/07/12 16:56

Jo wir haben bereits rausgefunden das es wohl an meiner Nvidia liegt, da sein Code für ATI geschrieben ist (hab ich so verstanden tongue ). Von daher sollte das alles auf ATI Grafikkarten laufen...
© 2024 lite-C Forums