Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/26/26 17:55
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
7 registered members (TipmyPip, Martin_HH, Volkovstudio, AndrewAMD, JMMAC, Grant, 1 invisible), 5,432 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 7 1 2 3 4 5 6 7
Re: dynamic and static shadows on top of shaders [Re: lostclimate] #82658
08/05/06 07:43
08/05/06 07:43
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Well I doubt i can compete with full commercial engines like A6 or Torque, even with good rendering.. its too much work I think.

Doing a collision system like A6 has would take at least a year on its own if not more. Physics would be hard, and networking? Phew.. not possible for me.


Sphere Engine--the premier A6 graphics plugin.
Re: dynamic and static shadows on top of shaders [Re: lostclimate] #82659
08/07/06 08:13
08/07/06 08:13
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline OP
Senior Expert
Machinery_Frank  Offline OP
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
William explained my point very clear. Thanks. That is what I wanted to tell

And I see it the same way: We do not need all that when there will be static meshes (models and blocks) that get light-mapped with the help of a shadow-compiler. But the work-around could be another independent uv-set only for the shadow map and the option to blend both textures (colors and shadows) over each other.


Models, Textures and Games from Dexsoft
Re: dynamic and static shadows on top of shaders [Re: Machinery_Frank] #82660
08/07/06 10:22
08/07/06 10:22
Joined: Jul 2000
Posts: 28,077
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,077
Frankfurt
Hmm, maybe I'm still not getting what you want, but I have the impression that you and William are very, very steadfast in explaining at length a demand for a second UV set, which is however a basic feature that any engine has.

I assume that you don't want to manually paint the lightmap in MED, so you just want to write an external program for importing a lightmap and its UV coordinates into a model at run time. This can be easily done:

1. Create a model with one or several tiled skin textures.
2. Use ent_mesh to get a mesh pointer of that model.
3. Get the vertex buffer. The vertex format is described under "Shaders".
4. Import your UV coordinates to tu2/tv2, and the shadow map to a material skin.
5. Render the model with an FF effect that blends the shadow map over the tiled texture.

Hope this helps - otherwise, I'm afraid, you have to explain your problem in more detail.

Static, lightmapped meshes will be a feature of the new rendering kernel that's currently in development.

Re: dynamic and static shadows on top of shaders [Re: jcl] #82661
08/07/06 12:25
08/07/06 12:25
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline OP
Senior Expert
Machinery_Frank  Offline OP
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Fantastic. Thank you for the response.

The new lightmapped meshes will save us alot of work and then we will not need this work-around anymore.


Models, Textures and Games from Dexsoft
Re: dynamic and static shadows on top of shaders [Re: Machinery_Frank] #82662
08/07/06 18:58
08/07/06 18:58
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
sounds interesting...

but can you get models affected by a custom light map below it just like with bsp light maps? (btw. it would be helpful also for other things if c_trace could return the hit triangle and the exact texture coordinates in this triangle.)

and a code snippet of how to work with the d3d mesh for that purpose would be nice. i don't think a ent_loadseconduvset(entity, filename) dll function would be very hard to do but i have a hard time navigating microsoft's documentation pages. is the vertex buffer all you need? wouldn't you also have to know something about the triangles?

Re: dynamic and static shadows on top of shaders [Re: ventilator] #82663
08/07/06 20:34
08/07/06 20:34
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
This sounds intresting, but how would you go about implementing this? I guess I have similar questions as Ventilator pointed out...

btw - any idea when the lightmapping portion would be out in beta? less than 8 months? If so, i'd just leave all the levels that need lightmapping to be developed later. Otherwise would have to figure out how to get this second uv map technique working.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: dynamic and static shadows on top of shaders [Re: William] #82664
08/07/06 21:01
08/07/06 21:01
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
This is most exciting! So in this case the lightmaps would be externally generated from a 3D application, like Maya or Blender, right? It would be nice if player and NPC's were illuminated by the map in real time, but still it's no great loss compared to having no lightmap effect at all.

Since the lightmapping in the new kernel will be able to use normal static lights-- must the meshes surfaces be re-imported as octree instead?

Maybe the 2 UV solution would be more visually powerful, if you have better lighting controls in your 3D lightmapping application than the basic WED static lights, so you could use barn doors and scrims and create more complex directional lighting effects, use falloff distances, etc, than possible with wed static lights..

But which solution would run faster-- The fake workaround or the real deal ?

Re: dynamic and static shadows on top of shaders [Re: JetpackMonkey] #82665
08/08/06 06:29
08/08/06 06:29
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Well, I think lightmapping is the same speed either way, unless you mean calculations, but that doesn't really matter much to me. Your right that program(max, ect.) lightmapping offers a bit more abilities, but i'm sure placeing static lights in WED would be much much easier(especially if the textures of models show in the preview sometime soon + lighting) than baking it in your 3d program and exporting. For example, an average racetrack level from max(that I've developed) has around 40 individual meshs to export. To bake all this in max + exporting it all properly(plus the shader code, if indeed possible) takes up more time than it would to just do the lighting in WED and use that as a final product.

Hopefully theres an answer of when the WED version of lighting will be in beta... i'd like to try out the program version too, but unsure how to go about it(never programmed much shader code before, and dont know how to share texture coordinates from max-3dgs vertex format).


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: dynamic and static shadows on top of shaders [Re: William] #82666
08/08/06 13:04
08/08/06 13:04
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Thanks William, I get it now. Hm. Is there an ETA on the Beta-- will it make it under the gate before A7?

Bye

Re: dynamic and static shadows on top of shaders [Re: JetpackMonkey] #82667
08/08/06 14:58
08/08/06 14:58
Joined: Jul 2000
Posts: 28,077
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,077
Frankfurt
The new kernel is still far from finished - probably A7 - so the suggested lightmap importer would be the way to go.

Yes, you just need the vertex buffer, and just need to overwite the two floats u2/v2. This is the pseudocode:

Code:

LPD3DXMESH pMesh = (LPD3DXMESH) ent_mesh(entity);
BYTEPTR pVB;
pMesh->LockVertexBuffer(0,&pVB);
for (int i=0; i<numverts; i++)
{
VERTEX_TLSHADED *v = ((VERTEX_TLSHADED*)pVB) + i; // see vertex format in "shader"
v->u2 = lightmap_u2[i];
v->v2 = lightmap_v2[i];
}
pMesh->UnlockVertexBuffer();



Page 3 of 7 1 2 3 4 5 6 7

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1